Developer builds local RAG system with Qdrant and LlamaIndex to search procurement laws

Developer Vladimir explained on Habr how he built a RAG system that runs entirely on local infrastructure, with no calls to external cloud services. The system combines LlamaIndex with the Qdrant vector database to quickly find answers in the company's lengthy Procurement Policy and in the 44-FZ and 223-FZ federal laws. On top of the RAG pipeline, the team wrote its own API and a Gradio web interface.

AI-processed from Habr AI; edited by Hamidun News
Developer builds local RAG system with Qdrant and LlamaIndex to search procurement laws
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1LlamaIndex, a framework for indexing documents and querying them, which the author used for the first time
Key metric #2Qdrant, an open-source vector database that stores the document embeddings
Key metric #3A custom API on top of LlamaIndex and Qdrant

A developer who publishes on Habr under the name Vladimir has described how he built a local RAG system on LlamaIndex and the Qdrant vector database, so he no longer has to dig manually through his company's Procurement Policy and the relevant federal laws, 44-FZ and 223-FZ.

Why build a local RAG?

The author says the project grew out of a practical need. Manually hunting for specific wording and conditions in long regulatory documents on procurement is slow and awkward. Those documents include the company's Procurement Policy, federal law 44-FZ (on the contract system for public procurement), and federal law 223-FZ (on procurement by certain types of legal entities). A RAG system (retrieval-augmented generation, which grounds generated answers in passages retrieved from documents) lets users ask questions in natural language and get answers built on the actual text of the regulations rather than on the model's guesses.

The key requirement was that the system stay entirely on local infrastructure, with no calls to external cloud APIs. That matters for procurement documentation, which often contains internal commercial terms.

What the system is built from

  • LlamaIndex, a framework for indexing documents and querying them, which the author used for the first time
  • Qdrant, an open-source vector database that stores the document embeddings
  • A custom API on top of LlamaIndex and Qdrant
  • A Gradio web interface for easy interaction with the system
  • Data sources: the company's Procurement Policy, 44-FZ, and 223-FZ

The author walks through the build in detail, from indexing documents to writing the API and the interface. In effect, he gives Habr readers a ready-made template for similar tasks involving local legal and regulatory knowledge bases.

Why this particular stack?

Qdrant stands out among vector databases because it is open source and can be deployed entirely locally, with no mandatory dependence on a cloud service. That makes pairing it with LlamaIndex a convenient choice for scenarios where data must not leave the company's infrastructure: legal and procurement documents, internal regulations, and commercial terms with counterparties. In this setup, LlamaIndex handles splitting documents into chunks, building the index, and composing queries to the language model grounded in the retrieved chunks. Gradio gives procurement staff and lawyers a simple web interface that doesn't require them to work with code or a console directly.

What's next for the project?

The author presents the article as a walkthrough of a specific, reproducible case, not a finished commercial product. He lays out the build steps in detail so Habr readers can replicate the solution for their own internal documents, whether other regulations, internal policies, or a contract database. This format is typical of Habr's engineering community, where an article's value lies not in a finished service but in a transparent account of the path from problem statement to working prototype.

What it means

This case is a practical example of RAG built on open tools like LlamaIndex and Qdrant moving from research demos into routine corporate work: searching internal regulations and relevant legislation without sending sensitive data to external cloud services. For companies handling public procurement under 44-FZ and 223-FZ, where misreading a rule is costly, a local RAG assistant is a way to speed up the work of lawyers and procurement staff while leaving the final decision to a human.

Story

Key Questions Answered

Why build a local RAG?

The author says the project grew out of a practical need. Manually hunting for specific wording and conditions in long regulatory documents on procurement is slow and awkward. Those documents include the company's Procurement Policy, federal law 44-FZ (on the contract system for public procurement), and federal law 223-FZ (on procurement by certain types of legal entities). A RAG system (retrieval-augmented generation, which grounds generated answers in passages retrieved from documents) lets users ask questions in natural language and get answers built on the actual text o

Why this particular stack?

Qdrant stands out among vector databases because it is open source and can be deployed entirely locally, with no mandatory dependence on a cloud service. That makes pairing it with LlamaIndex a convenient choice for scenarios where data must not leave the company's infrastructure: legal and procurement documents, internal regulations, and commercial terms with counterparties. In this setup, LlamaIndex handles splitting documents into chunks, building the index, and composing queries to the language model grounded in the retrieved chunks. Gradio gives procurement staff and l

What's next for the project?

The author presents the article as a walkthrough of a specific, reproducible case, not a finished commercial product. He lays out the build steps in detail so Habr readers can replicate the solution for their own internal documents, whether other regulations, internal policies, or a contract database. This format is typical of Habr's engineering community, where an article's value lies not in a finished service but in a transparent account of the path from problem statement to working prototype.

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Private AI Builders Community · Vibe Club

Ship AI Faster with Founders, Engineers & Weekly Architecture Reviews

Inside Vibe Club (hamidun.com/club) — weekly live masterminds with Zhemal Khamidun, Tech Radar, full LMS access, and 370+ production Claude Code skills.

Join Vibe Club →Explore Hamidun Academy
What do you think?
Loading comments…