A pharmaceutical company deploys a RAG system over 500,000 clinical trial documents. Researchers query the system for drug interaction information. The team discovers a critical production issue: when a researcher asks about Drug A + Drug B interactions, the system correctly retrieves interaction documents but Claude's response occasionally incorporates information from Drug A + Drug C interactions retrieved in the same batch (documents about Drug A are semantically similar regardless of the co-drug). Precision on the Drug A + Drug B specific queries is 61%. What retrieval architecture change most directly improves precision for compound-specific queries?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Here's the deal — mandatory keyword pre-filtering on both drug names is the architecturally correct solution for compound-specific query precision. The problem is that Drug A documents (regardless of co-drug) are semantically similar, causing Drug A+C documents to rank highly for Drug A+B queries.
Full explanation below image
Full Explanation
Mandatory keyword pre-filtering on both drug names is the architecturally correct solution for compound-specific query precision. The problem is that Drug A documents (regardless of co-drug) are semantically similar, causing Drug A+C documents to rank highly for Drug A+B queries. Vector similarity cannot distinguish between these because 'Drug A interaction' is semantically close to 'Drug A interaction' regardless of the co-drug context. A pre-filter requiring both 'Drug A' AND 'Drug B' appear in the document eliminates Drug A+C documents from consideration before semantic ranking even runs. This is the hybrid retrieval pattern applied correctly: keyword filtering for specificity, vector similarity for relevance within the filtered set. Option A (query expansion) retrieves more Drug A documents, worsening the co-drug contamination problem by increasing recall for all Drug A interactions. Option C (smaller chunks) may help by making individual chunks more drug-pair specific, but a 200-token chunk from a Drug A+C interaction paper still gets retrieved if it's semantically similar to Drug A+B queries. Option D (post-retrieval Claude scoring) uses a second LLM call with the same semantic understanding that produced the original retrieval errors — it may not reliably filter Drug A+C documents for Drug A+B queries.