How ramprakash-munugapati/ragram_pro works
RAGRAM_Pro is a hybrid-retrieval library for grounding RAG responses: users index chunks, query them through dense and lexical search, fuse and rerank candidates, then package surviving evidence for a prompt. Its internal layers cover embeddings, storage backends, fusion, reranking and integration adapters. The README documents LangChain, LlamaIndex and generation integrations; their individual implementations were not sampled, so those links are documented capabilities rather than inspected call paths.
Main entry points: engine.py Fusion engine · app.py Demo application · rerank/base.py Reranker interface · storage/base.py Storage interface
Components 26
Application entry
- Demo application
app.py - Fusion configuration
config.py - Environment loader
envfile.py
Retrieval pipeline
- Fusion engine
engine.py - Chunk and result models
models.py - Embedder implementations
embedding.py - Hybrid coordinator
search/coordinator.py - Rank fusion
search/fusion.py - Reranker interface
rerank/base.py - Threshold and top-N
engine.py - Evidence prompt builder
prompts.py
Retrieval backends
- Storage interface
storage/base.py - In-memory storage
storage/memory.py - BM25 lexical index
storage/bm25.py - Postgres storage
storage/postgres.py - HuggingFace reranker
rerank/huggingface.py - Cohere reranker
rerank/cohere.py - Term-overlap reranker
rerank/noop.py
RAG integrations
- LangChain retriever
integrations/langchain.py - LlamaIndex retriever
integrations/llamaindex.py - Sync async bridge
integrations/compat.py - Generation backends
integrations/generation.py
Other components
- Application user
- PostgreSQL database
- Cohere API
- Chat model
Connections 27
- Application user → Demo application: runs demo
README.md - Demo application → Environment loader: loads settings
app.py - Demo application → Fusion configuration: configures
app.py - Demo application → Fusion engine: indexes and queries
app.py - Fusion engine → Embedder implementations: embeds chunks
engine.py - Fusion engine → Storage interface: writes chunks
engine.py - Fusion engine → Hybrid coordinator: dispatches search
engine.py - Hybrid coordinator → Embedder implementations: embeds query
search/coordinator.py - Hybrid coordinator → Storage interface: dispatches streams
search/coordinator.py - Fusion engine → Rank fusion: fuses streams
engine.py - Fusion engine → Reranker interface: reranks candidates
engine.py - Fusion engine → Threshold and top-N: filters and truncates
engine.py - Fusion engine → Evidence prompt builder: builds prompt
engine.py - In-memory storage → Storage interface: implements
storage/memory.py - In-memory storage → BM25 lexical index: builds and searches
storage/memory.py - Postgres storage → Storage interface: implements
storage/postgres.py - Postgres storage → PostgreSQL database: queries and writes
storage/postgres.py - HuggingFace reranker → Reranker interface: implements
rerank/huggingface.py - Cohere reranker → Reranker interface: implements
rerank/cohere.py - Cohere reranker → Cohere API: sends rerank request
rerank/cohere.py - Term-overlap reranker → Reranker interface: implements
README.md - LangChain retriever → Fusion engine: retrieves through
README.md - LlamaIndex retriever → Fusion engine: retrieves through
integrations/llamaindex.py - LlamaIndex retriever → Sync async bridge: bridges async call
integrations/llamaindex.py - Generation backends → Chat model: generates response
README.md - Fusion engine → Chunk and result models: returns results
README.md - Evidence prompt builder → Chat model: packages evidence for
README.md