
01 · Overview
During my work at the National Telecommunication Corporation (NTC), I noticed that employees often spend significant time searching through policy documents, regulations, and manuals to find specific information.
To address this challenge, I developed a Retrieval-Augmented Generation (RAG) chatbot that enables employees to interact with official NTC policy documents using natural language.
The system retrieves relevant information from uploaded PDF documents and generates context-aware responses grounded in the source content. It also supports follow-up questions, document uploads, and persistent chat history, making policy information easier to access and understand.
02 · How I built this project
I developed the chatbot using a document-processing and hybrid retrieval pipeline.
Implemented PDF text extraction using PyMuPDF4LLM and Docling, including OCR support for scanned documents. Applied structure-aware chunking to preserve document sections, headings, and contextual relationships.
Used the locally running Ollama model nomic-embed-text to generate embeddings for document chunks, reducing reliance on external embedding APIs.
Implemented a Hybrid RAG approach combining semantic vector search with BM25 keyword retrieval.
Incorporated query rewriting to improve retrieval for follow-up questions and conversational queries. Configured retrieval parameters to improve the relevance of retrieved document chunks.
Integrated Groq for LLM inference to generate responses based on retrieved document context and conversation history.
Built the backend using FastAPI and developed an NTC-themed web interface using HTML, CSS, and JavaScript.
Implemented:
03 · Tech stack
04 · Results
The project demonstrated how a well-designed retrieval pipeline can improve the usefulness of an AI-powered document assistant.
By combining semantic search with keyword-based retrieval, applying structure-aware chunking, and optimizing retrieval parameters, I developed a system that helps employees find relevant information from official policy documents more efficiently.
One of the most important lessons I learned was that retrieval quality plays a critical role in RAG performance. Improving document processing, chunking, query handling, and retrieval strategies can have a greater impact on answer quality than simply changing the language model.
Code and more on GitHub
Repositories, experiments and smaller builds.