A municipal-code Q&A assistant's answers are missing relevant regulation text because its retrieval step only performs keyword search. What retrieval strategy should the team adopt to also capture semantically related matches?
Select an answer to reveal the explanation.
Short Explanation
Keyword search only finds what says the exact words you typed, which is a problem when a resident asks about tearing down a fence and the code says structure removal. Hybrid retrieval pairs that exact-match strength with semantic search, which catches meaning even when the wording doesn't line up. Together they cover what either one alone misses.
Full Explanation
Hybrid retrieval runs keyword (lexical) search and semantic (vector) search over the same knowledge base and combines their results, which lets the system catch both exact-term matches — useful for precise legal citations and defined terms in municipal code — and semantically related passages that use different wording for the same concept, closing the gap keyword-only search leaves. Expanding a synonym dictionary is a manual, incomplete patch on the same underlying keyword mechanism; it can only capture the synonym pairs someone thought to add, while semantic search generalizes to related phrasing the curator never anticipated. Dropping to pure semantic search fixes the missed-meaning problem but creates a new one: municipal code often turns on exact defined terms and citation numbers, and vector search alone can rank a semantically close but legally distinct passage above the precise one the resident actually needs. Increasing chunk size changes how much context each retrieved passage carries, but it doesn't change what gets matched in the first place — a larger chunk built on keyword-only retrieval still never gets selected if the query's wording doesn't overlap with the code's wording. Scope note: hybrid retrieval typically needs a re-ranking or score-blending step to merge lexical and semantic result lists sensibly. Operational check: sample queries using resident phrasing (not code terminology) and confirm the right regulation text now surfaces in the top results.