How mohamedhishm/newgen-tech-rag-assistant works
NewGen Tech is a web-based company knowledge assistant. Employees ask questions in the chat UI; the API retrieves relevant passages, asks the LLM for a grounded answer, and returns source snippets for verification. A separate re-index action rebuilds the local knowledge base, while health monitoring reports service and index status. The graph separates ingestion, retrieval, and answer generation. Sampled source shows the runtime calls; other documented capabilities are included where README evidence supports them.
Main entry points: main.py HTTP API · config.py Application settings · script.js Chat and controls · services.py Answer service
Components 15
Employee experience
- Chat and controls
frontend/script.js
API and orchestration
- HTTP API
backend/main.py - Application settings
backend/config.py - Answer and citations
backend/main.py
Knowledge indexing and retrieval
- Company documents
data - Document loading
backend/rag_pipeline.py - Text chunking
backend/rag_pipeline.py - Embedding model
- Embedding builder
backend/rag_pipeline.py - Persistent vector store
backend/rag_pipeline.py - Similarity retrieval
backend/rag_pipeline.py
Grounded answer generation
- Context and prompt
backend/services.py - Groq LLM
- Answer service
backend/services.py
Other components
- Employee
Connections 24
- Employee → Chat and controls: asks or re-indexes
README.md - Chat and controls → HTTP API: submits query
frontend/script.js - Chat and controls → HTTP API: checks health
frontend/script.js - Chat and controls → HTTP API: requests re-index
frontend/script.js - HTTP API → Chat and controls: serves interface
backend/main.py - HTTP API → Application settings: loads configuration
backend/main.py - HTTP API → Similarity retrieval: retrieves chunks
backend/main.py - HTTP API → Answer service: requests answer
backend/main.py - HTTP API → Answer and citations: builds response
backend/main.py - Answer and citations → Chat and controls: returns answer and sources
frontend/script.js - Company documents → Document loading: loads files
README.md - Document loading → Text chunking: splits documents
backend/rag_pipeline.py - Text chunking → Persistent vector store: adds chunks
backend/rag_pipeline.py - Embedding builder → Embedding model: creates embeddings
README.md - Embedding builder → Persistent vector store: configures embeddings
backend/rag_pipeline.py - Application settings → Document loading: sets data directory
backend/rag_pipeline.py - Application settings → Text chunking: sets chunk limits
backend/rag_pipeline.py - Application settings → Persistent vector store: sets store location
backend/rag_pipeline.py - Application settings → Similarity retrieval: sets retrieval limits
backend/rag_pipeline.py - Similarity retrieval → Persistent vector store: searches vectors
backend/rag_pipeline.py - Answer service → Context and prompt: formats context
backend/services.py - Context and prompt → Groq LLM: sends prompt
backend/services.py - Application settings → Answer service: sets model configuration
backend/services.py - Answer service → HTTP API: returns answer
backend/main.py