How ishanjais01io/ragcorp works
RAGCorp ingests PDF files into a persistent chunk index, then serves chat queries by retrieving indexed text and generating grounded answers. Its ingestion stages include page extraction/OCR, hierarchical chunking, embedding and index persistence, plus manifest tracking and index synchronization. The tree also contains separate routing, retrieval, reranking, groundedness, and generation components, but excerpts do not establish how these are wired into the serving path. The graph shows only relationships visible in excerpts or the source index.
Main entry points: run_ingestion.py Ingestion pipeline · generation.py Retrieval and answer functions · config.py Runtime configuration · chunker.py Hierarchical chunker
Components 18
Document ingestion
- Ingestion pipeline
ingestion/run_ingestion.py - PDF page extractor
ingestion/extractors.py - Hierarchical chunker
ingestion/chunker.py - Text embedding
ingestion/run_ingestion.py - Chroma index
ingestion/run_ingestion.py - Ingestion manifest
ingestion/run_ingestion.py
Chat serving
- Gradio chat app
serving/app.py - Retrieval and answer functions
serving/generation.py - Groq generator
serving/generator.py
Retrieval components
- Retriever
serving/retriever.py - Query intent router
serving/router.py - Fusion reranker
serving/reranker.py - Groundedness checks
serving/groundedness.py
Shared models
- Ingestion data models
shared/schema.py - Runtime configuration
shared/config.py
Other components
- Chat user
- Hugging Face dataset
- Groq API
Connections 15
- Chat user → Gradio chat app: asks question
serving/app.py - Gradio chat app → Retrieval and answer functions: calls retrieval and generation
serving/app.py - Retrieval and answer functions → Chroma index: queries chunks
serving/generation.py - Retrieval and answer functions → Groq API: requests completion
serving/generation.py - Ingestion pipeline → PDF page extractor: processes pages
ingestion/run_ingestion.py - Ingestion pipeline → Hierarchical chunker: chunks extracted text
ingestion/run_ingestion.py - Hierarchical chunker → Ingestion data models: creates chunks
ingestion/chunker.py - Ingestion pipeline → Ingestion data models: loads manifest
ingestion/run_ingestion.py - Ingestion pipeline → Runtime configuration: reads settings
ingestion/run_ingestion.py - Ingestion pipeline → Text embedding: encodes chunk text
ingestion/run_ingestion.py - Ingestion pipeline → Chroma index: adds embeddings
ingestion/run_ingestion.py - Ingestion pipeline → Ingestion manifest: saves progress
ingestion/run_ingestion.py - Ingestion pipeline → Hugging Face dataset: uploads index folder
ingestion/run_ingestion.py - Fusion reranker → Runtime configuration: reads model setting
serving/reranker.py - Groq generator → Runtime configuration: reads model setting
serving/generator.py