How yuan7code/meddra-coding-ai works
MedDRA-Coding-AI is a pharmacovigilance coding assistant. Its main workflow accepts a medical term in the Streamlit UI, retrieves and ranks MedDRA candidates, selects a code with LLM reasoning, and presents the result with hierarchy context. A separate documented workflow parses MedDRA ASCII dictionaries and builds language/version-specific indexes. The graph includes both FAISS and optional Chroma paths; edges are limited to relationships shown in excerpts or stated in the README, so some internal details of the orchestration remain unexpanded.
Main entry points: rag_agent.py RAG orchestrator · build_index.py Index build CLI · parser.py ASCII parser · main.py Streamlit UI
Components 14
Coding interface
- Streamlit UI
meddra_rag_assistant/main.py
RAG workflow
- RAG orchestrator
meddra_rag_assistant/modules/rag_agent.py - Candidate retrieval
meddra_rag_assistant/modules/retriever.py - Chroma retrieval
meddra_rag_assistant/modules/vectorstore_chroma.py - Hierarchy resolver
meddra_rag_assistant/modules/hierarchy.py - LLM client
meddra_rag_assistant/modules/llm_client.py
Index construction
- Index build CLI
meddra_rag_assistant/build_index.py - ASCII parser
meddra_rag_assistant/modules/parser.py - FAISS builder
meddra_rag_assistant/modules/vectorizer.py - Chroma builder
meddra_rag_assistant/modules/vectorstore_chroma.py
Vector stores
- FAISS index files
- Persistent Chroma store
Other components
- Medical coder
- LLM backends
Connections 15
- Medical coder → Streamlit UI: enters term
README.md - Streamlit UI → RAG orchestrator: submits query
meddra_rag_assistant/main.py - RAG orchestrator → Candidate retrieval: searches candidates
meddra_rag_assistant/modules/rag_agent.py - RAG orchestrator → Chroma retrieval: selects backend
meddra_rag_assistant/modules/rag_agent.py - RAG orchestrator → Hierarchy resolver: resolves hierarchy
meddra_rag_assistant/modules/rag_agent.py - RAG orchestrator → LLM client: requests reasoning
meddra_rag_assistant/modules/rag_agent.py - LLM client → LLM backends: calls provider
meddra_rag_assistant/modules/llm_client.py - RAG orchestrator → Streamlit UI: returns response
meddra_rag_assistant/main.py - Index build CLI → ASCII parser: parses dictionaries
meddra_rag_assistant/build_index.py - Index build CLI → FAISS builder: builds FAISS
meddra_rag_assistant/build_index.py - Index build CLI → Chroma builder: builds Chroma
meddra_rag_assistant/build_index.py - ASCII parser → FAISS builder: provides documents
README.md - ASCII parser → Chroma builder: provides documents
README.md - FAISS builder → FAISS index files: writes index files
meddra_rag_assistant/modules/vectorizer.py - Chroma builder → Persistent Chroma store: persists collection
meddra_rag_assistant/modules/vectorstore_chroma.py