DEV Community

Discussion on: Your AI Memory System Can't Tell a River Bank from a Savings Account

Collapse
 
automate-archit profile image
Archit Mittal

The bank/bank disambiguation problem is a great framing. One approach that's worked well for me in production RAG: store two embeddings per chunk — one from a general model, one from a domain-specific fine-tuned model — and use a reranker to fuse scores. The financial model will correctly distance "river bank" from "savings account" even when the general model confuses them.

Adding entity-typed metadata (extracted at ingestion with an NER pass) also helps — you can filter to entity_type=FINANCIAL_INSTITUTION before the vector search even runs.