Prompt to work with the knowledge base
A connected knowledge base does not replace a bot instruction. In the system prompt, you need to explain what questions to use files for and what to do if there is no exact answer.
Connect the vault first.
- Open My Bots and press Change.
- On the Basic tab, select the storage in the Bot Database field.
- Press Save changes.
If the storage is not already created, use the instruction Manage storage and files.
The Four Rules for Prompt
1. Specify topics
List the questions for which a knowledge base is needed.
Use the knowledge base for questions about the company, services,
delivery, payment, returns, and warranty.
2. Separate data sources
If some of the information comes from integration, record it separately.
Get service descriptions and contraindications from the knowledge base.
Get current prices and availability only through YCLIENTS actions.
Do not use a price from a file if the action returned a different value.
3. Stop making things up.
Answer only from the information you find. Do not invent prices,
dates, addresses, or rules. If there is no exact answer, say so clearly
and offer help from a team member.
4. Describe the response format
Give a short answer in plain language. If a condition has several
parts, use a list. Do not mention an internal filename unless the
customer asks about it.
A ready-made example
## Working with the knowledge base
Use the knowledge base for questions about the company, services,
preparation for procedures, contraindications, and service rules.
For delivery questions, use the `Delivery and pickup` file.
For warranty questions, use the `Warranty and returns` file.
Get current prices, staff, and availability only through
booking-system actions.
Answer only from the information you find. If data is missing
or contradictory, do not choose an option yourself:
say that a team member must clarify it.
If several files are suitable
Don't make the bot choose by guess. Specify the priority of sources or the rule of clarification.
If a question concerns both delivery and returns, use both files
and split the reply into two sections. If the conditions conflict,
do not present either option as correct—hand the question over to a team member.
Verification
Test:
- a question with an exact answer in one file;
- the same question in other words;
- an issue requiring two files;
- An issue that needs integration, not a framework.
- unanswered question;
- conflicting information.
Check in the processing log that the bot has used the right source. If it selects the wrong file, improve File Assignment and make the rule more specific.
Do not list the contents of all documents in the Prompt. Prompt explains the rules of choice, and the facts themselves should remain in the knowledge base.