https://retellai.com/?utm_source=discord&utm_medium=seo logo
The knowledge base is useless.
# ❓・bug-report
j
I am building a restaurant AI receptionist taking orders. I've put 100 dish names into a simple markdown text file (categories are marked with ## and dish names are just list items) and put it into my agent's knowledge base. Furthermore, I have set "Chunks to retrieve" to 10 and "Similarity Threshold" to 60% (like it mattered at all). Now the agent can only see 30-40% of the dish names. Often when asked, it does not know if a dish name is in the menu (the knowledge base) or not. It hallucinates then (even though it is instructed not to). Then I've instructed my agent that it is a debug mode, and asked it to list all the dish names. When testing it, it quoted only 30-40% of the total 100 dish names. I had to put them all into the prompt—now it sees them all! My question: isn't there something wrong with the knowledge base mechanism in Retell AI? What is the problem with it?
s
Hi @Jarek
it’s expected RAG behavior. The knowledge base uses semantic retrieval, so only a limited number of relevant chunks are surfaced per query, meaning many menu items are never seen by the agent. For complete, finite lists like restaurant menus, putting all items directly in the prompt is the correct approach.
Knowledge bases work best for contextual Q&A, not exhaustive lookups
j
Thanks for the info. Anyway, I feel a little disappointed. I understand that no change in it is planned.
s
I'll still confirm with the team , what they say about this
c
I feel there is definitely a problem with the retrieval mechanism. It really does not fetch the right responses though that information is exactly present in the Knowledge base. Like when I see the
top k
chunks, they do not even contain the right information.
I read that but even in RAG, when done using
cosine similarity
, it will retrieve very similar information and sometimes it did not retrieve that so.
c
The best way to get accurate information is to load it by chunks
Main dishes, side dishes, modifiers, etc
All pricing should be pulled directly from your backend and not stored in an RAG
c
Sorry you meant not stored in a RAG but fetched from the backend ? Why is that ? Can’t I mention the pricing in the KB ?
c
It’s to ensure 100% accuracy, if you just store the names in the prompt then fetch all the details, you ensure best accuracy
c
Okay, so you actually suggest to store certain information in our own database rather than the KB ? Also, I would like to know what other information do you suggest should be and should not be stored in the KB. Also, is it an Agentic RAG or a normal RAG for the Knowledge base on retell ?
j
What I did, for a restaurant: 1. All the dish names and categories are in the prompt. 2. All the dish details (ingredients, prices) are in a Google Sheet and there are a few n8n automations to fetch data: details, summaries, even suggestions (if the agent cannot suggest something based on a name). Knowledge base is just for some basic info like opening hours, address, etc. Seems to work well.