How aimlnitishkumar/project-enterprise-rag-compliance-assistant works
ShryAI is a local-first PDF question-answering app. Users upload PDFs and build a persistent index, then ask questions; the app retrieves and reranks passages, generates a cited answer through a configured language-model provider, and displays the answer with its sources. A separate Evaluation tab computes lexical proxy metrics and can append aggregate values to a JSONL log. The README documents these capabilities; the sampled source shows the main orchestration and implementations. External library internals and unsampled UI details are not mapped.
Main entry points: app.py Streamlit app · generator.py Grounded generation · retriever.py Hybrid candidate retrieval · ingestion.py PDF extraction and chunking
Components 15
PDF indexing
- Staged PDFs
data - PDF extraction and chunking
src/ingestion.py - Local embeddings
src/ingestion.py - Persistent Chroma index
vector_store
Evidence retrieval
- Hybrid candidate retrieval
src/retriever.py - Passage reranking
src/retriever.py - Retrieved passages
src/retriever.py
Answer generation
- Grounded generation
src/generator.py - Groq or OpenAI
- Citation validation
src/generator.py
Evaluation
- Evaluation proxies
src/evaluation.py - Metrics JSONL
Other components
- User
- Streamlit app
app.py - Answer and source display
app.py
Connections 19
- User → Streamlit app: uses
README.md - Streamlit app → Staged PDFs: saves PDFs
app.py - Streamlit app → PDF extraction and chunking: builds index
app.py - Staged PDFs → PDF extraction and chunking: provides PDFs
README.md - PDF extraction and chunking → Local embeddings: embeds chunks
README.md - Local embeddings → Persistent Chroma index: writes vectors
src/ingestion.py - Streamlit app → Persistent Chroma index: reads stats
app.py - Streamlit app → Hybrid candidate retrieval: retrieves passages
app.py - Hybrid candidate retrieval → Persistent Chroma index: semantic search
src/retriever.py - Hybrid candidate retrieval → Passage reranking: ranks candidates
src/retriever.py - Passage reranking → Retrieved passages: returns passages
src/retriever.py - Streamlit app → Grounded generation: requests answer
app.py - Retrieved passages → Grounded generation: supplies evidence
app.py - Grounded generation → Groq or OpenAI: invokes model
src/generator.py - Grounded generation → Citation validation: checks citations
src/generator.py - Citation validation → Answer and source display: returns answer
app.py - Retrieved passages → Answer and source display: displays references
app.py - Streamlit app → Evaluation proxies: evaluates response
app.py - Evaluation proxies → Metrics JSONL: appends metrics
src/evaluation.py