Skip to content

Chain-of-thought

Chain-of-thought prompting is a technique used to guide thinking or decision-making process. It starts by inhibiting a question or an instruction that leads in a generation of step-by-step instructions to solve a problem or perform a task. These when executed are leading to a specific conclusion or solution.

There are two flavors: question based, and instruction based, with the second being the most common.

Here is an example for the task of summarization

The task at hand is to summarize text, produce a list of actions to perform
that will help you perform this task in document parts from the financial
sector.

Response:

Sure, here are the steps you can follow to summarize text and produce a list of
actions for financial documents:

1. Read the entire document to get an overall understanding of the content and
   identify the main points.
2. Identify the key sections of the document and create a summary of each
   section.
3. Use bullet points or numbered lists to highlight the main points in each
   section.
4. Eliminate any redundant or unnecessary information.
5. Identify any important financial terms or concepts and provide definitions
   or explanations if necessary.
6. Use clear and concise language to summarize the content.
7. Proofread the summary to ensure accuracy and clarity.

By following these steps, you should be able to produce a well-organized and
informative summary of financial documents.

and follow up with the actual task-input:

Now given some text provided, perform these actions but only provide
the final output . Here is the text:

In order to avoid getting extra-tokens and the extra output in the prompt response we also instruct to hide the intermediate steps. As an exercise try it with or without.

In a question based form the initiation prompt would be :

What is the standard method to create summary for text ? 

That would lead to a free form response just as good as before:

The standard method to create a summary for text is to identify the main ideas and key points of the text and condense them into a shorter form. This can be done by reading the text multiple times, highlighting or taking notes on important information, and then using those notes to create a summary that captures the essence of the original text. Additionally, there are various techniques and tools, such as automatic summarization algorithms, that can assist in creating a summary.

And then the instruction can be:

Apply this method to the provided text: