Developer Built a Local RAG on Qdrant and LlamaIndex for Public Procurement Law Search
Developer Vladimir described on Habr how he built a RAG system operating entirely in a local environment — without calls to external cloud services. The system was built on LlamaIndex and vector database Qdrant to quickly find answers in the company\'s extensive Procurement Regulations and laws FZ-44 and FZ-223. On top of the RAG, they wrote their own API and web interface on Gradio.
AI-processed from Habr AI; edited by Hamidun News
A developer publishing on Habr under the name Vladimir described how they assembled a local RAG system based on LlamaIndex and Qdrant vector database to avoid manually digging through the Company Procurement Regulations and relevant Federal Laws FZ-44 and FZ-223.
Why a Local RAG Was Needed
The author explains that the task arose from practical necessity: searching for the needed wording and conditions manually in voluminous regulatory documents about procurement — the Company Procurement Regulations, as well as Federal Laws FZ-44 (on the contract system in the sphere of state procurement) and FZ-223 (on procurement by certain types of legal entities) — is time-consuming and inconvenient. A RAG system (retrieval-augmented generation, answer generation based on fragments found in documents) allows asking questions in natural language and getting an answer constructed on actual text from regulatory documents, not on the model's guesses.
The key requirement was that the system had to remain completely in a local circuit, without accessing external cloud APIs. For working with procurement documentation, where internal commercial terms often appear, this is a fundamental point.
What the System Is Built From
- LlamaIndex — a framework for indexing documents and building queries to them, applied by the author for the first time
- Qdrant — an open source vector database for storing document embeddings
- Custom API on top of the LlamaIndex and Qdrant connection
- Web interface on Gradio for convenient interaction with the system
- Data sources — Company Procurement Regulations, FZ-44, and FZ-223
The author discusses in detail the assembly process — from indexing documents to writing the API and interface — essentially offering Habr readers a ready-made template for similar tasks with local legal and regulatory databases.
Why This Specific Combination Was Chosen
Qdrant stands out among vector databases in that it is distributed with open source code and can be deployed completely locally — without mandatory attachment to a cloud service. This makes the connection with LlamaIndex a convenient choice precisely for scenarios where data should not leave company infrastructure: legal and procurement documents, internal regulations, commercial terms with counterparties. LlamaIndex in this configuration is responsible for splitting documents into fragments, building an index and formulating queries to the language model based on found fragments, while Gradio gives procurement officers and lawyers a simple web interface that does not require working with code or console directly.
What Next With the Project
The author presents the article as a review of a specific, reproducible case, not a finished commercial product: they show in detail the steps for assembling the system so that Habr readers can reproduce the solution for their own internal documents — whether other regulatory acts, regulations, or a database of contracts. Such article format is typical for the Habr engineering community, where the value of material is not in a ready-made service, but in the transparently shown path from problem statement to working prototype.
What This Means
This case is a practical example of how RAG on a combination of open tools like LlamaIndex and Qdrant descends from the level of research demos to routine corporate tasks: searching through internal regulations and specialized legislation without transmitting sensitive data to external cloud services. For companies working with state procurement under FZ-44 and FZ-223, where an error in interpreting a norm is costly, a local RAG assistant is a way to speed up the work of lawyers and procurement officers while leaving the final decision to humans.
Need AI working inside your business — not just in your newsfeed?
I build production AI for companies — custom CRM, internal tools, autonomous agents, workflow automation. Owned by you, shaped to your process, no per-seat tax. Built by Zhemal Khamidun, CPO of AlpinaGPT (AI platform, 6,000+ users).
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.