Knowledge bases
Give your agent a memory full of your business — pricing, policies, FAQs, products — so it can answer accurately without hallucinating.
A knowledge base is the agent's reading material. You upload your menu, your service list, your FAQ, your policies — and the agent quotes from them when callers ask questions, instead of making things up.
Without a knowledge base, an agent only knows what's in your system prompt (a few hundred words at most). With a knowledge base, the agent can pull from thousands of pages of your specific business knowledge — but only the relevant bits, on demand.
When you need one
You probably need a knowledge base if your agent will ever be asked:
- "What are your hours?"
- "Do you offer X service?"
- "How much does Y cost?"
- "What's your cancellation policy?"
- "Do you have Z in stock?"
- "Where are you located?"
If the answer is not obvious from a 200-word agent prompt, put it in a knowledge base.
The mental model
Think of it as a librarian sitting next to your agent:
- The caller asks: "What's your gluten-free dessert?"
- The agent whispers to the librarian: "Find anything about gluten-free desserts."
- The librarian flips to the right page in your menu and hands back: "Flourless chocolate cake — $9, contains eggs and dairy."
- The agent answers the caller using that information.
The librarian (the knowledge base) does this in under a second, every time. The agent never sees your full menu — only the small relevant snippet for each question. That's why this scales: you can upload 500 pages and the agent stays fast.
What you can upload
| Format | Use for |
|---|---|
| Menus, brochures, service guides, policy documents, training manuals | |
Word (.docx) | Internal SOPs, employee handbooks |
Spreadsheet (.csv, .xlsx) | Price lists, inventory catalogs, locations table |
Plain text (.txt) | Quick notes, FAQs you've typed up |
| Q&A list | Question/answer pairs you already have written down |
| Web page (URL) | Your existing website pages — pricing page, FAQ, about page. We crawl and re-import on a schedule. |
You can mix and match — most knowledge bases have a few PDFs plus a couple of URLs plus a Q&A list. Upload anything you'd hand to a new employee on their first day.
Setting one up — step by step
1. Create the knowledge base
Dashboard → Knowledge bases → New.
Give it a name like "Restaurant menu", "Dental clinic FAQs", or "Pricing & policies". You can have multiple knowledge bases per organization — useful if different agents need different information.
2. Add your sources
Click Add source and pick:
- Upload file — drag in a PDF, Word doc, spreadsheet, or text file. Files up to 50 MB are processed in seconds.
- Add URL — paste a webpage URL. Nerva crawls it and re-checks for updates daily.
- Add Q&A — type questions and answers directly. Best when you don't have a document but you know the questions you want answered well.
You can add as many sources as you want. The system stays fast — adding more sources doesn't slow down the agent.
3. Wait for indexing
Each source goes through three steps:
- Parsing — extract the text (~5–30 seconds depending on file size).
- Chunking — split into ~200-word passages so the librarian can flip to the right page.
- Embedding — convert each passage into a "meaning fingerprint" so the search can find relevant content even when the words don't match exactly.
A green check mark means the source is ready. Failed sources show why (e.g., scanned PDF with no text, password-protected file).
4. Attach to your agent
Dashboard → Agents → your agent → Knowledge bases → Attach.
Select the knowledge base you just created. Save. Make a test call/chat and ask a question — the agent should answer using your content.
5. Test, refine, repeat
Ask 5–10 questions a real customer would ask. Check the call detail page in Conversations — each tool call shows you which chunks the agent retrieved. If a question got the wrong chunk, the source needs better content (clearer headings, more direct language) or you need to add a Q&A entry that answers it directly.
Concrete examples
Restaurant
A restaurant agent that takes reservations and answers menu questions:
The agent now answers: "What's your most popular vegan dish?", "Are you open on Christmas Day?", "Do you have parking?" — all from your own content.
Dental clinic
The agent can answer pricing questions, list accepted insurance, describe procedures, and book appointments — without you reading every script.
Home services (HVAC, plumbing, etc.)
SaaS product support
Tips for SMB owners
What to upload first
Start with these, in order:
- Your FAQ page or document — you already have it; questions customers actually ask are gold.
- Your pricing or rate card — even an old PDF works if you keep it accurate.
- Your hours, locations, and contact info — link your "Contact" page as a URL source.
- One representative document for each service or product line — menu, service list, product catalog.
That's a good first knowledge base. Add more as you find gaps in test calls.
Quality over quantity
A 5-source knowledge base curated from your best internal content beats a 50-source one full of outdated handbooks. The agent retrieves the most relevant passage, so old or low-quality content can crowd out the right answer.
Keep it current
- PDFs: re-upload when the content changes. Old version is auto-replaced.
- URLs: Nerva re-crawls daily. If your website is up to date, your knowledge base stays up to date.
- Q&A: edit any time in the dashboard. Changes apply on the next conversation.
What NOT to upload
- Internal documents you wouldn't show a customer — meeting notes, staff schedules, internal pricing strategy. The agent might quote them back.
- Auto-generated marketing copy — flowery language confuses the retrieval. Plain, factual content works better.
- Scanned PDFs without OCR — image-only PDFs can't be parsed. Run them through OCR first (Adobe, Preview, or any free tool).
- Personal data about real customers — if a document includes names, emails, or other PII, redact before uploading.
One knowledge base or many?
- One agent = one knowledge base is fine for most SMBs.
- Multiple knowledge bases make sense when you have very different audiences. Example: a chiropractor with both a patient-facing intake agent (knows about services, insurance, hours) and an internal staff agent (knows about clinic SOPs, vendor contacts). Each agent attaches to a different knowledge base.
Cost
- Embedding (one-time, when you upload): a few cents per document.
- Retrieval (every call): negligible — included in your plan.
You won't notice knowledge-base costs unless you upload thousands of documents. SMBs typically spend less than $1/month total on KB indexing.
How the agent uses it
You don't have to do anything special in your agent's system prompt — when
a knowledge base is attached, Nerva automatically gives the agent a
knowledge_base_query tool. The agent decides when to use it.
If you want to encourage the agent to use it more aggressively, add a line like this to your prompt:
Always check the knowledge base before answering questions about pricing, hours, services, or policies. Do not guess — if the knowledge base does not have the answer, say "Let me transfer you to someone who can help."
That single line is the difference between an agent that occasionally hallucinates and one that consistently grounds its answers in your data.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Agent says "I don't have that info" but it's in your doc | The doc was uploaded but the relevant passage is buried in long paragraphs | Add a Q&A entry that directly answers the question, or restructure the source with clearer headings |
| Agent quotes outdated info | Old version of the source is still indexed | Re-upload the source; old chunks are automatically replaced |
| URL source shows "Failed to crawl" | Page is behind a login wall or blocks bots | Upload the content as a PDF instead, or add the answer as a Q&A entry |
| Agent gives the wrong answer for a specific question | Multiple sources have conflicting info | Find and remove (or update) the conflicting source, or add a high-priority Q&A that clarifies |
| Agent never uses the knowledge base | The system prompt doesn't encourage retrieval | Add a line like the one in How the agent uses it |
Per-call visibility
Open any call's detail page in Conversations. The transcript shows each tool call the agent made — including knowledge-base lookups. You'll see:
- The exact query the agent searched for
- Which source chunk(s) came back
- A relevance score for each chunk
This is the single best place to debug "why did the agent answer that way?" — you can see exactly what it read.
See also
- Voice agents — voice-specific KB usage
- Chat agents — chat-specific KB usage
- Agent tools — the
kb_querytool that powers KB retrieval