How 065039/nexa_core_rag works
NexaCore AI is an enterprise policy and compliance Q&A platform. Departmental source files are converted and indexed, then employees ask questions through the web interface with role and department filters; the RAG engine retrieves permitted evidence, generates a grounded response, and presents citations or a not-found/restricted result. The graph preserves documented version-aware and cross-department retrieval, table-row indexing, and model caching. Some implementation details are unsampled, so uncertain internal call links are omitted.
Main entry points: rag.py RAG engine · parser.py Docling conversion · indexing.py Chunk and index · streamlit_app.py Streamlit Q&A
Components 16
Document ingestion
- Department documents
data/raw - Document registry
data/document_registry.csv - Docling conversion
src/parser.py - Converted corpus
data/converted - Chunk and index
src/indexing.py
Question answering
- Streamlit Q&A
app/streamlit_app.py - RAG engine
src/rag.py - Cited response
src/models.py
Access and configuration
- Role policy
config/roles.yaml - Access rules
src/access.py - Runtime settings
src/config.py
Storage and models
- Qdrant vectors
docker-compose.yml - Embedding model
src/models.py
Other components
- Employee
- Ollama Cloud
- Docling parser
Connections 19
- Employee → Streamlit Q&A: asks question
- Streamlit Q&A → RAG engine: submits query
- RAG engine → Streamlit Q&A: returns response
- Streamlit Q&A → Cited response: renders citations
- Department documents → Docling conversion: supplies files
- Document registry → Docling conversion: provides metadata
- Docling conversion → Docling parser: converts documents
- Docling conversion → Converted corpus: writes Markdown and JSON
- Converted corpus → Chunk and index: supplies Markdown
- Chunk and index → Embedding model: creates vectors
- Chunk and index → Qdrant vectors: writes indexed chunks
- RAG engine → Qdrant vectors: retrieves filtered chunks
- RAG engine → Access rules: checks role access
- Access rules → Role policy: loads role rules
- RAG engine → Ollama Cloud: generates grounded answer
- RAG engine → Embedding model: embeds query
- Runtime settings → RAG engine: configures runtime
- Runtime settings → Docling conversion: configures conversion
- Runtime settings → Chunk and index: configures indexing