Danil Sidorov
RU EN DE
Telegram

AI consultant over a knowledge base: site widget and Telegram bot

A consultant answers from prices and FAQs with sources, helps on a website and in Telegram, and collects manager enquiries.

AI / Consultants

Live interactive demo stand

Russian-language demo. Ask about bakery terms, inspect sourced answers, upload a document and preview a manager enquiry. The Telegram flow is shown in the browser without connecting to Telegram.

A sourced answer and a manager enquiry in one conversation

StackPython, FastAPI, PostgreSQL, GigaChat, aiogram, Docker

Fictional bakery, real service with GigaChat. Questions and matching fragments are sent to the model provider. Enquiries are not sent. History stays in the tab; session and upload stay in server memory until reset or an hour of inactivity. Fictional contacts are available.

What to test in the stand:
  1. Ask about delivery or cakes and expand the source under the answer
  2. Ask an off-topic question and open the search explanation to see the refusal reason
  3. Request a manager, use fictional contacts and compare the enquiry with the Telegram preview
kolosok.example/
Live Stand

Turnkey implementation

Need a similar system for your business processes?

I will develop the architecture, fault-tolerant backend, and fast interface. Protected by NDA, clean transferable code, and transparent milestones.

  1. Free timeline and budget estimate within one day
  2. Contract and invoice
  3. Warranty and post-launch support

On weekdays usually within a couple of hours

I will reply personally, no aggressive sales pitch

Task

Companies with price lists, delivery rules and recurring questions need a consultant that helps customers find the terms and proceed to an order. Missing information should lead to a manager hand-off with context.

I built a demonstration project for the fictional Kolosok bakery. One engine serves a website widget and a Telegram bot. This is an open project with a working service, rather than a real client deployment story.

Solution

Customers ask about terms, receive an answer and expand the price-list or FAQ fragment used. Questions with insufficient similarity are declined before reaching the model. Otherwise GigaChat receives matching fragments and instructions to answer from them or decline. If the provider is unavailable, the service shows a suitable fragment without generation.

For human help, the consultant collects a name, phone and question. In production mode it saves the enquiry to PostgreSQL before notifying the manager in Telegram with conversation context. The public demo only previews the message using fictional contacts. Questions and matching fragments are sent to the model provider; contacts entered in the enquiry form are excluded from its context.

What was done

  • Combined prices, delivery rules and FAQs into one knowledge base for the widget and Telegram bot
  • Connected GigaChat and expandable sources so customers can check prices and terms
  • Added refusal when information is missing and a manager enquiry form
  • Enabled TXT, Markdown and PDF uploads for questions about a visitor's document
  • Separated form contacts from the conversation sent to the model
  • Added question quotas, a model queue and fragment fallback when the provider is unavailable
  • Prepared a preview-only enquiry mode, fictional contacts and session/file deletion on reset

Result

The complete journey from a document question to a contextual enquiry works. The widget connects with one script line; the Telegram bot shares its knowledge and answer rules. The site offers a live widget, document uploads and a browser preview of the Telegram flow without sending messages.

On a small acceptance set, retrieval ranks the right fragment first for 16 of 16 questions. Without a model, 12 receive an answer and four paraphrases need a model; seven off-topic questions receive “don't know”. This verifies a fixed test set and does not promise AI accuracy for arbitrary questions.

Developer's note

Danil Sidorov
Danil Sidorov Project developer

What was hard

The main challenge was distinguishing similar text from an actual answer. Price words appear in several sections, and a weather question can share words with the price list. I separated candidate retrieval from model verification, added sources and explicit decision reasons.

The service also needed to handle failures and concurrent questions. Quota slots are reserved atomically, the budget is checked before model calls, and network failures fall back to retrieval. Form contacts never enter subsequent model requests.

What came easy

A separate Python engine made sharing logic between channels straightforward. The widget and Telegram bot submit questions and receive the same answers, sources and form steps. Price updates do not require two independent implementations.

Plain Markdown files make the knowledge base easy to maintain. Delivery terms, prices and FAQs have readable sections that visitors can expand under an answer and compare with the source document.

Technologies

PythonFastAPIPostgreSQLGigaChataiogramDocker

Sources

The links confirm the numbers in this case

Tell me about your task

Telegram