Justy: If your agent grabs the wrong doc, the mistake doesn't stay small. It kind of multiplies. Justy: You're listening to Exploring Next, episode 332. I'm Justy, in Cody's kitchen again, a little under-caffeinated, and today we're talking about RAG precision tuning backfiring. Cody: Yeah, and this matters right now because a lot of teams moved from plain chat answers to agents that fetch, reason, and then do something. If retrieval slips, the whole chain gets shaky. Justy: That's the part real product teams feel. A search miss is annoying. An agent confidently using the wrong contract clause or policy snippet, that's a support ticket, a trust hit, maybe a rollback. Cody: The Redis research is pretty specific. They looked at what happens when you fine-tune embedding models for compositional sensitivity, meaning the model gets better at noticing sentences that look almost the same but mean different things. Like role reversals, negation flips, that kind of thing. Cody: And the weird part, Justy, is the tuning helped on that narrow task but hurt general dense retrieval. They reported about an 8 to 9 percent drop on smaller models, and a 40 percent drop on a mid-size embedding model people actually use in production. Justy: Forty is not a rounding error. [sighs] That's the sort of number where a team thinks it improved quality, ships it, and only later notices search feels... off. Cody: Right. The geometry story makes sense to me. A dense embedding compresses a whole sentence into one point in vector space. That works well for topic matching. But if two sentences share almost all the same words, even with opposite meaning, they still land near each other unless you spend representational capacity separating them. Cody: So now the same vector is trying to do broad recall and exact structural discrimination. Those goals compete. The paper's claim is basically that you're borrowing space from recall to buy precision on a narrow set of failures. Justy: Which sounds very enterprise, honestly. The buyer says, hey, can you stop confusing 'approved' with 'not approved.' Totally fair ask. But the hidden cost is you might get worse at finding the right material across the rest of the corpus. Cody: Exactly. And the regression wasn't even evenly distributed. Negation and spatial flips got better. Binding errors barely improved. That's the nasty one where the system mixes up which modifier or obligation belongs to which entity. In contracts or finance, that's not a small miss. Justy: Yeah, that's the adoption barrier for me. The people who most need precision are the same ones who can't tolerate extra latency or weird edge cases. Legal, accounting, internal knowledge tools with approvals. They need boring reliability. Cody: The paper also tested the usual fixes. Hybrid search doesn't solve this because both sentences contain the same words. Keyword matching can't tell 'Paris is closer than Rome' from the reverse. Same tokens, different structure. Cody: MaxSim or late interaction, like the ColBERT style approach, improved relevance benchmarks but still gave structural near-misses almost identical scores. That's a really important distinction. Relevance is not identity. I think teams blur those together. Justy: I do wonder, though, whether some teams hear this and overreact. Most customer support bots probably don't need a heavy verifier on every query. I could be wrong, but for a lot of use cases, speed still wins. Cody: I think that's fair. The research isn't saying RAG is dead. Actually the opposite. Basic RAG is still the easiest thing to productionize. The warning is more narrow: don't assume a fine-tuned embedding plus a nice eval score means you're safe in production. Cody: Their proposed fix is two-stage. Keep dense retrieval for recall. Fast, broad, cheap. Then run a small Transformer verifier on the returned candidates, at token level, so it can catch negation flips or role reversals before the agent uses that context. Justy: So product-wise, that's easier to swallow than a full rebuild. You keep your current retrieval stack, then add verification only where being wrong is expensive. Maybe every query for contract review, lighter checks for general search. Cody, that feels realistic. Cody: Yeah. Cross-encoders can do that kind of deep comparison too, but the article says they break at real query volume. The verifier idea is basically the compromise. More compute where it matters, not everywhere. You can't just scale your way out with a bigger embedding model. Justy: Build Next, if you want to play with this over a weekend: start with a small corpus and intentionally create near-miss pairs, like negations and swapped entities. Index them in Redis or Qdrant, then compare plain dense retrieval against ColBERT-style reranking. Cody: And for concrete tools, try PyLate with ColBERT for late interaction, Sentence Transformers for your baseline embeddings, and a cross-encoder from Hugging Face as the verifier. Even a simple command like `python -m sentence_transformers` to benchmark retrieval on your synthetic set gets you somewhere fast. Justy: Solo builder version: make a tiny eval harness. Twenty docs, twenty tricky queries, score correctness before and after any fine-tune. [chuckles] Super unglamorous, but that's how you catch the quiet regressions. Justy: That's episode 332 of Exploring Next. If your retrieval got a little too confident, maybe check the kitchen math before you trust the agent.