Prepare knowledge-base files

Prepare clear knowledge-base files so that the bot finds the right information without inventing answers.

A knowledge base is a collection of files that the bot can use in its responses. Answer quality depends less on the number of documents than on how easily the bot can find a clear, unambiguous fact.

What to include

Suitable materials that help to advise the client:

  • company description and contact details;
  • products, services, and specifications;
  • prices and payment terms;
  • delivery, return and guarantee;
  • instructions and answers to frequent questions;
  • booking or service rules.

Do not upload passwords, tokens, internal secrets, or unnecessary customer personal data. The bot can use any content in a connected file when answering a user.

Keep one topic per file

Do not combine a catalog, delivery policy, warranty, and internal instructions in one large document. Split the information into files such as:

  • About the company;
  • Product catalog;
  • Delivery and pickup;
  • Payment and returns;
  • Warranty.

This makes it easier for ChatRex to select the right source and for your team to update one topic without affecting another.

How to prepare a text

  1. Start with a clear title.
  2. Divide the material into short semantic blocks.
  3. Use lists for terms and conditions.
  4. Sign each column in the tables.
  5. Specify units of measure, currency, and terms of validity.
  6. Remove repetitions and contradictions.

Example:

# Delivery

## Courier delivery in London

- Price: $10.
- Free for orders over $200.
- Delivery time: 1–2 business days.

## Pickup

- Address: 10 Example Street, London.
- Opening hours: daily from 10:00 to 20:00.
- Orders are held for 3 days.

Avoid vague statements such as “Delivery is usually fast and sometimes free.” They do not provide an exact price, timeframe, or free-delivery condition.

File name and purpose

The title should immediately show the topic: Delivery and pickup, not Document 1.

In the File purpose field, briefly state what the file contains and which questions it should answer.

Example:

Delivery conditions: regions, timeframes, cost, free delivery, pickup, and how long orders are held.

Do not use the same purpose for every file. ChatRex uses this description to select the document that best matches the question.

Tables

For a catalog or price list, use clear columns:

Service Price Duration Note
Consultation $30 30 minutes By appointment
Procedure A $100 60 minutes Consultation required

If there are several tables or sheets in the file, explain their purpose at the beginning of the document.

Rules for a main instruction

Explain to the bot when to access the files and what to do if there is no answer.

## Working with the knowledge base

Use the knowledge base for questions about the company, services, payment,
delivery, returns, and warranty.

Answer only from the information you find. Do not invent prices,
dates, addresses, or conditions. If there is no exact answer, say so
and offer to hand the question over to a team member.

If prices or schedules need to come from integration, explicitly forbid taking them from files. The separation of sources is described in detail in the article Interaction of a prompt with a knowledge base.

Test after uploading

Ask the bot at least five questions:

  1. a direct question whose answer is in the file;
  2. the same question phrased differently;
  3. a question that could match two documents;
  4. a question about an outdated or missing fact;
  5. an off-topic question.

Confirm that the bot uses the correct source, does not mix terms from different documents, and clearly reports when information is unavailable.

What to do next

Create a repository and add prepared documents according to the instructions Manage storage and files.