Re2 (re-reading the question)
Prompt engineering is full of small tricks that look almost too simple to work. Re2 ("re-reading") is one of them. The paper Re-Reading Improves Reasoning in Large Language Models (Xu et al., 2023) shows that if you present the user's question twice, with a short instruction between the two copies, instruct models often answer more carefully. The model effectively gets a second look at the question inside a single user message — without an extra LLM call.
The pattern
Re2 transforms a question Q into:
Q
{re2_prompt}
Q
The default re2_prompt in RAG Me Up's template is Read the question again: . So:
User question
Who approves expense claims over €500?
After Re2
Who approves expense claims over €500?
Read the question again:
Who approves expense claims over €500?
That whole string is what later gets wrapped by rag_question_initial / rag_question_followup and sent to the answer-generation LLM. Combined with document injection (next page), the model sees documents in the system prompt and a re-read question in the user turn.
How RAG Me Up applies it
Re2 runs late — after retrieval / rewrite decisions, immediately before prompt construction — and only when HyDE is off:
if os.getenv("use_re2") == "True" and not os.getenv("use_hyde") == "True":
prompt = f"{prompt}\n{os.getenv('re2_prompt')}\n{prompt}"
Why skip Re2 under HyDE? After HyDE, prompt holds a hypothetical document, not the user's question. Duplicating that document with "read the question again" would be semantically wrong.
Order matters: Re2 is applied after documents are fetched so BM25 is not polluted by the duplicated question and bridge phrase. The retriever also contains a defensive strip of the Re2 suffix if such a string ever reaches sparse search.
Configuration
| Variable | Role |
|---|---|
use_re2 | Enable/disable re-reading |
re2_prompt | Bridge text between the two copies |
Keep the bridge short. Domain-specific phrasing ("Re-read the employee's question carefully:") is fine; long bridges waste context.
When it is worth enabling
Re2 is nearly free: no extra model call, only a few more tokens. It is a reasonable default for answer quality. Skip it when you already use HyDE (mutually excluded in code), when your question templates already heavily wrap the ask, or when every token in the context window is precious.