Skip to content

harsh-parakh22/GenAI_RAG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adani AI Labs – PDF RAG Conversational Agent

Objective

This project implements a Retrieval-Augmented Generation (RAG) based conversational agent that answers user questions strictly grounded in a provided PDF document.
The system retrieves relevant context from the document and generates answers only from that context, with clear citations.


Features

  • PDF ingestion and page-wise text extraction
  • Text chunking with page and chunk-level metadata
  • Vector-based retrieval using FAISS
  • Conversational (multi-turn) Q&A
  • Grounded answers with citations (page / chunk references)
  • Explicit refusal when information is not present in the document
  • Retrieval visibility for debugging (top-k chunks + scores)

Tech Stack

  • Python 3.10+
  • Gemini API (for answer generation)
  • FAISS (vector index)
  • LangChain utilities (chunking & retrieval)
  • PyPDF (PDF text extraction)

Project Structure

├── main.py ├── ingest.py ├── rag.py ├── llm.py ├── requirements.txt ├── README.md └── .env

Setup Instructions

1. Install dependencies

pip install -r requirements.txt

2. Set environment variable

Create a .env file or set the variable directly.

Windows

 
 setx GEMINI_API_KEY your_api_key_here

Mac / Linux

export GEMINI_API_KEY=your_api_key_here

Run the Application:

python main.py <path_to_pdf>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages