AI knowledge assistants for a 30 000-employee grocery chain
Three RAG assistants on one platform — for commercial staff, store directors (by voice, from the shop floor) and HR — answer questions from corporate regulations with a citation to the exact clause, or say honestly that they do not know — so staff stop phoning head office for routine questions.
- Duration
- 5 months to first wave, 3 waves
- Published
- 26 August 2026
- Stack
- PythonLangChainPostgreSQL + pgvectorWhisperLaravelVueTelegram Bot APIKubernetes
−55%
time spent searching regulations
91%
answers with a verified citation
−35%
routine calls from stores to head office
19k
questions per month
What was the starting point?
The starting point was a food retailer with more than a thousand stores in several countries that runs on regulations — pricing rules, supplier procedures, cold-chain SOPs, HR policies — hundreds of documents versioned by function and store format, plus a lot of knowledge that lived only in the heads of experienced colleagues. The retailer was not early: McKinsey’s State of AI survey (2025) reports that a majority of organisations now use generative AI in at least one business function, and knowledge search is one of the most common first uses.
Glanit started with an AI initiative registry — 23 candidate use cases scored on business value and data readiness. Three of them shared the same technical core and the most-ready data (documents, not system integrations), so they became the first wave: a single retrieval-augmented generation platform with three faces.
What problem had to be solved?
The problem was three groups asking the same questions in the wrong place, with a hard rule of no invented answers: an assistant that confidently misquotes a pricing regulation is worse than no assistant. The risk is well documented — in the Stack Overflow Developer Survey (2024) the most cited concern about AI tools was distrust of their output, and OWASP’s LLM Top 10 (2025) lists misinformation and prompt injection among the main application risks.
- Commercial staff spent hours finding the right clause across dozens of regulations; new hires took months to become productive and pulled their managers into answering the same questions.
- Store directors phoned head office with identical operational questions — and could not search a 40-page PDF while standing in the dairy aisle.
- HR answered the same leave, sick-pay and scheduling questions for 30 000 employees, in several languages, over and over.
The assistant for commercial staff
Every answer is built strictly from retrieved fragments and shows its sources as numbered citations with a deep link into the document. If the corpus does not contain the answer, the assistant says so and points to the responsible expert.
How was it built?
It was built as one retrieval-augmented generation platform with three surfaces. Documents are audited, chunked along clause structure and indexed for hybrid search; the model answers only from retrieved fragments, cites them, and returns an explicit “not found” when retrieval confidence is low. Grounding and logging were treated as governance controls in the sense of the NIST AI Risk Management Framework (2023) — measurable, monitored and owned — not as prompt tricks.
- Document corpus audit first. Before indexing anything we walked every function through its documents and flagged outdated versions — a RAG system on stale documents is confidently wrong.
- Indexing pipeline. Parsing of DOCX/PDF/XLSX, semantic chunking that respects clause structure, multilingual embeddings, hybrid search (BM25 + vector) with a cross-encoder reranker. Re-indexing runs on document change.
- Grounded generation. Answers cite fragments as [1][2]; all prompts and answers are logged.
- Three surfaces, one platform. Web app and Telegram bot with corporate SSO for commercial staff; a mobile voice assistant for store directors (local Whisper speech-to-text, format-aware retrieval, text and voice answer); an HR assistant that answers general policy questions and routes personal cases (“how many leave days do I have left”) to a specialist until the HR-system integration is approved.
- Feedback loop. Thumbs up/down on every answer and a weekly digest of unanswered questions — which became the input for updating the regulations themselves.
RAG vs fine-tuning: why retrieval for corporate regulations?
The table explains why the platform retrieves documents rather than fine-tuning a model on them. Regulations change weekly and every answer must point to a clause; retrieval handles both, while a fine-tuned model would need retraining on each change and cannot cite. Fine-tuning still has a place — tone, format, domain vocabulary — and can sit on top of retrieval.
| Criterion | Fine-tuning | RAG (this project) |
|---|---|---|
| Document changes | Retrain the model | Re-index the changed file |
| Citations to a clause | Not possible reliably | Built in: [1][2] with deep links |
| “I do not know” | Model tends to guess | Explicit not-found on low retrieval confidence |
| Access control per function | Hard | Filter at retrieval time |
| Set-up effort | Training data and GPU time | Corpus audit and indexing pipeline |
| Best for | Style, format, vocabulary | Facts that change and must be traceable |
Voice assistant on the shop floor
Store directors ask by voice from a phone. Speech-to-text runs on-premise; the retrieval step knows the store format, because the procedures for a hypermarket and a convenience store differ.
Results
Measured in the pilot group (commercial function, 180 users; 40 pilot stores) over the first three months, then confirmed on the rollout.
- Answered with citation
- Rated helpful
The improvement between months 1 and 3 came almost entirely from cleaning the document corpus, not from the model.
Data table
| Answered with citation | Rated helpful | |
|---|---|---|
| Month 1 | 81% | 74% |
| Month 2 | 86% | 80% |
| Month 3 | 89% | 84% |
| Month 4 | 91% | 87% |
| Month 5 | 92% | 88% |
| Month 6 | 93% | 90% |
Voice assistant launched in week 4.
Data table
| Calls | |
|---|---|
| W1 | 312 |
| W2 | 305 |
| W3 | 298 |
| W4 | 240 |
| W5 | 205 |
| W6 | 190 |
| W7 | 176 |
| W8 | 181 |
| W9 | 168 |
| W10 | 160 |
| W11 | 158 |
| W12 | 152 |
Stack and security
The stack is Python services (LangChain for orchestration, custom retrieval), PostgreSQL with pgvector, Whisper for on-premise speech recognition, Laravel + Vue for the admin and analytics, Telegram Bot API and corporate AD/SSO, deployed in the client’s Kubernetes cluster so that documents and transcripts never leave the corporate perimeter. Model choice is pluggable: the pilot ran on a hosted LLM under a data-processing agreement of the kind GDPR Article 28 requires between controller and processor (2016); the HR assistant, which handles the most personal questions, runs on a self-hosted model.
What came next?
The same platform now hosts the supplier-correspondence assistant for procurement and a contract-deviation checker for legal. The unanswered-questions digest turned into a standing agenda item for the regulation owners — the assistant became the fastest way to discover which rules are unclear. Beyond retail, the same platform shape serves any organisation whose staff answer questions from a corpus of internal documents: banks, insurers, logistics operators, public bodies.
Frequently asked questions
Services behind this case
Services
AI & Machine Learning
AI agents, LLM pipelines with retrieval, forecasting, computer vision and document AI — built into your product and measured by before/after numbers.
AI & Machine Learning
Free Open-Source AI Chatbot for Business Automation
Discover Glanit's open-source AI chatbot solution. Automate customer support 24/7 using Grok, Gemini, and ChatGPT. A self-hosted, free alternative to expensive SaaS tools—pay only for API usage.
AI & Machine Learning
How AI agents work: architecture of a production agent
An AI agent is not a chatbot with a longer prompt. It is a system: a model for reasoning wrapped in perception, memory, tools, orchestration and monitoring. We build agents for clients and for our own products — this is the architecture behind them.
More case studies
Document AI that reads 1 300 supplier invoices a day
Scans and photos of invoices, delivery notes and acts go through a multimodal model that extracts typed fields with a confidence score per field, reconciles them with the supplier and contract master data, and posts to the ERP. Only low-confidence documents reach a human — roughly one in nine.
- Retail · Finance
- Python
- PyTorch
- Multimodal LLM
Catalogue AI: classifying new SKUs and cleaning 182 000 product cards
Two models on the product catalogue of a grocery chain: one suggests the classification code and category for every new item with top-3 probabilities, the other finds duplicate product cards semantically. Category managers confirm with one click instead of searching the classifier by hand; every confirmation feeds back into training.
- Retail · Master data
- Python
- scikit-learn
- Sentence Transformers
Voice of customer: 12 review sources, one AI-classified stream
Reviews from maps, app stores, social networks, the hotline and the in-store complaint book flow into one system that classifies each by topic, sentiment, store and severity, escalates critical ones to the responsible manager within minutes, and gives management a live, per-store picture instead of a monthly digest.
- Retail · Customer experience
- Python
- Transformers
- PostgreSQL