Step-Back Prompting: A Way to understand the user query better

SUPRABHATSUPRABHAT
3 min read

Sometimes, users ' queries are ambiguous, but to give the user a perfect answer, LLMs need to understand the user's query better. For this, we use Step-Back Prompting.

What is Step-Back Prompting?

Instead of directly using the user query to fetch documents, step-back prompting asks the language model to generate a higher-level or more general question and use that to perform the retrieval.

How Step-Back Prompting Works

Step 1: Restate the Question
Repeat the user's question in your own words to make sure the goal is clear.

Step 2: Simplify It
Break the big question into a smaller, easier one — something more straightforward or fact-based.

Step 3: Find the Basics
Figure out the simple facts or information needed to answer the smaller question.

Step 4: Think It Through
Use logic to connect those basic facts back to the original, more complex question.

Step 5: Give the Answer
Share a clear and confident answer, showing how you got there step by step.

User Question: "{original_question}"

Step-Back Prompt to LLM:
"You are assisting in a retrieval-based question-answering system. The current
 user question may be too narrow for effective document retrieval.

Rephrase the question into a broader, more general or high-level version that 
would help in retrieving documents with more context and background knowledge.

Original Question: {original_question}

Generalized Question:"

Example of Step-back Prompting -

User Question: "What steps has the Indian government taken to improve coding
 education in rural schools under NEP 2020?"

Step-Back Prompt to LLM:
You are assisting in a retrieval-based question-answering system. The current
user question may be too narrow for effective document retrieval.

Rephrase the question into a broader, more general or high-level version that
 would help in retrieving documents with more context and background knowledge.

Original Question: What steps has the Indian government taken to improve
 coding education in rural schools under NEP 2020?

Generalized Question: What are the major educational reforms introduced
 under NEP 2020 in India?

Summry

Step-Back Prompting is a simple trick used with AI models to get better answers, especially for tough or confusing questions. Instead of answering right away, the AI first takes a step back to look at the question in a broader or simpler way. Then, it slowly works through the answer by thinking more clearly and logically.

This method has two main steps:

  1. Abstraction – looking at the question in a general way.

  2. Reasoning – step-by-step thinking to reach the answer.

It helps the AI explain things more clearly and improves the accuracy of its answers. You can use this in education, tech questions, or anywhere you want smarter and more understandable help from AI.

  1. What is RAG

  2. Parallel Query Retrieval (Fan Out)

  3. Chain of Thought

  4. Reciprocal Rank Fusion

  5. Hypothetical Document Embeddings

10
Subscribe to my newsletter

Read articles from SUPRABHAT directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

SUPRABHAT
SUPRABHAT