How pavankumarmanagoli/biomedical-rag works
Biomedical-RAG automates SPM terminology expansion, literature collection, semantic search, evidence-grounded Q&A, interaction extraction, and knowledge-graph loading. Its principal user workflow is a question in the Streamlit chat, followed by FAISS retrieval and a Mistral answer with supporting sources. The broader documented pipeline also includes PubChem synonym expansion and PubMed/PMC collection, which feed indexing and downstream interaction analysis. Edges use sampled source excerpts or README statements; unsampled connections are omitted where their implementation cannot be verified.
Main entry points: extract_interactions.py Interaction Extractor · app.py RAG Chat · get_pubchem_synonyms.py Synonym Expansion · get_pubmed_data.py Paper Collection
Components 17
Literature Collection
- SPM Catalog
get_pubchem_synonyms.py - Synonym Expansion
get_pubchem_synonyms.py - Paper Collection
get_pubmed_data.py - MongoDB Papers
Retrieval and QA
- Index Builder
rag_app/build_index_mongo_chunks.py - Document Formatter
rag_app/utils.py - FAISS Index
- RAG Chat
rag_app/app.py - Embedding Model
- Mistral QA
Interaction Analysis
- Interaction Extractor
rag_app/extract_interactions.py - MongoDB Interactions
Knowledge Graph
- Graph Loader
rag_app/neo4j_load.py - Neo4j
Other components
- PubChem
- PubMed / PMC
- Researcher
Connections 19
- SPM Catalog → Synonym Expansion: provides catalog
README.md - Synonym Expansion → PubChem: fetches synonyms
get_pubchem_synonyms.py - Synonym Expansion → Paper Collection: expands terms
README.md - Paper Collection → PubMed / PMC: retrieves papers
get_pubmed_data.py - Paper Collection → MongoDB Papers: stores papers
get_pubmed_data.py - MongoDB Papers → Index Builder: reads papers
README.md - Index Builder → Document Formatter: formats documents
rag_app/build_index_mongo_chunks.py - Index Builder → FAISS Index: builds index
rag_app/build_index_mongo_chunks.py - Researcher → RAG Chat: asks question
rag_app/app.py - RAG Chat → Embedding Model: embeds query
rag_app/app.py - RAG Chat → FAISS Index: searches chunks
rag_app/app.py - RAG Chat → Mistral QA: requests answer
rag_app/app.py - Interaction Extractor → FAISS Index: retrieves context
rag_app/extract_interactions.py - Interaction Extractor → Embedding Model: embeds SPM
rag_app/extract_interactions.py - Interaction Extractor → Mistral QA: extracts relations
rag_app/extract_interactions.py - Interaction Extractor → MongoDB Interactions: upserts evidence
rag_app/extract_interactions.py - MongoDB Papers → Graph Loader: reads papers
rag_app/neo4j_load.py - MongoDB Interactions → Graph Loader: reads interactions
rag_app/neo4j_load.py - Graph Loader → Neo4j: loads graph
rag_app/neo4j_load.py