Skip to main content
Query reformulation turns a follow-up question into a standalone retrieval query. It is opt-in, uses the pipeline’s configured LLM, and runs only when the call includes conversation history.
Use it with explicit history or a session:
The rewritten query is used for retrieval and optional reranking. The final generation call still receives the original question and conversation history, so the user’s wording is not discarded. Successful reformulation adds:
  • a reformulation execution event and timing;
  • metadata["retrieval_query"] on the structured response;
  • a raglight.reformulation tracing observation when a tracer is configured.
No extra model call is made for a stateless question with empty history. Leave the option disabled when latency and model cost matter more than resolving conversational references.