Home Artificial Intelligence Analogical & Step-Back Prompting: A Dive into Recent Advancements by Google DeepMind

Analogical & Step-Back Prompting: A Dive into Recent Advancements by Google DeepMind

0
Analogical & Step-Back Prompting: A Dive into Recent Advancements by Google DeepMind

Introduction

Prompt engineering focuses on devising effective prompts to guide Large Language Models (LLMs) similar to GPT-4 in generating desired responses. A well-crafted prompt might be the difference between a vague or inaccurate answer and a precise, insightful one.

Within the broader ecosystem of AI, prompt engineering is certainly one of several methods used to extract more accurate and contextually relevant information from language models. Others include techniques like few-shot learning, where the model is given a number of examples to assist it understand the duty, and fine-tuning, where the model is further trained on a smaller dataset to specialize its responses.

Google DeepMind has recently published two papers that delve into prompt engineering and its potential to reinforce responses on multiple situations.

These papers are an element of the continuing exploration within the AI community to refine and optimize how we communicate with language models, and so they provide fresh insights into structuring prompts for higher query handling and database interaction.

This text delves into the main points of those research papers, elucidating the concepts, methodologies, and implications of the proposed techniques, making it accessible even to readers with limited knowledge in AI and NLP.

Paper 1: Large Language Models as Analogical Reasoners

The primary paper, titled “Large Language Models as Analogical Reasoners,” introduces a recent prompting approach named Analogical Prompting. The authors, Michihiro Yasunaga, Xinyun Chen and others, draw inspiration from analogical reasoning—a cognitive process where humans leverage past experiences to tackle recent problems.

Key Concepts and Methodology

Analogical Prompting encourages LLMs to self-generate relevant exemplars or knowledge in context before proceeding to unravel a given problem. This approach eliminates the necessity for labeled exemplars, offering generality and convenience, and adapts the generated exemplars to every specific problem, ensuring adaptability.

Left: Traditional methods of prompting LLMs depend on generic inputs (0-shot CoT) or necessitate labeled examples (few-shot CoT). Right: The novel approach prompts LLMs to self-create relevant examples prior to problem-solving, removing the necessity for labeling while customizing examples to every

Self-Generated Exemplars

The primary technique presented within the paper is self-generated exemplars. The thought is to leverage the extensive knowledge that LLMs have acquired during their training to assist them solve recent problems. The method involves augmenting a goal problem with instructions that prompt the model to recall or generate relevant problems and solutions.

As an illustration, given an issue, the model is instructed to recall three distinct and relevant problems, describe them, and explain their solutions. This process is designed to be carried out in a single pass, allowing the LLM to generate relevant examples and solve the initial problem seamlessly. The usage of ‘#’ symbols within the prompts helps in structuring the response, making it more organized and easier for the model to follow.

Key technical decisions highlighted within the paper include the emphasis on generating relevant and diverse exemplars, the adoption of a single-pass approach for greater convenience, and the finding that generating three to 5 exemplars yields the perfect results.

Self-Generated Knowledge + Exemplars

The second technique, self-generated knowledge + exemplars, is introduced to deal with challenges in additional complex tasks, similar to code generation. In these scenarios, LLMs might overly depend on low-level exemplars and struggle to generalize when solving the goal problems. To mitigate this, the authors propose enhancing the prompt with a further instruction that encourages the model to discover core concepts in the issue and supply a tutorial or high-level takeaway.

One critical consideration is the order by which knowledge and exemplars are generated. The authors found that generating knowledge before exemplars leads to higher results, because it helps the LLM to concentrate on the elemental problem-solving approaches somewhat than simply surface-level similarities.

Benefits and Applications

The analogical prompting approach offers several benefits. It provides detailed exemplars of reasoning without the necessity for manual labeling, addressing challenges related to 0-shot and few-shot chain-of-thought (CoT) methods. Moreover, the generated exemplars are tailored to individual problems, offering more relevant guidance than traditional few-shot CoT, which uses fixed exemplars.

The paper demonstrates the effectiveness of this approach across various reasoning tasks, including math problem-solving, code generation, and other reasoning tasks in BIG-Bench.

The below tables present performance metrics of varied prompting methods across different model architectures. Notably, the “Self-generated Exemplars” method consistently outshines other methods by way of accuracy. In GSM8K accuracy, this method achieves the very best performance on the PaLM2 model at 81.7%. Similarly, for MATH accuracy, it tops the chart on GPT3.5-turbo at 37.3%.

Performance on mathematical tasks, GSM8K and MATH

Performance on mathematical tasks, GSM8K and MATH

Within the second table, for models GPT3.5-turbo-16k and GPT4, “Self-generated Knowledge + Exemplars” shows best performance.

Performance on Codeforces code generation task

Performance on Codeforces code generation task

Paper 2: Take a Step Back: Evoking Reasoning via Abstraction in Large Language Models

Overview

The second paper, “Take a Step Back: Evoking Reasoning via Abstraction in Large Language Models” presents Step-Back Prompting, a method that encourages LLMs to abstract high-level concepts and first principles from detailed instances. The authors, Huaixiu Steven Zheng, Swaroop Mishra, and others aim to enhance the reasoning abilities of LLMs by guiding them to follow an accurate reasoning path towards the answer.

 Depicting STEP-BACK PROMPTING through two phases of Abstraction and Reasoning, steered by key concepts and principles.

Depicting STEP-BACK PROMPTING through two phases of Abstraction and Reasoning, steered by key concepts and principles.

Let’s create a less complicated example using a basic math query to show the “Stepback Query” technique:

Original Query: If a train travels at a speed of 60 km/h and covers a distance of 120 km, how long will it take?

Options:

3 hours
2 hours
1 hour
4 hours
Original Answer [Incorrect]: The proper answer is 1).

Stepback Query: What's the essential formula to calculate time given speed and distance?

Principles:
To calculate time, we use the formula:
Time = Distance / Speed

Final Answer:
Using the formula, Time = 120 km / 60 km/h = 2 hours.
The proper answer is 2) 2 hours.

Although LLMs nowadays can easily answer the above query, this instance is simply to show how the stepback technique would work. For tougher scenarios, the identical technique might be applied to dissect and address the issue systematically. Below is a more complex case demonstrated within the paper:

STEP-BACK PROMPTING on MMLU-Chemistry dataset

STEP-BACK PROMPTING on MMLU-Chemistry dataset

Key Concepts and Methodology

The essence of Step-Back Prompting lies in its ability to make LLMs take a metaphorical step back, encouraging them to take a look at the larger picture somewhat than getting lost in the main points. That is achieved through a series of rigorously crafted prompts that guide the LLMs to abstract information, derive high-level concepts, and apply these concepts to unravel the given problem.

The method begins with the LLM being prompted to abstract details from the given instances, encouraging it to concentrate on the underlying concepts and principles. This step is crucial because it sets the stage for the LLM to approach the issue from a more informed and principled perspective.

Once the high-level concepts are derived, they’re used to guide the LLM through the reasoning steps towards the answer. This guidance ensures that the LLM stays on the proper track, following a logical and coherent path that’s grounded within the abstracted concepts and principles.

The authors conduct a series of experiments to validate the effectiveness of Step-Back Prompting, using PaLM-2L models across a variety of difficult reasoning-intensive tasks. These tasks include STEM problems, Knowledge QA, and Multi-Hop Reasoning, providing a comprehensive testbed for evaluating the technique.

Substantial Improvements Across Tasks

The outcomes are impressive, with Step-Back Prompting resulting in substantial performance gains across all tasks. As an illustration, the technique improves PaLM-2L performance on MMLU Physics and Chemistry by 7% and 11%, respectively. Similarly, it boosts performance on TimeQA by 27% and on MuSiQue by 7%.

Performance of STEP-BACK PROMPTING

Performance of STEP-BACK PROMPTING vs CoT

These results underscore the potential of Step-Back Prompting to significantly enhance the reasoning abilities of LLMs.

Conclusion

Each papers from Google DeepMind present progressive approaches to prompt engineering, aiming to reinforce the reasoning capabilities of enormous language models. Analogical Prompting leverages the concept of analogical reasoning, encouraging models to generate their very own examples and knowledge, resulting in more adaptable and efficient problem-solving. Then again, Step-Back Prompting focuses on abstraction, guiding models to derive high-level concepts and principles, which in turn, improve their reasoning abilities.

These research papers provide helpful insights and methodologies that might be applied across various domains, resulting in more intelligent and capable language models. As we proceed to explore and understand the intricacies of prompt engineering, these approaches function crucial stepping stones towards achieving more advanced and complicated AI systems.

LEAVE A REPLY

Please enter your comment!
Please enter your name here