top of page

Create Your First Project

Start adding your projects to your portfolio. Click on "Manage Projects" to get started

Conversational RAG Q&A with PDF Uploads and Chat History

Project type

Interactive Document Retrieval and Q&A System with Persistent Conversational Memory

Date

August, 2023

Location

Ahmedabad

This project is an advanced Conversational Retrieval-Augmented Generation (RAG) Q&A System that allows users to upload PDF documents and ask questions based on their contents. By leveraging chat history, the application maintains context across multiple interactions, making it highly effective for multi-turn conversations where questions build upon previous responses.

Key Features:

1. Document Upload & Ingestion: Users can upload PDF documents that are automatically processed and embedded for easy retrieval.
2. Chat History-Aware System: Maintains a dynamic chat history to provide contextually aware responses. Questions referencing prior responses are reformulated into standalone queries for better accuracy.
3. Embedding and Retrieval: Utilizes FAISS for efficient vector storage and retrieval, allowing fast, contextually relevant search within uploaded PDFs.
4. Conversational Language Model (LLM): Integrates with Groq’s Gemma2-9b-It model for generating concise and contextually accurate responses based on user queries.
5. Dynamic Session Management: Each user session has its unique chat history, making the application scalable and user-specific.

How It Works:
1. Document Processing and Embedding: Upon file upload, PDF documents are split into manageable chunks and transformed into vector embeddings using Hugging Face’s MiniLM.
2. Contextual Question Reformulation: The system reformulates user queries to account for chat history, improving response relevance in multi-turn conversations.
3. Answer Generation with Chat Context: Answers are generated based on retrieved document segments and chat context, with responses limited to three sentences for brevity and clarity.
4. Session-Based Chat History: Each session ID maintains a distinct chat history, ensuring personalized responses for each user and query sequence.

bottom of page