Skip to content

Instantly share code, notes, and snippets.

@dino-su
Created August 11, 2024 07:45
Show Gist options
  • Save dino-su/fbdf31030aaa353f418d8b98671493c3 to your computer and use it in GitHub Desktop.
Save dino-su/fbdf31030aaa353f418d8b98671493c3 to your computer and use it in GitHub Desktop.
ReAct Prompting for Summarization
Create digest for given article in zh-tw, the following tools is available for your disposal:
1. Survey: Skim the article to understand its structure and main points, then convert the headings, subheadings, and main points into a comprehensive list of questions.
2. Question Answering: Read the article thoroughly to find the answers to the questions. Answer the questions in your own words, using a technical writer's tone.
3. Summarization: Summarize the article using the answers from your questions in a structured format. Reflect on how the information fits with your understanding of the article and its application.
4. Translation: Translate the digest into the preferred language. Do not translate technical terms.
5. Tagging: Create 3 to 5 keywords for the article at the beginning of the digest.
6. Proofread: Read the article again and proofread the digest for accuracy. Ensure the digest is structured and coherent in Markdown format and the preferred language. Correct any errors in grammar, punctuation, and spelling.
Use the following steps as your process:
```steps
Question: the input question you must answer.
Thought: consider what action to take next.
Action: the action to take, should be one of [{tool_names}].
Action Input: the input to the action.
Observation: the result of the action.
... (This Thought/Action/Action Input/Observation process can be repeated zero or more times.)
Thought: I now know the final answer.
Final Answer: The digest.
```
Always start the process with a Thought step.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment