The knowledge base is the content your bots look at when they answer customer questions: product details, return policies, frequently asked questions. You keep it in collections. Every entry you add is made searchable, and the bot matches the customer’s question to the closest entries by meaning, not word for word. When you change an entry, bots use the new information.
Create a collection
- Open Knowledge base.
- If you don’t have a collection yet, type a name in Collection name (for example “Product details”). If you already have collections, select New collection in the list on the left.
- Select Create collection. The collection opens, ready for content.
Keeping topics in separate collections makes things easier: for example one each for products, shipping and returns. In a bot flow you choose which collection each step searches.
Add content
In the collection, select Add source and pick one of two ways:
| Way | What happens |
|---|---|
| Upload a file | What happensA TXT, Markdown, CSV or Excel file, up to 10 MB. A text file is split into chunks of about 1,000 characters, and each chunk becomes an entry. In a spreadsheet each row becomes an entry; the first row needs key (required), name and description columns. |
| Write it yourself | What happensYou enter one question and answer: Title or question (required), Name (optional), Content and Extra fields. |
- If you’re uploading, choose or drop the file.
- If the collection already has entries, choose Add on top or Replace all with this file under Existing entries. Replacing deletes the current entries for good, and you’re asked to confirm.
- Select Import file. The number of entries added is shown.
When writing an entry yourself, put the information the bot should use in Content, clearly and completely. Extra fields keep details such as price, link or stock code separate, and you can use them as variables in a bot flow. Save with Add entry.
Entry statuses
- Processing: the entry is being made searchable. This usually takes seconds, longer for large files. It keeps going even if you close the page.
- Ready: the bot can find this entry.
- Not searchable: the entry has no text to search. Every field turned on in the collection settings is empty for it. Add content or turn on another field in the settings.
In the entry list you can search titles and content and filter by source (written by hand, text file, spreadsheet file) and status. Click an entry to edit it, or remove it with Delete entry.
Collection settings
- Description: a short note on what the collection holds.
- Fields used in search: which fields of an entry the bot looks at when matching: Title, Name, Content. At least one must be on. If you change them, all entries are processed again (Save and reprocess), and the bot may find incomplete results meanwhile.
- Delete collection: deletes the collection and every entry in it. Bot steps that search this collection stop finding results.
Using it in a bot
A bot uses the knowledge base through the Search knowledge base step in a flow (in the palette’s AI group). A typical setup:
- Get the customer’s question with Ask for text, or use the message that started the chat.
- Add a Search knowledge base step. Pick the collection in Knowledge base and put the question in Text to search (usually
{{var_system.user_input}}). - Set how many entries come back with Max results (for example 3) and how close they must be with Minimum similarity (between 0 and 1, for example 0.5). Use Save result to write the results to a variable.
- To turn the entries into a natural answer, add an Ask ChatGPT step and use that variable in the prompt. Then send the answer to the customer with Send message.
- When nothing suitable is found, hand the chat to your team with Hand over to agent.
Searching the knowledge base and bot answers from it use no credits; even if you run out, the bot keeps answering from here in open chats the customer started. The Ask ChatGPT step runs on your own OpenAI connection; see Integrations.
Common questions
Frequently asked
key column, and it must be filled in on every row. Check the column names and upload the file again.