How harshbhanushali26/hari works
hArI is a Streamlit document-intelligence application: users upload PDFs or spreadsheets, ask questions, and receive cited document answers or tabular analysis. Its principal workflow enters through the UI handlers, which ingest files, route questions, retrieve PDF context or execute generated SQL, and request a final response. The graph preserves both engines, chat memory/persistence, and authentication. Evidence is limited to the README and supplied excerpts/index; unsampled subsystems are included only where documented, with uncertain links omitted.
Main entry points: handlers.py Workflow Handlers · app.py Streamlit App · components.py Chat Components · retriever.py Hybrid Retrieval
Components 17
User Interface
- Streamlit App
app.py - Authentication UI
ui/auth.py - Chat Components
ui/components.py - Workflow Handlers
ui/handlers.py - Session State
ui/state.py - Supabase Auth
File Ingestion
- File Extraction
core/file_processor.py
PDF Retrieval
- Chunking & Embedding
rag/embedder.py - Vector Store
rag/vector_store.py - Hybrid Retrieval
rag/retriever.py - Supabase PostgreSQL
Tabular Analytics
- Sandboxed DuckDB
ui/handlers.py
Conversation Services
- Query Router
core/query_intent.py - Groq LLM
- Response Generation
core/responser.py - Chat Memory
core/memory.py
Other components
- User
Connections 24
- User → Streamlit App: uses
README.md - Streamlit App → Authentication UI: renders
app.py - Streamlit App → Session State: initializes
app.py - Streamlit App → Chat Components: renders
app.py - Chat Components → Workflow Handlers: invokes
ui/components.py - Authentication UI → Supabase Auth: authenticates
ui/auth.py - Workflow Handlers → File Extraction: loads files
ui/handlers.py - Workflow Handlers → Chunking & Embedding: embeds chunks
ui/handlers.py - Workflow Handlers → Vector Store: stores chunks
ui/handlers.py - Chunking & Embedding → File Extraction: chunks documents
rag/embedder.py - Vector Store → Supabase PostgreSQL: writes chunks
rag/vector_store.py - Workflow Handlers → Query Router: routes query
ui/handlers.py - Workflow Handlers → Hybrid Retrieval: retrieves context
ui/handlers.py - Hybrid Retrieval → Chunking & Embedding: embeds query
rag/retriever.py - Hybrid Retrieval → Supabase PostgreSQL: hybrid search
rag/retriever.py - Workflow Handlers → Sandboxed DuckDB: executes SQL
ui/handlers.py - Workflow Handlers → Groq LLM: generates SQL
ui/handlers.py - Workflow Handlers → Response Generation: requests answer
ui/handlers.py - Response Generation → Groq LLM: generates response
core/responser.py - Workflow Handlers → Chat Memory: loads context
ui/handlers.py - Chat Memory → Groq LLM: summarizes history
- Workflow Handlers → Supabase PostgreSQL: persists chats
ui/handlers.py - User → Chat Components: asks questions
README.md - Chat Components → User: shows answers
ui/components.py