How arjun1372000/edgerag works
EdgeRAG is a local predictive-maintenance application: an operator submits machine sensor readings, receives a condition and fault assessment, and gets a maintenance report grounded in retrieved procedures. The separate corpus-ingestion path loads and chunks the maintenance documents into a persistent vector store used during analysis. The supplied tree omits the imported predictor implementation and configured data directory, so their internal behavior and the sample-data path are not mapped; the predictor is shown only as a dependency of the condition builder.
Main entry points: docs Maintenance corpus · main.py FastAPI service · script.js Web interface · indexer.py Chunk and index
Components 20
Operator interface
- Web interface
frontend/script.js - FastAPI service
api/main.py
Condition analysis
- Condition builder
src/pipeline/machine_condition.py - Predictive model
src
Maintenance knowledge
- Corpus ingestion
src/ingestion/ingest.py - Document loader
src/ingestion/loader.py - Chunk and index
src/ingestion/indexer.py - Maintenance corpus
docs - Failure procedures
docs/sops - Diagnostics guides
docs/diagnostics - Safety guidance
docs/safety - Maintenance guides
docs/maintenance - Restart procedures
docs/restart - Ollama embeddings
- Chroma vector store
- Evidence retriever
src/retrieval/retriever.py
Evidence and reporting
- Report generator
src/generation/generator.py - Ollama language model
- Maintenance report
api/main.py
Other components
- Operator
Connections 21
- Operator → Web interface: enters readings
- Web interface → FastAPI service: submits analysis
- FastAPI service → Condition builder: analyzes sensors
- Condition builder → Predictive model: predicts faults
- FastAPI service → Evidence retriever: requests evidence
- FastAPI service → Report generator: supplies condition and evidence
- Report generator → Ollama language model: generates report
- FastAPI service → Maintenance report: returns report and evidence
- Web interface → Operator: renders results
- Corpus ingestion → Document loader: loads documents
- Document loader → Maintenance corpus: reads files
- Maintenance corpus → Failure procedures: includes
- Maintenance corpus → Diagnostics guides: includes
- Maintenance corpus → Safety guidance: includes
- Maintenance corpus → Maintenance guides: includes
- Maintenance corpus → Restart procedures: includes
- Corpus ingestion → Chunk and index: chunks and indexes
- Chunk and index → Ollama embeddings: creates vectors
- Chunk and index → Chroma vector store: stores chunks
- Evidence retriever → Ollama embeddings: embeds queries
- Evidence retriever → Chroma vector store: searches vectors