A grounding requirement calls for exact, literal matching against a controlled vocabulary of clinic policy codes (e.g., a specific internal code like 'RX-HOLD-07') that pet owners' questions sometimes quote verbatim. Which search type is the better fit than a pure semantic approach, and why?
Select an answer to reveal the explanation.
Short Explanation
When pet owners quote an exact code, you want keyword search for literal matching rather than a “close enough in meaning” match. A semantic-only search could confidently return a similar-sounding but incorrect code, so exactness matters more than semantic similarity here.
Full Explanation
Keyword search is the best fit because an exact-code lookup depends on literal term matching: a vector-only search may retrieve a code that is semantically close in context but is the wrong specific code, creating a real accuracy risk. The claim that vector search always outperforms keyword search overgeneralizes; vector search is useful for meaning-based, paraphrase-tolerant retrieval, but it is not universally superior when exact literal matches are required. The claim that hybrid search is prohibited whenever exact codes are involved invents a restriction: hybrid search can be a reasonable middle ground when literal and semantic matching both matter, though keyword search directly fits this question’s contrast with pure semantic search. The claim that no retriever is needed because codes live in a controlled picklist assumes a storage arrangement the scenario does not establish; even if some codes were stored as picklist values, the question concerns grounding through search when quoted codes appear in the corpus. The exam caveat is to choose based on the matching need: favor keyword for literal matches, vector for semantic matches, and consider hybrid when both matter. As a practical check, verify whether the retrieved code matches the quoted code exactly rather than merely sounding similar.