An AI bot connected to a company knowledge base helps find and explain information from the company's documents. It can answer recurring questions, suggest procedures and pass complex inquiries to a staff member.
Its capabilities depend on source quality, access rules and the process you configure. Uploading documents alone does not make answers accurate or authorize the bot to promise individual terms.
Define the first version's question scope
Start with recurring inquiries for which approved answers already exist:
- what a service or package includes;
- which materials are needed before work begins;
- how approvals work;
- where to find instructions;
- how to contact support;
- which general limitations apply.
Define a separate source of current data for price, availability and order status. A static document must not replace a system check when information changes.
Choose the interaction format: a conversational bot or an application interface. The differences are covered in the article on Telegram bots, Mini Apps and websites.
Prepare a knowledge base you can rely on
For each item, record its topic, owner, review date, language, market and intended users. Remove duplicates and resolve contradictions: the bot must not choose between an old price list and a new presentation without a priority rule.
It is useful to separate:
- approved public terms;
- staff instructions;
- information about a particular customer;
- drafts and archived versions that must not be used in answers.
For multiple languages, check that the terms align across versions. Translating a document does not establish that the service is equally available in every market.
A common approach is to retrieve relevant passages before generating an answer, known as RAG. The bot receives material related to the question and writes an explanation. Include requirements to check that retrieved passages actually address the question and that the answer adds no unsupported terms.
Set rules for answers and for avoiding guesses
At the start of the dialogue, tell users they are speaking to an AI assistant and show how to contact a staff member. For common questions, define a clear format: a short answer, an important limitation and a source the user can access.
If information is missing, documents contradict one another or the question requires an individual decision, the bot should clarify the request or offer a handover to a person. A well-written answer is not evidence of accuracy.
NIST identifies confidently stated false information as a generative AI risk. Sources and answers therefore need checking before launch and during ongoing operation. NIST's risk profile.
Do not use the model's own confidence assessment as the sole authorization to answer. Check that an appropriate source exists, is current and contains information the user is allowed to see.
Do not put the model in charge of access control
A public assistant must not receive internal documents or other customers' records. Verify the user and their permissions before passing material to the model. This approach is described in OWASP's RAG guidance.
An uploaded document or message may contain instructions intended to change the bot's behavior. OWASP notes that RAG does not eliminate these attacks and recommends limiting system permissions and separately controlling consequential actions. Prompt injection guidance.
In practice, separate an answer from an action. Explaining refund rules must not automatically issue a refund, and answering a discount question must not change a price. If CRM operations are needed, define permitted actions, permission checks, confirmations and an execution log.
When a staff member is needed
Pass an inquiry to a person if:
- the customer asks for an individual price, an exception or a promised deadline;
- the question involves a disputed payment, complaint or unusual situation;
- there is no verified answer in the knowledge base;
- documents conflict or may be outdated;
- a professional decision outside approved instructions is required;
- the user asks for a staff member.
The staff member should receive the question, relevant context, sources used and the handover reason. Do not make the customer repeat the entire conversation. Show the actual state: the request is saved, assigned or waiting to be processed. Do not promise an immediate connection outside working hours.
A hypothetical service response
A customer asks: “Can you launch the project by Friday?” The knowledge base describes standard stages, but neither the team's availability nor the scope of this particular project has been confirmed.
The bot can explain which materials are needed for an estimate, collect a task description and pass the question to a manager. It must not turn a general guideline in a document into a promise to launch by Friday.
If a separate integration shows available consultation slots, the bot can offer them according to the agreed rules. An available consultation does not confirm the project's completion date.
Check answers and assign knowledge base updates
For acceptance, collect a set of questions with the expected answer, permitted source and condition for staff handover. Include ordinary wording, mistakes, different languages, missing information and attempts to obtain restricted data.
Check:
- whether the answer matches the source and question;
- whether a price, deadline or capability has been invented;
- whether access permissions are respected;
- whether staff handover works correctly;
- whether an inquiry is saved when an integration fails;
- whether outdated information disappears after the knowledge base is updated.
Assign document owners and a process for publishing changes. An updated source file must reach the search index and answers. Repeat the relevant checks after changes to the model, retrieval or rules.
Assess verified answer usefulness, errors, handover quality and dialogue costs. Few requests for a staff member are not a success if the bot simply does not offer help.
To discuss a Telegram bot with AI features, prepare your knowledge base, typical questions and limits of authority. Use the commercial proposal to agree on development and support; account separately for the model, external APIs and material updates. Scenarios and verification criteria can follow the bot specification template.