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).
ā
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.
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.
ā
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.
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.
ā
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.
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.
ā
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.
Yes, you can use the āImport CSVā button to import your data source directly into Botpress.
You can store text (string), numbers, boolean variables (yes/no), and dates.
Botpress provides free bots with 5,000 rows. You can purchase additional storage for a fee.
Support for dynamically updating Tables via API is in the roadmap.
The first set of analytics that is important to admins are generic usage statistics. Is the bot used, on what devices...
The People of Botpress is a series where we highlight our people and the great work they do by talking about life at Botpress. In this edition of The People of Botpress, we interview our Chief Financial Officer, Jean-Bernard Perron
A new place to master Botpress, chatbots, and conversational AI.