The post has been translated automatically. Original language: Russian
Let's imagine an online store: a visitor asks if there is a laptop in Almaty and if it is possible to get it by Friday. A beautiful response in a second is impressive only before the first error in stock or delivery. Therefore, when designing an AI consultant, it is worthwhile to determine in advance where he gets the facts from, when he clarifies the question and how he transmits it to a person.
The answer must have a verifiable basis.
A useful scheme begins with a knowledge base search: the application finds suitable fragments of conditions, instructions, or a catalog and transmits them to the model along with the question. This approach is called RAG generation with the addition of found materials. It allows you to rely on company data and show sources, but it does not guarantee that there will be no errors: an irrelevant or incomplete search result may lead to an incorrect answer.
At the same time, the knowledge base and current operational data solve different tasks. It is convenient to search for delivery rules in the documents. It is better to request the availability of goods, the current price, or free time in the appropriate system through a limited server function. Function calls allow you to connect fresh data from the API to the response; the available operations and parameter verification are set by the application.
One question may require multiple checks.
Let's get back to the laptop. First, you need to specify the model or article number, if they are unknown. Then check the balance in the right warehouse, the shipping terms for the address, and the available date. Catalog availability in itself does not mean availability in stock, and the usual delivery time does not confirm a specific Friday.
You can only collect a response from the confirmed parts. For example: "The product was found in the catalog, but now it was not possible to check the balance in Almaty. I can send the request to the manager." Here, the consultant saves the useful result and explicitly marks the gap. It does not replace an inaccessible check with a plausible promise.
In more complex systems, agentic RAG is used: the model splits a query into several search subtasks and collects the materials found. This approach is described in the modern Microsoft documentation. For a simple FAQ, such complexity may be unnecessary: the choice should be checked on real issues, taking into account the delay and cost, and not based on the name of the technology.
The link helps verify the answer, but does not make it true.
It is useful to store the name, source address, update date, and action status for documents. If the current page and the archived file contradict each other, this is a reason to check the data rather than allow the model to choose a convenient version.
In the interface, you should show the source next to the corresponding statement. Separately, you need to check that the link opens and really confirms what has been said. Microsoft explicitly notes that the presence of a link does not prove the truth of the source or support for every statement in the response.
Transfer to a person is part of the script
If there is no data, sources conflict, or the issue goes beyond the configured capabilities, it is more useful to suggest a specific next step. You can send a brief description of the task, already verified information, and an unresolved issue to the manager. The user's contact is requested when it is needed for the selected communication method. Repeating the entire conversation to a person should not be a prerequisite for help.
Access rights work until generation
A public consultant should not receive internal documents just because they are included in the general search index. Access to the data is checked by the application during the search. The data of different clients and companies needs to be isolated; one instruction "do not show other people's information" is not enough.
The found document itself may also contain malicious instructions. OWASP classifies such cases as indirect prompt injection. Therefore, the consultant needs limited rights, verification of access to tools, and separate control of actions that change the state of the system. Requesting a balance and placing an order require different permissions.
What to check before launching
• A question that has no answer in the database.
• Outdated price and conflicting documents.
• Unavailability of the warehouse, CRM or record service.
• A request to show the information of another client.
• Instructions within the document that attempt to change the consultant's behavior.
• Transition to the person: whether the context and the understandable next step are preserved.
It is worth evaluating separately the correctness of the facts, the validity of the links, the relevance of the data and the behavior in case of uncertainty. A consultant who carefully informs about the limitation and helps to continue the task may be more useful than someone who confidently answers everything.
Sources
Microsoft Learn — Retrieval augmented generation (RAG) and indexes:
Google Cloud — Introduction to function calling:
Microsoft Learn — Foundry IQ transparency note:
OWASP — LLM01:2026 Prompt Injection:
Представим интернет-магазин: посетитель спрашивает, есть ли ноутбук в Алматы и можно ли получить его к пятнице. Красивый ответ за секунду впечатляет только до первой ошибки в наличии или доставке. Поэтому при проектировании ИИ-консультанта стоит заранее определить, откуда он получает факты, когда уточняет вопрос и как передаёт его человеку.
У ответа должна быть проверяемая основа
Полезная схема начинается с поиска по базе знаний: приложение находит подходящие фрагменты условий, инструкций или каталога и передаёт их модели вместе с вопросом. Такой подход называют RAG — генерацией с дополнением из найденных материалов. Он позволяет опираться на данные компании и показывать источники, но не гарантирует отсутствие ошибок: нерелевантный или неполный результат поиска может привести к неверному ответу.
При этом база знаний и актуальные операционные данные решают разные задачи. Правила доставки удобно искать в документах. Наличие товара, текущую цену или свободное время лучше запрашивать в соответствующей системе через ограниченную серверную функцию. Вызовы функций позволяют подключать к ответу свежие данные из API; доступные операции и проверку параметров задаёт приложение.
Один вопрос может требовать нескольких проверок
Вернёмся к ноутбуку. Сначала нужно уточнить модель или артикул, если они неизвестны. Затем проверить остаток на нужном складе, условия доставки для адреса и доступную дату. Наличие в каталоге само по себе не означает наличие на складе, а обычный срок доставки не подтверждает конкретную пятницу.
Собирать ответ можно только из подтверждённых частей. Например: «Товар найден в каталоге, но сейчас не удалось проверить остаток в Алматы. Могу передать запрос менеджеру». Здесь консультант сохраняет полезный результат и явно обозначает пробел. Он не подменяет недоступную проверку правдоподобным обещанием.
В более сложных системах применяется agentic RAG: модель разбивает запрос на несколько поисковых подзадач и собирает найденные материалы. Этот подход описан в современной документации Microsoft. Для простого FAQ такая сложность может быть лишней: выбор стоит проверять на реальных вопросах, с учётом задержки и стоимости, а не делать по названию технологии.
Ссылка помогает проверить ответ, но не делает его истинным
У документов полезно хранить название, адрес источника, дату обновления и статус действия. Если действующая страница и архивный файл противоречат друг другу, это повод проверить данные, а не позволять модели выбрать удобную версию.
В интерфейсе стоит показывать источник рядом с соответствующим утверждением. Отдельно нужно проверять, что ссылка открывается и действительно подтверждает сказанное. Microsoft прямо отмечает: наличие ссылки не доказывает истинность источника или поддержку каждого утверждения в ответе.
Передача человеку — часть сценария
Если данных нет, источники конфликтуют или вопрос выходит за пределы настроенных возможностей, полезнее предложить конкретный следующий шаг. Менеджеру можно передать краткое описание задачи, уже проверенные сведения и нерешённый вопрос. Контакт посетителя запрашивается тогда, когда он нужен для выбранного способа связи. Повторять весь разговор человеку не должно быть обязательным условием помощи.
Права доступа работают до генерации
Публичный консультант не должен получать внутренние документы только потому, что они попали в общий поисковый индекс. Доступ к данным проверяется приложением при поиске. Данные разных клиентов и компаний нужно изолировать; одной инструкции «не показывай чужую информацию» недостаточно.
Сам найденный документ тоже может содержать вредоносную инструкцию. OWASP относит такие случаи к косвенной prompt injection. Поэтому консультанту нужны ограниченные права, проверка обращений к инструментам и отдельный контроль действий, меняющих состояние системы. Запрос остатка и оформление заказа требуют разных разрешений.
Что проверить перед запуском
• Вопрос, на который в базе нет ответа.
• Устаревшую цену и противоречащие друг другу документы.
• Недоступность склада, CRM или сервиса записи.
• Просьбу показать сведения другого клиента.
• Инструкцию внутри документа, пытающуюся изменить поведение консультанта.
• Переход к человеку: сохраняются ли контекст и понятный следующий шаг.
Оценивать стоит отдельно правильность фактов, обоснованность ссылок, актуальность данных и поведение при неопределённости. Консультант, который аккуратно сообщает об ограничении и помогает продолжить задачу, может быть полезнее того, кто уверенно отвечает на всё.
Источники
Microsoft Learn — Retrieval augmented generation (RAG) and indexes:
Google Cloud — Introduction to function calling:
Microsoft Learn — Foundry IQ transparency note:
OWASP — LLM01:2026 Prompt Injection:
Comments 3
Newest Popular