![](https://cdn.prod.website-files.com/637e5037f3ef83b76dcfc8f9/660ad3284901d501760e58ab_ProvidingAccurateAnswers.webp)
When do chatbots need to provide accurate answers?
When users ask questions about topics like the price of a given item, or the date of an event, it’s important that your chatbot provides accurate, reliable answers. This is what we call structured or organized data. LLMs are great for querying vast amounts of unstructured data, typically found in documents like PDF and plaintext files, but programmatic queries are much better suited to organized data (think things like tables and spreadsheets).
Step 1: Organize information in a Table
The best way to ensure that your bot can answer questions like these accurately is to structure your data in a Table. That’s because information like price is associated with a specific item — in other words, you’re working with structured data.
Your Botpress bot can parse through unstructured data like PDFs and plaintext files for loosely formatted information — think of things like return policies or company history. On the flip side, if your user wants to know the price of a latte, Botpress bots work best when that information is provided to them in a structured format (i.e., a Table).
Let’s take a look at an example.
Create a Table in the Botpress Cloud Studio.
![](https://cdn.prod.website-files.com/637e5037f3ef83b76dcfc8f9/6504baee33c7195ef1fdc171_1.webp)
Input your information. In this example, I’ll be importing a CSV that lists menu items for a fictional coffee shop, along with their prices and the number of calories each items contains.
Step 2: Create a Knowledge Base
When users ask your bot a question, your bot will answer based on the information it has in its Knowledge Base.
For this example, let’s designate the Table we just created as a Knowledge Base.
![](https://cdn.prod.website-files.com/637e5037f3ef83b76dcfc8f9/6504baf574016de6eba9031f_2.webp)
What we’ve done is indicate to our bot that when users ask questions about specific items, like how much something costs, it should first find that item’s specific record in our Table, and then provide the information listed in the Price column.
Step 3: Set up user queries
The final step is to allow your user to ask your bot questions.
In the below example, we place a Raw Input Capture Card in a standard node, but there are plenty of ways you can get creative in the way you prompt your user to ask questions.
![](https://cdn.prod.website-files.com/637e5037f3ef83b76dcfc8f9/6504bafe6635418e428602bf_3.webp)
In this blog, we demonstrated a pretty simple example, but Botpress Tables can store thousands of rows, including things like vast databases of engineering tickets.
Botpress bots also support natural language searches on those databases, so you can search for things like engineering tickets related to navigation, for example.
Frequently Asked Questions
Will my bot’s answers reflect changes I make to my Table?
Yes, your bot’s answers will reflect the current version of your Table, even if you’ve added records to it after creating it and designating it as the data source for a Knowledge Base.
Can I import CSVs directly into Botpress?
Yes, you can use the “Import CSV” button to import your data source directly into Botpress.
What kinds of information can I store in columns?
You can store text (string), numbers, boolean variables (yes/no), and dates.
Is there a limit to Table rows?
Botpress provides free bots with 5,000 rows. You can purchase additional storage for a fee.
Can we update Tables via API?
Support for dynamically updating Tables via API is in the roadmap.
Table of Contents
Stay up to date with the latest on AI chatbots
Share this on: