How fabiofernandesss/rag3d works
RAG3D is a cross-language retrieval-augmented question-answering product: it ingests documents, searches semantic, lexical, and structural signals, fuses and refines candidates, then returns grounded answers with optional confidence gating and conversation memory. Python provides the broadest documented runtime; JavaScript adds the documented upload/chat web app, and Java/Spring exposes the shared-index API. The README documents the end-to-end stages and shared index; some internal links below rely on SOURCE INDEX references rather than inspected call sites.
Main entry points: engine.py Python RAG engine · ingest.py Document ingestion · retrieve.py Three-axis retrieval · store.py Local store
Components 25
Interfaces and orchestration
- Python RAG engine
rag3d/engine.py - JavaScript engine
rag3d-js/src/engine.js - Web chat app
rag3d-js/web/server.js - Spring API
rag3d-java/src/main/java/io/rag3d/spring/Rag3DController.java - Java API
rag3d-java/src/main/java/io/rag3d/Rag3D.java
Document indexing
- Document ingestion
rag3d/ingest.py - JS ingestion
rag3d-js/src/ingest.js - Text processing
rag3d/textproc.py - Three-axis encoders
rag3d/encoders.py - JS encoders
rag3d-js/src/encoders.js
Retrieval and ranking
- Three-axis retrieval
rag3d/retrieve.py - Retrieval V2
rag3d/retrieval_v2.py - Quantum and RRF fusion
rag3d/fusion.py - Structural reranking
rag3d/rerank.py
Answer and memory
- Evidence confidence
rag3d/confidence.py - Grounded answer reader
rag3d/reader.py - LLM adapters
rag3d/llm.py - Conversation memory
rag3d/memory.py
Storage and portability
- Backend contract
rag3d/backend.py - Local store
rag3d/store.py - Postgres holographic store
rag3d/pgstore.py - Postgres vector store
rag3d/pgvector_store.py
Other components
- User
- PostgreSQL
- LLM service
Connections 33
- User → Web chat app: uploads and asks
- Web chat app → JavaScript engine: routes requests
rag3d-js/web/server.js - User → Python RAG engine: ingests and queries
- User → Spring API: sends API requests
rag3d-java/src/main/java/io/rag3d/spring/Rag3DController.java - Spring API → Java API: delegates
rag3d-java/src/main/java/io/rag3d/spring/Rag3DController.java - Python RAG engine → Document ingestion: ingests documents
rag3d/engine.py - JavaScript engine → JS ingestion: ingests documents
rag3d-js/src/engine.js - Document ingestion → Text processing: normalizes and chunks
rag3d/ingest.py - Document ingestion → Three-axis encoders: encodes chunks
rag3d/ingest.py - Document ingestion → Local store: writes documents
rag3d/ingest.py - Document ingestion → LLM adapters: enriches chunks
rag3d/ingest.py - Python RAG engine → Three-axis retrieval: searches corpus
rag3d/engine.py - Three-axis retrieval → Three-axis encoders: encodes query
rag3d/retrieve.py - Three-axis retrieval → Quantum and RRF fusion: fuses channels
rag3d/retrieve.py - Three-axis retrieval → Local store: retrieves candidates
rag3d/retrieve.py - Three-axis retrieval → Structural reranking: refines candidates
- Retrieval V2 → Quantum and RRF fusion: fuses candidates
rag3d/retrieval_v2.py - Retrieval V2 → Structural reranking: reranks candidates
rag3d/retrieval_v2.py - Python RAG engine → Evidence confidence: gates answers
rag3d/engine.py - Python RAG engine → Grounded answer reader: generates answer
rag3d/engine.py - Python RAG engine → Conversation memory: builds chat context
rag3d/engine.py - Grounded answer reader → LLM adapters: requests completion
rag3d/engine.py - LLM adapters → LLM service: calls provider
rag3d/llm.py - Python RAG engine → Local store: selects backend
rag3d/engine.py - Python RAG engine → Postgres holographic store: selects backend
rag3d/engine.py - Python RAG engine → Postgres vector store: selects backend
rag3d/engine.py - Local store → Backend contract: implements contract
rag3d/store.py - Postgres holographic store → Backend contract: implements contract
rag3d/pgstore.py - Postgres vector store → Backend contract: implements contract
rag3d/pgvector_store.py - Postgres holographic store → PostgreSQL: reads and writes
- Java API → PostgreSQL: uses shared index
- JS ingestion → JS encoders: encodes chunks
rag3d-js/src/engine.js - JavaScript engine → PostgreSQL: uses shared index