In RAG pipelines, user questions carry hidden structure (topic, scope, format expectations, disambiguation cues) that gets lost when the raw string is passed directly to retrieval. The solution is to parse the question first into a structured row in a `question_df` table, then split it into two derived views: a `RetrievalQuery` brief (topic, rewrites, scope filters) and a `GenerationBrief` (original wording, format constraints, disambiguation cues). A key insight is that negative instructions like 'not the deductible' must never be applied at retrieval — embeddings ignore negation and BM25 negative queries often delete the very passages containing the answer. Instead, retrieve broadly and let the LLM apply exclusions at generation time. This mirrors how document parsing works: adding a parsing capability means adding a column to a relational table, making question history queryable as operational data.

13m read timeFrom towardsdatascience.com
Post cover image
Table of contents
1. Question parsing mirrors document parsing2. Two consumer briefs from one parsed row3. What comes next4. Sources and further reading
86 Impressions