A MULTI-FORMAT RETRIEVAL-AUGMENTED GENERATION AGENT FOR CONVERSATIONAL DOCUMENT QUESTION ANSWERING

Authors

  • Umair Aslam Author
  • Wajid Ali Author
  • Muhammad Ahmad Hanif Author
  • Hifza Rani Author
  • Basit Bashir Author
  • Muhammad Yousif Author

Keywords:

Retrieval-Augmented Generation; conversational question answering; document understanding; multi-format ingestion; semantic retrieval; hybrid search; large language models; source grounding

Abstract

Large language models (LLMs) allow for interactive dialogue with texts in natural language, but can give answers that cannot be verified when answering questions that rely on private data, special knowledge or user data. The limitation here can be overcome by Retrieval-Augmented Generation (RAG), where relevant evidence from external knowledge sources is retrieved and fed into the generation of the answer. In this paper, we propose the design and evaluation of a Multi-Format Retrieval-Augmented Generation Agent for Conversational Document Question Answering. The proposed system supports various types of documents such as PDF, DOCX, PPTX, TXT, CSV, Excel spreadsheets, and documents with images by extracting text from specific formats and converting images to text (OCR) where applicable. Extracted content is segmented into smaller pieces, semantically embedded, represented by lexical features, and retrieved using different strategies such as BM25, dense, hybrid and hybrid with reranking. A conversational query manager provides for the preservation of session context and chat history for the purpose of continuation of the conversation, and there is evidence-grounded prompting, citations on sources and an abstention mechanism to enhance the credibility of answers and the verifiability of the answer source. The system is tested for eight questions on test set and the evaluation is done on Recall@5, Mean Reciprocal Rank (MRR), faithfulness, response latency and correct abstention. The results reported above indicate that both dense retrieval and the full conversational multi-format agent achieved Recall@5 and MRR scores of 1.000, and had faithfulness and correct abstention scores of 1.000 for all five of their configurations. Latency of the full agent was 3.37 seconds, the dense retrieval 1.87 seconds and the hybrid retrieval with reranking 4.46 seconds. The preliminary results show good retrieval and answer grounding, but the results may be limited in generalizability due to the small test set. The proposed framework lays the foundations to make document question answering within heterogeneous document formats accessible, citeable and context-aware.

Downloads

Published

2026-10-24