This project presents a simple implementation of Agentic Retrieval Augmented Generation (ARAG) in a GUI. We provide a user-friendly graphical user interface (GUI) for interacting ARAG. It empowers users to efficiently query a large corpus of documents for various purposes, including:
- Question Answering: Ask specific questions about a single document or compare answers across multiple documents.
- Summarization: Generate summaries of individual documents or compare summaries to gain deeper insights.
- Comparative Analysis: Leverage ARAG's capabilities to analyze and compare information across different documents.
ARAG GUI leverages a novel architecture:
- Document Agents: Each document within the corpus is equipped with its own "document agent," a specialized tool capable of performing question-answering and summarization tasks within its assigned document.
- Top-Level Agent: A central agent oversees the set of document agents. It retrieves the appropriate tool (document agent) based on the user's query and employs the Chain of Thought (CoT) approach to process the collected responses, generating a comprehensive answer or summary.
ARAG GUI utilizes cutting-edge large language models (LLMs) to power its functionality:
- GPT-3.5-turbo: Serves as the underlying LLM acting as the agents, processing user queries and generating responses for each document.
- LlamaIndex: Provides the core functionalities for interacting with the document corpus, enabling efficient retrieval and indexing.
-
Clone the repository:
git clone https://github.com/oorejola/RAGapp.git
-
Navigate to the project directory:
cd RAGapp
-
Install the required dependencies:
pip install -r requirements.txt
-
Add OpenAI API key:
- Open the
main.py
file and update the line:os.environ["OPENAI_API_KEY"] = "sk-..."
- Open the
-
Running the Application:
python main.py
-
Load documents to query:
- Add documents you want to query to
/docs/
. (As a placeholder, there are currently LLM papers on SelfRAG, CoT, etc.) - Currently, only
.pdf
files are supported.
- Add documents you want to query to
-
Using the GUI:
- Launch the application using
main.py
. - Enter queries or messages in the GUI input field.
- Click the submit button.
- The application retrieves relevant information and generates responses using ARAG.
- Launch the application using