Pramaan-AI: Design and optimization of an air-gapped, zero-hallucination multi-format Retrieval-Augmented Generation (RAG) system with single-page visual evidence verification
Professionals and students who work with sensitive documents such as hospital doctors reading patient PDFs, accountants checking private Excel workbooks, defense or legal staff handling restricted records, and teachers reviewing lecture notes cannot safely upload private files to public cloud chatbots. In addition, general-purpose chatbots often invent details not present in the source document, a failure known as hallucination. This paper presents Pramaan-AI, a 100% offline (air-gapped) Retrieval-Augmented Generation (RAG) web application that answers questions strictly from a user's own PDF, Word, Excel, and PowerPoint files on a standard CPU-only laptop without internet connectivity. The system integrates a Streamlit web interface, Meta's llama3.2:1b language model served locally via Ollama at temperature 0.0, the local all-MiniLM-L6-v2 text encoder (384-D), persistent per-chat ChromaDB collections with HNSW cosine search, and an SQLite3 governance database in Write-Ahead Logging (WAL) mode. Four core engineering contributions are presented: (1) multi-format document ingestion with persistent per-chat file storage; (2) a regular-expression text cleaner that repairs broken vertical line wraps in PDFs; (3) dynamic single-page PDF byte-slicing that lets the user open only the exact cited page with matching lines highlighted in cyan; and (4) a calibrated cosine-proximity relevance display paired with a Master Administrator console. In an offline case study on a 79-page Artificial Neural Networks lecture PDF (114 chunks), the logged query retrieved Page 2 as the top source with a relevance display of 86.7-86.9% and a cold CPU response time of 25.33 s (47.79 s in an earlier run), keeping the answer strictly within the retrieved page. The relevance score is reported openly as a display heuristic rather than statistical proof of accuracy, and a multi-question RAGAS benchmark is outlined as future work.
Authors
- Aditya Tandel
Institutions
- Rayat Shikshan Sanstha (IN)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-23
- DOI
- https://doi.org/10.5281/zenodo.24462052
- Primary Topic
- Topic Modeling
- Type
- preprint