Enhancing RAG Accuracy with IdentityRAG
Retrieval-Augmented Generation (RAG) has transformed how enterprises build AI applications. But there’s a fundamental problem that vector databases alone can’t solve: your customer data is fragmented.
When an LLM retrieves customer context from a vector database, it gets fragments — a CRM record here, a support ticket there, an order from a third system. These fragments often belong to the same customer but the LLM doesn’t know that. The result is incomplete, sometimes contradictory answers.
IdentityRAG solves this by adding an identity resolution layer before retrieval.
The Problem with Standard RAG for Customer Data
Consider a customer support chatbot. A user asks: “What’s Sarah Johnson’s order history?”
In a standard RAG setup, the system searches the vector database for records matching “Sarah Johnson.” It might find:
- A CRM record for “Sarah Johnson” with her email and account details
- An order for “S. Johnson” from Shopify — but the vector similarity isn’t high enough to retrieve it
- A support ticket from “sarah@johnson.me” — retrieved, but the LLM doesn’t know it’s the same person
- An ERP record for “SARA JOHNSON” — missed entirely due to different casing and slight name variation
The LLM answers based on partial data. It might report 3 orders when the customer actually has 14. It might miss that this customer has an open support ticket. The answer is technically correct based on what it retrieved, but factually incomplete.
How IdentityRAG Works
IdentityRAG adds a Tilores entity resolution step to the RAG pipeline:
- User query arrives — “What’s Sarah Johnson’s order history?”
- IdentityRAG extracts identity attributes — name: “Sarah Johnson”
- Tilores resolves the entity — finds all records across all systems that belong to this person (in <150ms)
- Golden record created — unified profile with all 14 orders, 2 email addresses, 4 source systems
- LLM generates response — based on the complete, deduplicated customer view
The key difference: instead of searching for similar text in a vector database, IdentityRAG uses Tilores’s fuzzy matching to find all records that belong to the same real-world person — regardless of how their name is spelled, which email they used, or which system the record came from.
Integration with LangChain
IdentityRAG is implemented as a LangChain retriever, making it drop-in compatible with existing LangChain applications:
`[python] from tilores import TiloresAPI from langchain_tilores import TiloresRetriever
Initialize
tilores = TiloresAPI.from_credentials() retriever = TiloresRetriever(tilores=tilores)
Use in a chain
chain = RetrievalQA.from_chain_type( llm=your_llm, retriever=retriever, chain_type=“stuff” )
Query
result = chain.run(“What’s Sarah Johnson’s order history?”)`
The retriever handles the Tilores API call, entity resolution, and golden record assembly automatically. Your LLM gets complete, deduplicated customer context with every query.
Beyond Vector Databases
This isn’t about replacing vector databases — it’s about complementing them. Vector similarity is excellent for semantic search, document retrieval, and unstructured content. But for structured customer data with identity attributes, entity resolution is more accurate than vector similarity.
Vector similarity would give you records that “look similar” to “Sarah Johnson.” Entity resolution gives you all records that belong to Sarah Johnson — even “SARA JOHNSON” in the ERP system that has zero text similarity with “sarah@johnson.me” but shares the same phone number.
Amazon Bedrock Integration
IdentityRAG also works with Amazon Bedrock via the LangChain Bedrock integration. This means you can use Claude, Titan, or any other Bedrock-hosted model with identity-resolved customer context — all within AWS’s security and compliance boundary.
Try It Yourself
The complete IdentityRAG implementation is available as an open-source example:
- GitHub: tilotech/identity-rag-customer-insights-chatbot
- Python SDK:
pip install tilores-sdk - LangChain integration:
pip install langchain-tilores
Want to add identity-resolved context to your AI application? Start with the free tier and connect your LLM in minutes.
Ready to try entity resolution?
Start Building Free →