How nandishh18/rag-agent-judge works
This repository is a paper-focused RAG chatbot. Its main workflow builds a local searchable index from a PDF, then embeds a user question, retrieves relevant chunks, and sends them with the question to Groq for a grounded answer. It also supports generating a Markdown answer set for 15 assignment questions. The relationships below are supported by the sampled source and README; the generated index is documented but is not present in the file tree.
Main entry points: rag_chat.py Chunk Retrieval · build_index.py Index Builder · answer_questions.py Question Runner · ingest.py PDF Extraction
Components 16
Indexing
- Index Builder
src/build_index.py - PDF Extraction
src/ingest.py - Text Embeddings
src/build_index.py - FAISS Index
src/build_index.py - Chunk Metadata
src/build_index.py
Question Answering
- Interactive Chat
src/rag_chat.py - RAG Chatbot
src/rag_chat.py - Query Embedding
src/rag_chat.py - Chunk Retrieval
src/rag_chat.py - Prompt Assembly
src/rag_chat.py - Grounded Answer
src/rag_chat.py
Batch Answers
- Question Runner
src/answer_questions.py - Answer Report
src/answer_questions.py
Other components
- Paper PDF
data/agent_as_a_judge.pdf - User
- Groq LLM
Connections 17
- Paper PDF → PDF Extraction: extracts pages
README.md - PDF Extraction → Index Builder: loads chunks
src/build_index.py - Index Builder → Text Embeddings: embeds chunks
src/build_index.py - Text Embeddings → FAISS Index: adds vectors
src/build_index.py - Index Builder → Chunk Metadata: writes metadata
src/build_index.py - User → Interactive Chat: asks questions
README.md - Interactive Chat → RAG Chatbot: calls answer
src/rag_chat.py - RAG Chatbot → Chunk Retrieval: retrieves chunks
src/rag_chat.py - Chunk Retrieval → Query Embedding: embeds query
src/rag_chat.py - Chunk Retrieval → FAISS Index: searches index
src/rag_chat.py - Chunk Retrieval → Chunk Metadata: reads chunks
src/rag_chat.py - RAG Chatbot → Prompt Assembly: assembles context
src/rag_chat.py - Prompt Assembly → Groq LLM: requests completion
src/rag_chat.py - Groq LLM → Grounded Answer: returns answer
src/rag_chat.py - Grounded Answer → Interactive Chat: prints answer
src/rag_chat.py - Question Runner → RAG Chatbot: calls answer
src/answer_questions.py - Question Runner → Answer Report: writes report
src/answer_questions.py