Skip to content
Open access

Design and Implementation of a Retrieval-Augmented Generation (RAG) Based Chatbot for Document Question Answering

Jul 2026 · Best Journal of Innovation in Science, Research and Development · 0 citations · 10 references

TL;DR

This paper mainly talks about how Retrieval-Augmented Generation frameworks are making document-based question-answering smarter and more reliable than traditional models, and explores different types of RAG techniques like dense retrieval, vector database optimization, generative language model integration, and hybrid search frameworks.

Abstract

: With the rapid growth of enterprise databases, personal cloud storage, and corporate digital archives, the number of unstructured text documents requiring manual analysis and reading has increased massively. Extracting relevant information from massive multi-page documents manually is extremely time-consuming and prone to human oversight. Traditional keyword-based search systems and earlier rule-based chatbots do not really work that well anymore because they lack deep semantic understanding and fail to synthesize context-aware answers to user queries. This paper mainly talks about how Retrieval-Augmented Generation (RAG) frameworks are making document-based question-answering smarter and more reliable than traditional models. It explores different types of RAG techniques like dense retrieval, vector database optimization, generative language model integration, and hybrid search frameworks... and explains how they are implemented in real-world intelligent systems. The paper also discusses what these methods are good at, where they struggle a bit, and how practical they actually are when it comes to handling complex, multi-modal documents. One important thing the study shows is that RAG-based document chatbots can achieve contextual response accuracy levels of more than 95% and can reduce language model hallucinations quite a lot. Still, some problems are not fully solved yet — especially things related to processing nested tables within documents, sub-optimal retrieval latency, and parsing highly technical schemas in real time. Because of this, future research is expected to focus more on Graph-based RAG (GraphRAG), agentic multi-step reasoning, and privacy-preserving federated retrieval systems that can scale up dynamically as large document corpora evolve.

Read PDF

Similar papers

Conference Jul 2026

An Intelligent PDF Question-Answering System; A Retrieval-Augmented Generation Approach

Due to the surge in digital document creation, intelligent systems that can effectively retrieve accurate information from unstructured PDF content have become a necessity. Current keyword-based search techniques lack semantic meaning, while large language models (LLMs), when utilized individually, produce hallucinated results when they are not contextually aware of document content. In this paper, we introduce a novel real-time question answering system for PDF content using a lightweight approach to Retrieval-Augmented Generation (RAG). Our system combines a HuggingFace sentence transformer model for semantic embeddings with a FAISS vector similarity search for efficient retrieval, leveraging a Groq-hosted LLaMA 3.3 70B model for context-grounded answer generation. The system is built using LangChain for orchestration and Streamlit for web-based deployment, and requires no GPU, no fine-tuning, and no pre-indexed corpus. Evaluation across five complementary metrics—Exact Match, Token-level F1, BLEU, ROUGE, and semantic similarity—demonstrates strong alignment between generated and reference answers, with a peak semantic similarity of 0.8709 and a mean Token F1 of 0.4701, confirming the viability of this approach for real-world document intelligence.

Mukesh Lakshmi Sai Medikonda, Kalva Vishnu Teja, K. Greeshma et al. · 0 citations
Open access Jul 2026

Academic Chatbot for Campus Information Services Using Retrieval-Augmented Generation

University service centers handle many repetitive queries about academic schedules, registration, and policies stored in internal documents. Manual lookup is inefficient, and answers given by staff can be inconsistent. Rule-based chatbots only handle limited question patterns, while large language models are hard to update and may produce unsupported answers (hallucinations). This research designs an academic chatbot that combines document retrieval with answer generation so that each answer remains traceable to its source. The system extracts text from campus documents, segments it, encodes it using a multilingual embedding model, and stores it in a vector index for context retrieval. A response is generated through an instruction template that confines the output to the retrieved information and includes page references. Evaluation followed a mixed-method design: a quantitative layer measured retrieval quality (Precision@5, Recall@5) and generation quality using the four RAGAS sub-metrics (faithfulness, answer_relevancy, context_precision, context_recall) on a 100-question test set, while a qualitative layer applied thematic analysis to open-ended user comments. Statistical testing used McNemar's test for accuracy and a paired bootstrap (10,000 resamples) for retrieval metrics; 95% confidence intervals are reported. Results: the proposed RAG system achieved 84% answer accuracy (95% CI 76–90%), Precision@5 = 0.80 and Recall@5 = 0.72, with a System Usability Scale (SUS) score of 78 and a Net Promoter Score (NPS) of +32 from 30 participants. Differences in accuracy versus the lexical and LLM-only baselines were statistically significant (McNemar p < 0.05). The system offers a replicable instantiation of RAG for transparent, citation-backed campus information services in Indonesian.

Haddad Alwi Yafie, A. Zailani, Widang Muttaqin et al. · 0 citations
Open access Jul 2026

Agnostic Multi-Source Retrieval-Augmented Generation for Documents and Database Question Answering

Key personnel turnover creates knowledge gaps in document-based service organizations, where information is distributed across technical specifications, operational databases, and team discussions. This study develops a multi-source Retrieval-Augmented Generation (RAG) based Question Answering (QA) system that automatically integrates heterogeneous knowledge sources through a unified source parameter. Using the Adapter Pattern, the system converts PDF/TXT documents and PostgreSQL tables into a common representation, builds a FAISS vector index, retrieves relevant context, and generates grounded answers with Gemini 2.5 Flash. Evaluation employs eight metrics and three composite scores: Knowledge Transfer Effectiveness (KTE), Multi-Source Retrieval Score (MSRS), and Answer Quality Index (AQI). Experiments were conducted on the BOND_SYS dataset using 25 Indonesian questions covering specification documents, an 8-table PostgreSQL database, and 908 developer discussion messages. Results show perfect retrieval performance (Precision@K = 1.000; MRR = 1.000) across all scenarios. The full hybrid configuration achieves the highest Overall score (0.373), while Scenario C records the highest MSRS (0.825). Scenario E obtains ROUGE-L = 0.181 and BLEU-1 = 0.196 using five manually curated reference answers. Two baseline comparisons further support this contribution: a zero-shot LLM without retrieval correctly answered only 8% of questions, while a BM25 keyword-search baseline, competitive on single-source scenarios, was outperformed on cross-referencing tasks, underscoring the added value of dense multi-source retrieval.  The findings demonstrate that integrating formal documents, structured databases, and discussion logs enhances knowledge transfer and question answering for organizational support and employee onboarding.

Krisna Dwi Setya Adi, Ivan Michael Siregar · 0 citations
Open access Jul 2026

Automated Summarization Tool

The design realization and evaluation of an Automated Summarization Tool (AST) is presented which is a document intelligence platform based on google gemini 2.5 flash that outperforms the strongest fine-tuned transformer baselines (PEGASUS, BART) by ~14 points and is clearly ahead of BERTSUM-ext (a strong transformer baseline), Pointer-Generator Network, TextRank.

K. Kumar, A. Amandeep, Dharmender Kumar et al. · 0 citations
Open access Jul 2026

Development of an Information Service Chatbot for University Websites Based on Natural Language Processing (NLP) and Retrieval-Augmented Generation (RAG)

Academic information services on university websites still largely rely on static systems and complex navigation menus, making it difficult for students and prospective students to obtain information quickly. This study aims to develop an information service chatbot for the Universitas Serambi Mekkah website that integrates Natural Language Processing (NLP) and Retrieval-Augmented Generation (RAG) in an end-to-end manner. The Research and Development (R&D) method was applied, covering system design, implementation, and testing. The system was built using a client-server architecture with React.js on the frontend and FastAPI on the backend, the text-embedding-3-small model from OpenAI for vector representation, ChromaDB as the vector database, and a Large Language Model accessed through OpenRouter for answer generation. Official university documents were extracted using PyPDF as the knowledge base. The testing results indicate that integrating NLP and RAG improves answer accuracy from 58.5% (baseline LLM without RAG) to 89.25%, with an average response time below three seconds. User satisfaction testing obtained an average score of 4.22 out of 5 (very good category). This study concludes that an NLP- and RAG-based chatbot is feasible to be implemented as a digital campus information service. Note: the quantitative results reported here are illustrative and must be replaced with actual field measurements prior to final publication.

Zuhri Yanda, Yeni Yanti, Maulinda et al. · 0 citations
Review Open access Jul 2026

Retrieval-Augmented Generation for Trustworthy Enterprise LLM Assistants

Large language models (LLMs) have changed enterprise knowledge work. Their value, however, is capped by three failures: they hallucinate, their parametric memory is frozen and grows stale, and they cannot read the proprietary data that holds most business answers. Retrieval-Augmented Generation (RAG) targets all three. It grounds generation in passages fetched at inference time from an external, continuously updatable corpus, so answers become verifiable and citation-backed without any model retraining. This paper presents a technical synthesis of RAG for trustworthy enterprise assistants. The end-to-end pipeline is described in full: document chunking, embedding, vector indexing, retrieval, cross-encoder re-ranking, and grounded generation with inline citations. Advanced variants are then surveyed, namely hybrid sparse-dense retrieval, Hypothetical Document Embeddings (HyDE), graph-based RAG, and agentic iterative retrieval. A RAGAS-style evaluation method quantifies faithfulness, answer relevance, and context precision and recall. On an illustrative enterprise question-answering scenario, an advanced configuration that combines hybrid retrieval with cross-encoder re-ranking lifts faithfulness from 0.71 to 0.91 and context precision from 0.62 to 0.84 over naive dense-only RAG. Agentic retrieval reaches 0.95 faithfulness, but pays for it in latency. Enterprise concerns, including document-level access control, data security, cost, and latency budgets, are treated as first-class design constraints. The reported metrics are illustrative. They characterise representative trade-offs rather than a specific deployed study.

Bini P B · 0 citations