How gramosoftai/gsearchai works
GRAG is a self-hosted, multi-tenant enterprise search and Graph RAG platform. Its documented workflow takes unstructured content through ontology-aware ingestion and triplet/vector preparation into Neo4j and PostgreSQL, then performs hybrid retrieval and grounded answer generation. The graph also preserves documented table analytics, ontology, and tenant-isolation capabilities. Source excerpts and the SOURCE INDEX support several implementation links; other branches are included from README claims with documented edges. Some subsystem internals were not sampled, so their implementation-level connections are not inferred.
Main entry points: service.py Ingestion Service · pipeline.py Hybrid Retrieval · database.py PostgreSQL · neo4j_repository.py Tenant Graph Repository
Components 22
Knowledge Ingestion
- Knowledge Base API
app/modules/knowledge_bases/routes.py - Ingestion Service
app/modules/knowledge_bases/service.py - PDF Extraction
app/core/pdf_extractor.py - Spreadsheet Ingestion
app/modules/knowledge_bases/services/excel_ingestion_service.py - Web Scraping
app/modules/knowledge_bases/services/scraper_service.py - Content Connectors
app/modules/connectors
Knowledge Layer
- Triplet Extraction
app/core/triplet_extractor.py - Ontology Service
app/modules/ontology/service.py - Embeddings
app/core/embeddings.py - PostgreSQL
app/core/database.py - Tenant Graph Repository
app/core/neo4j_repository.py - Neo4j
app/core/neo4j.py
Search And Answers
- Chat API
app/modules/chats/routes.py - Chat Service
app/modules/chats/service.py - Query Router
app/modules/rag/query_router.py - Hybrid Retrieval
app/modules/rag/pipeline.py - Answer Generation
app/core/llm/deepinfra_llm.py - Table Analytics
app/modules/rag/pandas_engine.py
Platform Services
- Authentication
app/modules/auth/routes.py - Tenant Isolation
app/core/database.py - Web Dashboard
frontend/Grag-g-soft/app/dashboard/conversation/page.tsx
Other components
- Enterprise User
Connections 24
- Enterprise User → Knowledge Base API: submits content
README.md - Knowledge Base API → Ingestion Service: invokes
app/modules/knowledge_bases/routes.py - Ingestion Service → PDF Extraction: extracts documents
app/modules/knowledge_bases/service.py - Ingestion Service → Triplet Extraction: extracts facts
app/modules/knowledge_bases/service.py - Ingestion Service → Embeddings: creates vectors
app/modules/knowledge_bases/service.py - Ingestion Service → Tenant Graph Repository: writes graph
app/modules/knowledge_bases/service.py - Spreadsheet Ingestion → Ontology Service: maps schema
app/modules/knowledge_bases/services/excel_ingestion_service.py - Ingestion Service → Web Scraping: uses scraper
app/modules/knowledge_bases/service.py - Ingestion Service → PostgreSQL: stores metadata
app/modules/knowledge_bases/service.py - Tenant Graph Repository → Neo4j: executes queries
app/core/neo4j_repository.py - Ingestion Service → PostgreSQL: persists records
app/modules/knowledge_bases/service.py - PostgreSQL → Hybrid Retrieval: stores vectors
README.md - Neo4j → Hybrid Retrieval: provides graph data
README.md - Enterprise User → Chat API: asks question
README.md - Chat API → Chat Service: routes request
app/modules/chats/routes.py - Chat Service → Hybrid Retrieval: requests retrieval
app/modules/chats/service.py - Hybrid Retrieval → Query Router: routes query
app/modules/rag/pipeline.py - Hybrid Retrieval → Tenant Graph Repository: retrieves graph
app/modules/rag/pipeline.py - Hybrid Retrieval → Embeddings: searches vectors
app/modules/rag/pipeline.py - Hybrid Retrieval → Answer Generation: generates answer
app/modules/rag/pipeline.py - Hybrid Retrieval → Table Analytics: handles tabular queries
app/modules/rag/pipeline.py - Enterprise User → Authentication: authenticates
README.md - Tenant Isolation → PostgreSQL: enforces RLS
app/core/database.py - Web Dashboard → Chat API: sends chat