Skip to main content

Module decomposition

Module decomposition 

Source
Expand description

Query decomposition (CH-11 rag-hardening, §5.4 item 1 of docs/uar-next.md).

Breaks a user query into sub-queries so a compound/multi-part question retrieves against each part instead of one averaged embedding that blurs all of them together. Heuristic (not LLM-based) per plan.md’s D-A decision (“harden in-process” — no new LLM-call dependency for this pass). QueryDecomposer is the seam: swap in an LLM-based decomposer later without touching callers (RagRetrievalPipeline only depends on the trait).

Structs§

HeuristicDecomposer
Splits on sentence boundaries and coordinating conjunctions when a query looks compound (e.g. “What is X and how does it relate to Y?”).

Traits§

QueryDecomposer
Breaks a query into 1+ sub-queries to retrieve against independently.