RAG and AI assistants
Knowledge graph vs RAG: what does an AI agent need?
An agent does not need to know everything. It needs to know where to look, and how to ask.
Short answer
In the knowledge graph vs RAG choice, most AI agents in a live product need tools first: search, filters and actions that call your existing systems and return fresh data. Plain vector RAG suits questions answered by a few similar passages. A knowledge graph earns its cost when answers depend on relationships across many entities, such as companies, events and market factors. Start with a simple tool-using agent, and add a graph only where questions need connected context.
On this page
01Knowledge graph vs RAG vs tools for agent context
When an agent answers a question or takes an action, it needs context it was not trained on. There are three common ways to give it that context, and they solve different problems.

Vector RAG. Documents are split into chunks, embedded and stored in a vector index. At query time, the most similar chunks are retrieved and passed to the model. The original research on retrieval augmented generation showed that pairing a model with a retriever makes generated answers more factual. It works well when the answer sits in one or two passages.
Knowledge graph. Entities such as companies, people, products and events are stored as nodes, and their relationships as edges. The agent can follow those links to gather connected facts. Microsoft Research's work on GraphRAG showed where this helps. Baseline vector retrieval struggles when an answer requires connecting separate pieces of information through shared attributes, or when a question asks about themes across a whole dataset. A graph built from the data handles those cases better.
Tools. The agent calls defined functions: search with filters, look up a record, create a lead, book an appointment. Each tool reads from or writes to your live systems. Tools give the agent fresh, structured data and the ability to act.
| Need | Vector RAG | Knowledge graph | Tools |
|---|---|---|---|
| Answer from a few matching passages | Strong | Overkill | Possible via a search tool |
| Connect facts across many entities | Weak | Strong | Weak unless tools are joined |
| Data that changes hourly | Needs frequent reindexing | Needs frequent updates | Strong, reads live data |
| Exact filters such as price, size, location | Weak | Moderate | Strong |
| Take an action in the product | No | No | Yes |
| Build and maintenance effort | Low | High | Moderate, mostly reuses APIs |
02Why we usually start with tools
In an established product, the most valuable context already lives in your systems, with structure and permissions attached. A product catalog has prices and filters. A CRM has leads and owners. An inventory feed has stock levels that change every hour. Copying all of that into an embedding index loses structure and goes stale. Exposing it as tools keeps it live and keeps your permission checks in place.

Anthropic's guide to building effective agents makes the same point from a different angle: start with the simplest solution that works, add complexity only when it clearly improves results. It also advises putting as much care into tool design as into prompt design. Clear tool names, well documented parameters and tools that are hard to misuse matter more than an elaborate orchestration graph.
That leads to our usual order of decisions:
- 01
List the questions and actions the agent must handle.
Use real user prompts, not invented ones.
- 02
Map each one to a source of truth.
A database, an API, a search index or a set of documents.
- 03
Expose live, structured sources as tools.
Search with filters, record lookups and actions.
- 04
Add vector search for unstructured content.
Website pages, help articles and documents, usually as one more tool.
- 05
Add a knowledge graph only for relationship questions.
When users ask how things connect, and the tools cannot answer without many chained calls.
- 06
Keep the orchestration as simple as the tasks allow.
Every extra node in an agent graph is one more place for context to be lost.
03What we see in production
Take a white-label AI sales assistant for dealership websites serving RV, marine and vehicle dealers. The agent has to talk like a salesperson, recommend real units from a live inventory feed, explain why, qualify the buyer and hand a complete lead to the dealer's CRM. Inventory changes hourly, and answers must never invent stock or prices. Buyers ask in natural language, with follow-ups, towing questions, payment budgets and location limits.
The architecture changed as we learned from real dealer tests. Early on, inventory was handled by an agent reading a CSV file. We replaced it with inventory search backed by Elasticsearch, with an hourly sync from each dealer's feed.
The first conversation flow was a multi-node LangGraph graph. Early dealer tests showed context loss and wrong vehicle classes. In the second sprint we simplified the flow by removing nodes and adding a search tool call. Later we rebuilt it around a tool-using agent with three kinds of tools: a lead capture tool, vector similarity search, and Elasticsearch filter tools for exact constraints such as price, class and location. Conversation state is kept in a PostgreSQL checkpointer, and every answer is grounded in the dealer's own feed and website. The assistant has been live for client dealerships in the U.S. and Canada since about January 2026, with leads and appointments flowing into the client's CRM.
No knowledge graph was needed there. The questions were about matching a buyer to units under exact constraints, which is a filter and search problem.
A retail sales assistant we built needed no graph either. Its flow searches document embeddings, runs CSV agents and queries the client's database at the same time. An aggregator node merges the results into one answer, because shoppers asked for product facts and side by side comparisons.
On an AI market intelligence app for retail investors, which we built for a fintech venture, the questions were different. Users wanted to know how news, filings, macro indicators and companies relate to each other and to their portfolio. There, a knowledge graph links companies, news and market factors so answers carry context, specialist agents for research, signals, trading and portfolios sit behind one conversational agent, and chat answers cite their sources. The graph was worth its cost because relationships were the product.
The contrast is the useful lesson. Same team, same agent framework, two different answers, chosen by the shape of the questions.
04Signs you need a knowledge graph
- Users ask how things are connected, not just what something is.
- Good answers require combining facts from many documents or records that share an entity.
- Users ask for themes or patterns across a whole dataset.
- You can name the entities and relationships clearly, and they are stable enough to maintain.
05Signs you need tools first
- The data is already structured in your product's database or APIs.
- The data changes often.
- Users need exact filters, such as price, date, size or location.
- The agent must take actions, such as creating a lead or booking a meeting.
- Answers must respect each user's permissions.
For most SaaS products adding their first agent, the second list is longer. Our article on how to add AI agents to existing SaaS without rebuilding explains how we turn existing APIs into safe agent tools. Our article on why AI agents fail in production covers what happens when the orchestration gets ahead of the data.
06Trade-offs to plan for
- Graphs need upkeep. Entity extraction, deduplication and relationship updates are ongoing work. Budget for it before you build one.
- Vector search misses exact constraints. A buyer who wants a unit under a set budget needs a filter, not a similarity score.
- Tools depend on API quality. Undocumented or inconsistent APIs make poor tools. Sometimes the first job is cleaning up the API.
- More nodes means more failure points. Simplifying an agent graph often improves accuracy, because there are fewer handoffs where context can be dropped.
Frequently asked questions
When does a knowledge graph beat vector RAG?
When answers depend on relationships across many entities. Microsoft Research's GraphRAG work showed that baseline vector retrieval struggles when an answer requires connecting separate pieces of information through shared attributes, or when a question asks about themes across a whole dataset. If users ask how things connect, and you can name stable entities and relationships, a graph can earn its cost.
Why start an AI agent with tools instead of RAG?
In an established product, the most valuable context already lives in your systems, with structure and permissions attached. Copying it into an embedding index loses structure and goes stale. Exposing it as tools, such as search with filters, record lookups and actions, keeps the data live, keeps your permission checks in place and lets the agent act.
Can an agent use tools, vector search and a knowledge graph together?
Yes. Our usual order is to expose live, structured sources as tools first, then add vector search for unstructured content such as website pages, help articles and documents as one more tool. A knowledge graph comes last, only for relationship questions. Keep the orchestration as simple as the tasks allow, because every extra node is one more place for context to be lost.
What does a knowledge graph cost to maintain?
Graphs need upkeep. Entity extraction, deduplication and relationship updates are ongoing work, so budget for it before you build one. The graph is worth that cost when relationships are the product, as in a market intelligence app that links companies, news and market factors. When questions are about exact constraints, filters and search do the job.
How Datics helps
Datics specializes in brownfield AI: bringing production AI into the product you already operate, without forcing a rebuild.
Related work
Case studies from our projects on the same subject.
Coast Technology
Automotive & Dealerships · AI sales assistant for dealers
RV shoppers get units from live stock, with towing fit computed, not guessed
Dealer sites offered static forms and filters. Now shoppers ask in plain words and get real units from the hourly feed, with the reason each one fits.
Cosmic AI
Financial Services · Multi-agent investing assistant
Retail investors go from research to a confirmed order in one conversation
Investors juggled data, news and a separate broker. Now agents research and prepare each trade in chat, and nothing is placed until they confirm.
FLZR
Retail & E-commerce · AI sales assistant
Shoppers compare products side by side, answered from the seller's live database
Shoppers needed product answers at any hour; now an AI assistant answers from the seller's documents, files and live database, with comparison cards.
More on RAG and AI assistants
RAG and AI assistants
How do you build a RAG chatbot on your knowledge base?
How to build a RAG chatbot on your knowledge base: a retrieval path per source, one merge step, and strict limits on what each assistant may read.
RAG and AI assistants
How do you stop hallucination in AI document extraction?
AI document extraction from long documents gets reliable with type detection, retrieval per field, clear field definitions and empty values, not guesses.
RAG and AI assistants
How do you make AI product search match how buyers shop?
AI product search works when it learns how buyers decide, such as a monthly payment budget, and turns that into precise filters over live inventory.
RAG and AI assistants
Fine tuning vs RAG: when should you train on your own data?
Fine tuning vs RAG: use retrieval when the model lacks facts, fine tune when it does a narrow task badly, and collect user corrections first.
RAG and AI assistants
What makes a good chatbot human handoff to a live agent?
How to design a chatbot human handoff: set escalation triggers up front, let admins set agent hours, and pass the full conversation to a shared inbox.
RAG and AI assistants
RAG evaluation: how do you test that citations hold up?
RAG evaluation must check more than whether citations exist. Test that each cited passage supports its claim and that answers decline when sources are silent.
Your customers already expect AI from your product.
Let us make it real without rebuilding what already works.
