Enhancing RAG Accuracy with IdentityRAG
TL;DR: Standard RAG pipelines retrieve fragments of customer data without knowing that βS. Johnson,β βSARA JOHNSON,β and βsarah@johnson.meβ are the same person. IdentityRAG inserts a Tilores entity resolution step before retrieval: records are resolved into a complete golden record in under 150ms, and the LLM answers from unified, deduplicated context rather than partial data.
| Dimension | Standard RAG | IdentityRAG |
|---|---|---|
| Retrieval method | Vector similarity on raw text | Identity resolution + golden record assembly |
| Handles name/email variation | No: misses low-similarity variants | Yes: probabilistic fuzzy matching across systems |
| Cross-system deduplication | Not performed | Resolved at ingestion; retrieved at query time |
| Result quality | Partial data; may miss linked records | Complete, deduplicated customer context |
| Latency | Vector index lookup | Tilores resolution in <150ms |
| LangChain compatibility | Standard retriever interface | Drop-in TiloresRetriever |
On this page
- The Problem with Standard RAG for Customer Data
- How IdentityRAG Works
- Integration with LangChain
- Beyond Vector Databases
- Amazon Bedrock Integration
- Try It Yourself
- Frequently Asked Questions
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.
To understand how identity resolution works under the hood, see what entity resolution is and how it applies to KYC and Customer 360. For a deeper look at how LLMs can leverage entity resolution natively, see whether LLMs can be used for entity resolution.
Integration with LangChain
IdentityRAG is implemented as a LangChain retriever, making it drop-in compatible with existing LangChain applications:
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.
For a broader comparison of what identity resolution adds beyond what vector databases can do, see Beyond Vector Databases. If you want to build this capability yourself, this guide covers how to build your own identity resolution system.
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.
Does IdentityRAG Outperform Standard RAG for Customer Data?
Yes, for structured customer data with identity attributes. Standard RAG retrieves based on text similarity, so name variants, email addresses, and cross-system records for the same person are silently missed. IdentityRAG resolves those identities first, assembles a complete golden record, and gives the LLM accurate, deduplicated context. The comparison table above shows the full breakdown by dimension.
FAQ
What is IdentityRAG and how does it differ from standard RAG?
IdentityRAG adds a Tilores entity resolution step before the LLM retrieval stage. Standard RAG searches a vector database for text similarity and may miss records belonging to the same person if they are spelled differently across systems. IdentityRAG resolves identity first using probabilistic fuzzy matching, assembles a complete golden record from all source systems, then passes that unified context to the LLM.
Why does vector similarity fail for structured customer data?
Vector similarity finds records that look similar in text. A record for βSARA JOHNSONβ in an ERP system has near-zero text similarity with βsarah@johnson.meβ in a support ticket, so a vector search misses the link even though both records belong to the same customer. Entity resolution uses identity attributes (name, email, phone number, address) and probabilistic matching to find those cross-system links regardless of spelling or casing variation.
How does IdentityRAG integrate into a LangChain application?
IdentityRAG is implemented as a LangChain retriever (TiloresRetriever from the langchain-tilores package). You pass it to RetrievalQA.from_chain_type as the retriever argument. The retriever handles the Tilores API call, entity resolution, and golden record assembly automatically so the LLM receives complete, deduplicated customer context with every query.
Does IdentityRAG work with Amazon Bedrock?
Yes. IdentityRAG 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.
Where can I find the IdentityRAG source code and get started?
The complete IdentityRAG implementation is available as an open-source example on GitHub at tilotech/identity-rag-customer-insights-chatbot. Install the Python SDK with pip install tilores-sdk and the LangChain integration with pip install langchain-tilores. A free tier is available at app.tilores.io/signup.
See it on your own data: book a demo for a walkthrough on your records, or get the evaluation build to try resolved entity data locally.
See what resolved entity data does for your business β and your AI.