How samarth3394/smart-company-assistant works
Nexora is a CLI support assistant whose main workflow accepts a question, routes it to document-based answering, live status lookup, or ticket creation, then reviews the answer and may retry once. A separate ingestion workflow builds the FAISS index used by RAG. The graph also retains conversation state per thread. The graph, CLI, ingestion, and supporting modules are excerpted; connections for documented capabilities are cited to the README where appropriate.
Main entry points: graph.py Question router · config.py Model configuration · ingest.py Document ingestion · rag_chain.py Retrieval chain
Components 19
Chat entry
- Chat CLI
src/main.py
Agent workflow
- Workflow graph
src/graph.py - Question router
src/graph.py - Answer review
src/graph.py - RAG answering
src/graph.py - Tool answering
src/graph.py - Ticket extraction
src/graph.py - Conversation memory
src/graph.py
Document knowledge
- Document ingestion
src/ingest.py - HR policy
data/hr_policy.md - Product FAQ
data/product_faq.md - FAISS index
src/ingest.py - Retrieval chain
src/rag_chain.py
Models and tools
- Prompt templates
src/prompts.py - Ticket schema
src/schemas.py - Status lookup tools
src/tools.py - Model configuration
src/config.py
Other components
- User
- Google Gemini
Connections 28
- User → Chat CLI: asks
src/main.py - Chat CLI → Workflow graph: invokes
src/main.py - Workflow graph → Question router: starts at
src/graph.py - Question router → RAG answering: routes RAG
src/graph.py - Question router → Tool answering: routes tools
src/graph.py - Question router → Ticket extraction: routes ticket
src/graph.py - RAG answering → Answer review: sends answer
src/graph.py - Tool answering → Answer review: sends answer
src/graph.py - Ticket extraction → Answer review: sends answer
src/graph.py - Answer review → Question router: retries once
src/graph.py - Workflow graph → Conversation memory: configures
src/graph.py - Document ingestion → HR policy: loads
src/ingest.py - Document ingestion → Product FAQ: loads
src/ingest.py - Document ingestion → FAISS index: builds and saves
src/ingest.py - RAG answering → Retrieval chain: invokes
src/graph.py - Retrieval chain → FAISS index: retrieves from
src/rag_chain.py - Retrieval chain → Prompt templates: uses RAG prompt
src/rag_chain.py - Question router → Prompt templates: uses router prompt
src/graph.py - Tool answering → Prompt templates: uses tool prompt
src/graph.py - Ticket extraction → Prompt templates: uses ticket prompt
src/graph.py - Ticket extraction → Ticket schema: extracts to
src/graph.py - Tool answering → Status lookup tools: invokes tools
src/graph.py - Model configuration → Google Gemini: initializes models
src/config.py - Question router → Model configuration: calls model
src/graph.py - Tool answering → Model configuration: calls model
src/graph.py - Ticket extraction → Model configuration: calls model
src/graph.py - Retrieval chain → Model configuration: uses model and embeddings
src/rag_chain.py - Document ingestion → Model configuration: uses embeddings
src/ingest.py