Gustavo Araujo Dunhão’s Post

User asks: "How many PTO days do new employees get?" Your single-store RAG retriever returns 4 chunks: one HR policy, one refund clause, one termination paragraph, one webhook config. The LLM cheerfully blends them. The answer sounds great. It's also wrong. That's context pollution — and it's what kills most RAG solutions. The fix is simple! Separate your knowledge into multiple stores, and route to the right one. The solution looks like this: → One VectorStore per domain (FAQ, Legal, Tech, HR) → One shared embedding model (don't get clever here) → One cached QuestionAnswerAdvisor per store, built in @PostConstruct → A router decides which advisor to use — then it's the same .advisors(...).user(...).call() recipe Just published Post 8 of my Spring AI RAG series — Multi-Document RAG: Multiple Collections, Smart Routing, and Cleaner Top-K. Read the full post: https://lnkd.in/duvRz_Ds #SpringAI #RAG #Java #SpringBoot #LLM #AIEngineering #VectorDatabase

  • graphical user interface, text

To view or add a comment, sign in

Explore content categories