How pavan1604-cmyk/rag-evaluation-and-metrics-dashboard works
This is a PDF question-answering RAG application with a Streamlit dashboard and a separate RAGAS evaluation workflow. Users ask questions through the dashboard; the pipeline loads and chunks the report, embeds and retrieves candidate passages, reranks them, then generates an answer. Evaluation runs a question/ground-truth dataset through the same pipeline, scores results with RAGAS, and writes a CSV that the dashboard presents. The dashboard also exposes retrieval diagnostics. The README is empty; unsampled dashboard behavior and storage wiring are not asserted.
Main entry points: rag_pipeline.py RAG pipeline · app.py Streamlit dashboard · run_evaluation.py Evaluation runner · generator.py Answer generator
Components 17
User interface
- Streamlit dashboard
dashboard/app.py
RAG workflow
- Company report
data/company_report.pdf - RAG pipeline
src/rag_pipeline.py - PDF text loader
src/document_loader.py - Text chunker
src/chunker.py - Text embeddings
src/embeddings.py - FAISS retriever
src/retriever.py - Cross-encoder reranker
src/reranker.py - Answer generator
src/generator.py
Evaluation
- Evaluation runner
evaluation/run_evaluation.py - Evaluation questions
evaluation/evaluation_dataset.csv - RAGAS metrics
evaluation/run_evaluation.py - RAGAS LLM adapter
src/ragas_llm.py - RAGAS embedding adapter
src/ragas_embeddings.py - Evaluation results
results/evaluation_results.csv
External services
- Groq API
Other components
- Questioner
Connections 21
- Questioner → Streamlit dashboard: asks question
- Streamlit dashboard → RAG pipeline: loads and queries
dashboard/app.py - RAG pipeline → PDF text loader: loads PDF
src/rag_pipeline.py - Company report → PDF text loader: provides document
- RAG pipeline → Text chunker: chunks text
src/rag_pipeline.py - RAG pipeline → Text embeddings: creates vectors
src/rag_pipeline.py - RAG pipeline → FAISS retriever: builds and searches
src/rag_pipeline.py - RAG pipeline → Cross-encoder reranker: reranks candidates
src/rag_pipeline.py - RAG pipeline → Answer generator: generates answer
src/rag_pipeline.py - Answer generator → Groq API: requests completion
src/generator.py - Evaluation runner → Evaluation questions: reads questions
evaluation/run_evaluation.py - Evaluation runner → RAG pipeline: runs queries
evaluation/run_evaluation.py - Evaluation runner → RAGAS metrics: evaluates responses
evaluation/run_evaluation.py - RAGAS metrics → RAGAS LLM adapter: uses LLM
evaluation/run_evaluation.py - RAGAS metrics → RAGAS embedding adapter: uses embeddings
evaluation/run_evaluation.py - RAGAS LLM adapter → Groq API: requests completion
src/ragas_llm.py - Evaluation runner → Evaluation results: writes scores
evaluation/run_evaluation.py - Streamlit dashboard → Evaluation results: displays evaluation
- Streamlit dashboard → Text embeddings: embeds diagnostic query
dashboard/app.py - Streamlit dashboard → FAISS retriever: searches candidates
dashboard/app.py - Streamlit dashboard → Cross-encoder reranker: reranks candidates
dashboard/app.py