Skip to content
RAG Explained Better

Step-Back Prompting for Retrieval

Asking a more general question first to retrieve the background a specific question needs.

Step-back prompting for retrieval first asks a more general question — a high-level concept or first principle — retrieves evidence for that broader query, then answers the original specific question grounded on that background. Zheng et al. (Google DeepMind; arXiv:2310.06117, October 2023) name the pattern Abstraction-and-Reasoning: abstract first, then reason. The price is at least one extra LLM rewrite call plus retrieval on the broader query (and optionally on the original too). The rewrite-family map lives on query rewriting; this page is the step-back technique.

How does step-back prompting work?

Step-back prompting is two steps — abstraction, then reasoning — demonstrated with few-shot exemplars rather than a trained rewriter (Zheng et al., §2; Learn Prompting).

  1. Abstraction. Instead of answering the original question, the model emits a step-back question at a higher level of abstraction: Ideal Gas Law principles for a pressure / volume / temperature numeric, or “education history” for “which school between August and November 1954” (Estella Leopold / TimeQA example in Zheng Figure 2).
  2. Reasoning. The model then answers the original question grounded on those principles or on facts retrieved for the step-back question — Abstraction-grounded Reasoning in the paper’s terms.

Worked TimeQA shape from the paper’s exemplars: “Which team did Thierry Audel play for from 2007 to 2008?” steps back to “Which teams did Thierry Audel play for in his career?” — the career overview is easier to retrieve than the date-constrained slice, then the generator re-applies the original years.

How does step-back prompting help RAG retrieval?

In RAG, step-back prompting is a query rewrite that trades a brittle, over-specific string for a broader neighbourhood the index can actually match — then the generator zeroes in on the original constraint.

  • Retrieve on the step-back query only. Zheng et al.’s Knowledge QA setup uses the step-back question to retrieve facts as context, then reasons over the original question with that context. DevOps / Scaibu-style pipelines follow the same generate_stepback → retrieve → generate_answer(original) shape.
  • Retrieve on both, then fuse. Neel Mishra’s query-transform write-up (2026) searches the original and the step-back query and merges rankings with reciprocal rank fusion (k=60). Learnixo’s Advanced RAG note retrieves for both the specific and the general question before answering.

Narrow tokens (years, IDs, version pins) often under-match dense indexes; the broader “career history” / “governing policy” form lands on summary chunks where the gold fact aggregates (Zheng TimeQA motivation; DevOps narrow→broad→precise framing).

What gains does step-back prompting show?

Published gains come from Zheng et al. (arXiv:2310.06117) on named benchmarks with PaLM-2L — not from blog ROI models. Cite the paper’s figures; measure your own corpus separately.

  • STEM (MMLU). Step-Back Prompting improves PaLM-2L by 7% on high-school Physics and 11% on Chemistry versus the PaLM-2L baseline (paper abstract / §4).
  • Knowledge QA (TimeQA). PaLM-2L baseline accuracy is 41.5%; ordinary RAG reaches 57.4%; Step-Back + RAG reaches 68.7% on the TimeQA test set (§5.2). On the Hard subset, RAG alone is 46.8% and Step-Back + RAG is 62.3%.
  • Error trade. Versus RAG alone, Step-Back + RAG fixes 21.6% of RAG errors while introducing 6.3% new ones (Appendix A.2). The abstract also reports a 7% MuSiQue lift for PaLM-2L.

Benchmark answer accuracy ≠ your Recall@k

These are answer-accuracy lifts on MMLU / TimeQA / MuSiQue with PaLM-2L (and comparisons to GPT-4 / Llama2-70B in the paper). They are not a universal retrieval Recall@k promise. A DeepMind publication page lists TimeQA +34% while the arXiv HTML abstract states +27% — this page quotes the paper HTML figures. Flattened claims such as “~5% on MMLU” without the Physics/Chemistry split are not cite-ready.

What does step-back prompting cost?

The costs are structural — an extra generation before retrieval, optional dual search, and the risk that a wrong abstraction retrieves the wrong neighbourhood.

  • At least one LLM rewrite call per query. Emitting the step-back question adds latency and tokens before any index lookup — the same cost class as other query rewriting techniques.
  • Optional second retrieval. Dual-path designs that also search the original query double candidate fan-in before fusion (Neel; Learnixo).
  • Abstraction drift. If the step-back question changes meaning, retrieval lands in the wrong concept cluster — then generation looks confident and wrong.

Exact milliseconds and dollars are not published as a universal figure; measure rewrite-on vs rewrite-off on a labelled set before mandating step-back on every query.

When should you use step-back prompting?

Use step-back prompting when the user’s question is over-specific relative to how the corpus stores the answer — and skip it when the query is already retrieval-shaped.

  • Strong fit: temporal or ID-constrained slices (TimeQA-style career/date questions); mechanistic “why / debug / how does X affect Y” asks that need foundational docs (Neel’s HNSW parameter example; Learnixo clinical CYP450 cases); heterogeneous corpora where gold facts live in overview→detail sections (DevOps).
  • Weak fit: simple factual lookups that already match chunk wording (Learnixo); latency budgets that cannot absorb an LLM hop; labelled sets where baseline Recall@k is already fine.

Prefer multi-query retrieval when you need paraphrase coverage of the same information need; prefer query decomposition when the question is several atomic facts in disguise.

How is step-back different from multi-query, HyDE, and decomposition?

All four transform the query before (or instead of) a naive embed-of-user-text. They differ in what the transform produces.

  • Step-back emits one more general question — abstract up (this page).
  • Multi-query emits N paraphrases of the same need and fuses ranked lists — depth on multi-query retrieval.
  • HyDE embeds a hypothetical answer document instead of the question — depth on HyDE.
  • Decomposition splits into different atomic sub-needs — depth on query decomposition.

Chain-of-Thought still answers the original question with linear intermediate steps; it does not change the retrieval query the way step-back does (Learn Prompting contrast). The technique map for the whole family is on query rewriting.

How do you implement step-back prompting?

Implementing step-back prompting is a rewrite-then-retrieve checklist, not a full notebook.

Three-step flow. One, write a step-back prompt using few-shot exemplars that return only the broader question. Two, retrieve on the broader query, and optionally the original too, fusing dual rankings if both are kept. Three, generate on the original question with the retrieved documents as context, keeping the user's constraints in the final prompt.
The abstraction step never answers the user — it only earns the context that the final generation step then narrows back down to the original question.
  1. Write a step-back prompt. Few-shot exemplars that return only the broader question (DevOps STEPBACK_SYSTEM; Neel STEP_BACK_PROMPT; Zheng Appendix D.2 TimeQA pairs).
  2. Retrieve on the broader query (and optionally the original). Vector or hybrid search over stores such as Weaviate, Qdrant, Pinecone, and Chroma works for the embed layer; fuse dual rankings if you kept both queries (Neel RRF k=60).
  3. Generate on the original question with the retrieved docs as context — keep the user’s constraints in the final prompt.

LangChain and LlamaIndex Advanced RAG cookbooks demonstrate the pattern; the pinned runnable lives on building the pipeline. Measure before/after under evaluation.

What is step-back prompting?

Step-back prompting first asks a more general or abstract question (a high-level concept or first principle), then answers the original specific question grounded on that background. Zheng et al. (arXiv:2310.06117, 2023) call the pattern Abstraction-and-Reasoning. In RAG, the broader question is usually what you retrieve with.

How does step-back prompting help RAG?

Over-specific queries (dates, IDs, version pins) often miss the summary chunks where the answer lives. Retrieving on a broader step-back question pulls that neighbourhood; the generator then applies the original constraint. Production forms retrieve on the step-back query alone, or on both original and step-back and fuse the rankings.

What did Zheng et al. measure?

On PaLM-2L, Zheng et al. (arXiv:2310.06117) report +7% on MMLU Physics, +11% on MMLU Chemistry, TimeQA accuracy from 41.5% baseline to 57.4% with RAG and 68.7% with Step-Back+RAG, and a 7% MuSiQue lift in the abstract. Versus RAG alone, Step-Back+RAG fixed 21.6% of RAG errors while introducing 6.3% new ones.

When should you skip step-back prompting?

Skip it for simple factual lookups that already match chunk wording, when labelled Recall@k is fine without a rewrite, or when latency cannot absorb an extra LLM hop. Prefer multi-query for paraphrase coverage of the same need, or query decomposition when the question is several atomic facts.

How is step-back different from multi-query?

Step-back emits one more general question (abstract up). Multi-query emits N paraphrases of the same information need and fuses ranked lists. Depth on multi-query fusion is at /retrieval/multi-query/.