Developing Retrieval Augmented Generation (RAG) based LLM Systems from PDFs: An Experience Report

Ayman Asad Khan, Md Toufique Hasan, Kai Kristian Kemell, Jussi Rasku, Pekka Abrahamsson
10/21/2024
cs.SEcs.AIcs.IR

Official code: GPT-Laboratory/RAG-LLM-Development-Guidebook-from-PDFs (35 stars, MIT, last commit 2024-10-22).

Abstract

This paper presents an experience report on the development of Retrieval Augmented Generation (RAG) systems using PDF documents as the primary data source. The RAG architecture combines generative capabilities of Large Language Models (LLMs) with the precision of information retrieval. This approach has the potential to redefine how we interact with and augment both structured and unstructured knowledge in generative models to enhance transparency, accuracy, and contextuality of responses. The paper details the end-to-end pipeline, from data collection, preprocessing, to retrieval indexing and response generation, highlighting technical challenges and practical solutions. We aim to offer insights to researchers and practitioners developing similar systems using two distinct approaches: OpenAI's Assistant API with GPT Series and Llama's open-source models. The practical implications of this research lie in enhancing the reliability of generative AI systems in various sectors where domain-specific knowledge and real-time information retrieval is important. The Python code used in this work is also available at: https://github.com/GPT-Laboratory/RAG-LLM-Development-Guidebook-from-PDFs.

View on arXivView PDF

Code Implementations(1)

MIT

Code for building specialized RAG systems using PDF documents with OpenAI Assistant API for GPT and LLaMA models, covering the full pipeline from data collection to generation.

355Python, BatchfileSep 25, 20241 years agoMIT

Similar Papers

Cite this paper

@article{khan2024developing,
  title  = {Developing Retrieval Augmented Generation (RAG) based LLM Systems from PDFs: An Experience Report},
  author = {Ayman Asad Khan and Md Toufique Hasan and Kai Kristian Kemell and Jussi Rasku and Pekka Abrahamsson},
  year   = {2024},
  eprint = {2410.15944},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.15944v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.15944.svg)](https://codeofpaper.com/paper/2410.15944)

Discussion