harsh-harlequin
harsh-harlequin3mo ago

AI responses often inaccurate - any tips to reduce hallucinations?

Really love Voiceflow - amazing tool with great UX and flexibility. But I keep running into one issue that’s becoming a dealbreaker: hallucinations in AI responses. When I ask my agent about prices or specific product features (based on a KB crawled from my website), it often gives wrong or made-up answers. I’ve tested the same KB with a few competitor tools, and the responses there were consistently more accurate. I still prefer Voiceflow overall, but this accuracy issue is hard to ignore. Anyone else dealing with this? Any tips from the community on improving response reliability? PS: I'm using GPT-4o for most of my AI responses.
9 Replies
W. Williams (SFT)
We would need a bit more info about your KB. Our company also uses 4o, and we see almost zero hallucinations. Usually, this is due to the prompt or the KB data. Also, are you using the Agent or Search/Prompt steps?
majinnboo
majinnboo3mo ago
Most AI systems with website scraped data tends to become problematic. There are lots of ways to make the data more accurate. Simply typing the information in your knowledge base helps. To get really detailed you can add tags to your metadata and filter responses. So you can ask clarifying questions if your user asks about pricing and then reply with the proper knowledge base sections. They have great info on how to add tags in the docs within the API reference tab. Easiest way to begin would be to go to Upload Document (file) - post. And then add {"key":"value"} to the area right under the upload section. So for example if your tag was the color blue it would look something like {"tags":"blue"} At that point a tag should be on your knowledge base upload. From here you go to the Query API section, go to query and then scroll down a bit to find the filters - object section. Click on that to enter the tag values to filter results. The default values are newKey NewValue. The goal is to get the code from the curl request section at the upper right corner. should look something like { "chunkLimit": 2, "synthesis": true, "settings": { "model": "claude-instant-v1", "temperature": 0.1, "system": "You are an AI FAQ assistant. Information will be provided to help answer the user's questions. Always summarize your response to be as brief and concise as possible, keeping responses under a couple of sentences. Do not reference the provided material directly in your response.\n" }, "filters": { "tags": "blue" } } You can now but that into a post API request in voiceflow (body raw JSON) to get all uploads with the "blue" tag for higher levels of accuracy.
harsh-harlequin
harsh-harlequinOP3mo ago
I'm using both agent and Prompt steps depending on the intent. I see hallucinations in both cases. In KB I have my website scraped as all relevant that is on there. Nothing else added. In my prompt I have specifically added a section about prices, but without success: Prices ### When a user asks for pricing: - Only answer with the exact prices from knowledge base. - Use the prices exactly as shown, including all decimals, currency format, and temporary discounts. - For both Basic and PRO offering always include both the monthly price and the one-time setup fee. - Do not round, estimate, or invent any numbers. - If the user asks for discounts, politely state that prices are fixed. OK, this looks interesting. Thanks for the suggestion. I will try this out.
W. Williams (SFT)
@majinnboo I have never seen that you can add metadata/tags to an uploaded doc in the UI/VF account. I know you can do it via the API. Can you share a screenshot of you adding a tag that works with the Query API?
majinnboo
majinnboo3mo ago
It's just added via the docs when the file is uploaded. You can check the metadata tags from your VF account.
majinnboo
majinnboo3mo ago
screenshots
No description
No description
No description
W. Williams (SFT)
@majinnboo So you are using the API to add the metadata 🙂
majinnboo
majinnboo3mo ago
Yep
Steve B. | IntelleSync.ai
Just to add to this @W. Williams (SFT), here's how you can upload different types of documents with metadata via API https://docs.voiceflow.com/reference/filter-with-metadata
Voiceflow
Filtering with Metadata
Advanced Query Filtering Our new query filtering capabilities enable users to perform precise searches within their data using a robust set of operators. You can apply various filters to your data, such as: Equality and Comparison: $eq, $ne, $gt, $gte, $lt, $lte Array Operations: $in, $nin, $all Lo…

Did you find this page helpful?