Retrieval used to constrain what the model can output, rather than to feed it context, is the part worth pulling out - it turns an open generation problem into a closed one over a known taxonomy, and hallucinating a food category that does not exist in the catalogue simply stops being possible. Different failure surface entirely. The without onions half of that query is the interesting bit, because negation is where pure embedding similarity is weakest: not onions and onions sit close together in vector space since they appear in near-identical sentences. Mapping it to a structured exclusion filter is the only reliable handling, and it is a good argument for why an entity-and-constraint layer earns its place next to semantic search rather than being replaced by a bigger model. Worth noting the latency budget too - a search box has maybe a couple of hundred milliseconds before it feels broken, so an LLM in the hot path usually means the parse is cached per query pattern rather than run per keystroke.
Retrieval used to constrain what the model can output, rather than to feed it context, is the part worth pulling out - it turns an open generation problem into a closed one over a known taxonomy, and hallucinating a food category that does not exist in the catalogue simply stops being possible. Different failure surface entirely. The without onions half of that query is the interesting bit, because negation is where pure embedding similarity is weakest: not onions and onions sit close together in vector space since they appear in near-identical sentences. Mapping it to a structured exclusion filter is the only reliable handling, and it is a good argument for why an entity-and-constraint layer earns its place next to semantic search rather than being replaced by a bigger model. Worth noting the latency budget too - a search box has maybe a couple of hundred milliseconds before it feels broken, so an LLM in the hot path usually means the parse is cached per query pattern rather than run per keystroke.