Evnek Quest logo
← Back to all articles
AI MODELS · EVNEK QUEST

New Prompt Technique - Buffer of Thoughts

Large language models (LLMs) are excelling at reasoning tasks, and researchers are finding that clever prompts can push their performance...

Evnek Quest·9 June 2024·4 min read

Large language models (LLMs) are excelling at reasoning tasks, and researchers are finding that clever prompts can push their performance even further. These prompting techniques come in two flavours:

Single-query prompting: This approach focuses on crafting effective prompts that guide the LLM towards the right answer. Techniques like Chain-of-Thought (CoT) prompt the LLM to reason step-by-step, while Few-shot prompting provides relevant examples to help it generate accurate answers.

Multi-query prompting: Here, the strategy involves using multiple LLM queries to explore different reasoning paths. This can be helpful for breaking down complex problems into smaller, more manageable ones. Examples of multi-query prompting methods include Least-to-Most, ToT, and GoT.

Limitations

What is Buffer of Thoughts ?

Buffer of Thoughts (BoT) ,framework aims to enhance the reasoning accuracy, efficiency, and robustness of LLMs across various tasks. Specifically, a lightweight library called meta-buffer is designed. This meta-buffer houses a series of universal high-level thoughts (thought-templates) distilled from different problem-solving processes. These thought-templates can be shared across tasks. For each problem, a relevant thought-template is retrieved and instantiated with a specific reasoning structure to facilitate efficient thought-augmented reasoning. Additionally, to guarantee the scalability and stability of BoT, a buffer-manager is proposed. This buffer-manager dynamically updates the meta-buffer, effectively enhancing its capacity as more tasks are solved.

Advantages:

Buffer of Thoughts has 3 main sections

Problem Distiller

Challenges of Complex Reasoning Tasks:

Complex tasks often present significant hurdles for LLMs due to their inherent characteristics. These challenges include:

Introducing the Problem Distiller:

To address these challenges, a meta-prompt named φ (phi) is proposed. This problem distiller functions in two key phases:

Distillation and Formalization: φ acts to first extract and formalize the essential information from the input task. This involves focusing on:

Identifying the essential parameters and variables crucial for solving the problem.

Thought-Augmented Reasoning with Meta Buffer

Thought Template

Buffer of Thoughts (BoT) relies on a core concept called thought-templates. These templates represent general reasoning patterns that can be applied across various tasks. To ensure broad applicability, BoT categorizes thought-templates into six distinct groups:

The system stores these thought-templates within a dedicated component called the meta-buffer. This lightweight library serves as a central repository for these reusable reasoning patterns.

Template Retrieval

To tackle each new challenge, BoT employs a strategic retrieval process. It searches its library of thought-templates (Ti) to identify the one that best aligns with the problem at hand (xd). This selection process involves calculating the embedding similarity between the description of the thought-template (DTi) and the distilled representation of the problem (xd). Essentially, BoT compares the characteristics of each template to the information extracted from the current task and selects the most fitting one for the specific reasoning required.

Instantiated Reasoning

When dealing with a specific task, BoT approaches the reasoning process through "instantiated reasoning." This involves adapting a retrieved thought-template to the specific problem at hand. There are two main scenarios to consider:

The Learning Engine: Buffer-Manager

BoT's innovation lies in its buffer-manager, a component that goes beyond simply storing past solutions. This intelligent module acts as a learning engine, actively analyzing the reasoning processes used to solve each task. Here's how it works:

References:

https://arxiv.org/pdf/2406.04271#:~:text=Buffer%20of%20Thoughts%20enables%20large,thought%20is%20marked%20in%20blue.&text=where%20x%20is%20the%20task%20statement.