Thread Of Thought: Definition and Examples
Prompting technique that asks the model to unravel a continuous thread of reasoning by identifying and connecting relevant information from a long context before formulating its response.
Full definition
Thread of Thought (ThoT) is a prompting strategy introduced in 2023 by researchers to improve the ability of large language models to handle large and complex contexts. Unlike Chain of Thought, which breaks down a problem into successive logical steps, Thread of Thought asks the model to "follow the thread" of the available information, extracting and connecting relevant elements before constructing its response.
The principle is based on a simple but powerful instruction: the model is asked to first review the entire provided context, identify the segments of information relevant to the question, and then weave these elements together into a coherent reasoning. This approach is particularly effective when the answer requires synthesizing information scattered across a long document or multiple sources.
The major advantage of Thread of Thought over other reasoning techniques is its ability to handle information noise. In a rich context containing both relevant and irrelevant information, ThoT guides the model to naturally filter what matters, thus reducing hallucinations and off-topic responses.
This technique stands out for its simplicity of implementation: it is usually enough to add an instruction like "Carefully go through the context above, identify relevant information segment by segment, then synthesize your answer" to obtain significant improvements on comprehension and question-answering tasks.
Etymology
The term "Thread of Thought" refers to the metaphor of a guiding thread that one unravels through a set of information. It was formalized in a 2023 research paper titled "Thread of Thought Unraveling Chaotic Contexts" by Yucheng Zhou et al., which proposed this technique as a solution for LLMs to handle long and messy contexts.
Concrete examples
Analysis of a long legal document to answer a specific question
Here is a 15-page contract. [CONTRACT_CONTENT]
Question: What are the early termination conditions?
Before answering, carefully go through the entire contract. Identify each section and clause that mentions termination, penalties, or end of contract. Connect these elements, then formulate your complete answer.
Synthesis of information scattered across a long conversation or meeting
Here is the transcript of a 2-hour team meeting. [TRANSCRIPT]
Unravel the thread of this conversation from beginning to end. Identify all decisions made, assigned responsibilities, and deadlines mentioned. Connect discussions that return to the same topic at different times, then produce a structured summary.
Answering a complex question requiring cross-referencing multiple sources
Here are three research articles on the impact of sleep on memory. [ARTICLES]
Go through each article, identifying key results, methodologies used, and conclusions. Note points of convergence and divergence between the studies, then synthesize an answer to the question: Is REM sleep more important than deep sleep for memory consolidation?
Practical usage
To apply Thread of Thought, add an explicit instruction asking the model to go through the entire provided context before answering. This technique is particularly useful when working with long documents, noisy contexts, or questions requiring cross-referencing scattered information. Combine it with clear context formatting (section numbering, separators) to maximize its effectiveness.
Related concepts
FAQ
What is the difference between Thread of Thought and Chain of Thought?
When should I use Thread of Thought instead of another technique?
Does Thread of Thought work with all language models?
See also
How to use this prompt
- Copy the prompt with the button above.
- Paste it into ChatGPT, Claude or your favorite AI assistant.
- Replace the bracketed variables with your details, then refine the result.
About Prompt Guide
Prompt Guide is a free library of 2500+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.
More definitions
Zero-Shot Prompting: Definition and Examples
Zero-shot prompting gives the AI an instruction without any examples. Discover when and how to use this technique.
Agentic Workflow: Definition and Examples
An agentic workflow is a workflow in which one or more AI agents autonomously make decisions, chain actions, and adapt
AI A/B Testing: Definition and Examples
AI A/B Testing refers to the use of artificial intelligence to design, execute, and analyze A/B tests in an automated way, enabling
AI Medical Diagnosis: Definition and Examples
AI Medical Diagnosis refers to the use of artificial intelligence to analyze medical data and help identify diseases, pathologies
AI Recommendation System: Definition and Examples
An AI-based recommendation system is an intelligent algorithm that analyzes user data to automatically suggest relevant content, products
Automatic Prompt Engineer: Definition and Examples
Method for automatic prompt optimization where a language model itself generates, evaluates, and refines the instructions it is given, in order to maximize the quality of responses without manual human intervention.
Get new prompts every week
Join our newsletter.