Embedding test: RAG ranks the no-refund policy first, showing models still matter

galratner · reddit · 2026-09-25

The author embedded two contradicting refund policies with nomic-embed-text and queried "Can I get my money back if I cancel my wedding?" The no-refund sentence ranked first (0.7260 vs 0.7216), and across five phrasings the pair never differed by more than 0.02. Embeddings encode what a text is about, not whether it says yes or no; vector search also has no concept of "no match" — something is always nearest.

Citing a Stanford/Yale preregistered study of 202 legal queries: Lexis+ AI hallucinated on more than 1 in 6 queries, Westlaw's AI-Assisted Research on 1 in 3, with reasoning errors contributing to 61% of Westlaw's hallucinated answers — while retrieved results often looked relevant.

The author runs a production AI wedding-planner agent (Claude Opus via Microsoft.Extensions.AI, a .NET 10 MCP connector to the booking system, Sonnet fallback on API overload) and argues retrieval decides what the model sees, but weights decide what it does: spotting contradictions, applying policy precedence, admitting ignorance. Asks whether rerankers can reliably separate such contradictions; reproduction code included (C#, TextSearchProvider, SQL Server 2025 vectors, DiskANN read-only gotcha).

Original post →

More from coding & agent

coding & agent channel →