How sahilshirodkar30/goaguide_ai works
GoaGuide is a Goa-focused conversational RAG application. A user submits a question to the FastAPI service, which applies guardrails and runs a stateful LangGraph workflow: planning routes conversational requests directly to response generation, document queries through retrieval and reranking, and web queries through Tavily search. Separately, document ingestion parses supported formats, chunks and embeds content, then indexes it in Pinecone for later retrieval. The graph preserves these distinct stages; the Streamlit UI is included as a product surface, though its runtime connections are not established by the excerpts. Unsampled UI and guardrail internals are represented conservatively.
Main entry points: graph.py Workflow router · processor.py Ingestion processor · retriever.py Knowledge retriever · responder.py Answer generator
Components 21
API and UI
- FastAPI service
app/main.py - Streamlit interface
app/ui/streamlit_ui.py
Agent workflow
- Workflow router
app/agents/graph.py - Agent state
app/agents/state.py - Query planner
app/agents/nodes/planner.py - Answer generator
app/agents/nodes/responder.py - Knowledge retriever
app/agents/nodes/retriever.py - Web search
app/agents/nodes/web_search.py - LLM gateway client
app/gateway/client.py
Knowledge ingestion
- Format loaders
app/ingestion/loaders - Ingestion processor
app/ingestion/processor.py - Text chunker
app/ingestion/chunking/splitter.py
Retrieval services
- Embedding service
app/services/retrieval/embedding.py - Pinecone index
app/services/retrieval/pinecone_service.py - Semantic reranker
app/services/retrieval/ranking_service.py
Safety and configuration
- Request guardrails
app/guardrails/rails.py - Colang rules
app/guardrails/colang_rules.py - Runtime settings
app/config.py
Other components
- Questioner
- Portkey gateway
- Tavily search
Connections 23
- Questioner → FastAPI service: submits query
app/main.py - FastAPI service → Request guardrails: checks request
app/main.py - FastAPI service → Workflow router: invokes workflow
app/main.py - Request guardrails → Colang rules: loads rules
app/guardrails/rails.py - Workflow router → Query planner: starts at
app/agents/graph.py - Workflow router → Knowledge retriever: routes docs
app/agents/graph.py - Workflow router → Web search: routes web
app/agents/graph.py - Workflow router → Answer generator: routes conversation
app/agents/graph.py - Workflow router → Agent state: uses state
app/agents/graph.py - Knowledge retriever → Answer generator: passes context
app/agents/graph.py - Web search → Answer generator: passes results
app/agents/graph.py - Knowledge retriever → Pinecone index: searches index
app/agents/nodes/retriever.py - Knowledge retriever → Semantic reranker: reranks results
app/agents/nodes/retriever.py - Pinecone index → Embedding service: embeds query
app/services/retrieval/pinecone_service.py - Web search → Tavily search: searches web
app/agents/nodes/web_search.py - Query planner → LLM gateway client: uses model
app/agents/nodes/planner.py - Answer generator → LLM gateway client: uses model
app/agents/nodes/responder.py - LLM gateway client → Portkey gateway: routes requests
app/gateway/client.py - Ingestion processor → Format loaders: dispatches parsing
app/ingestion/processor.py - Ingestion processor → Text chunker: chunks text
app/ingestion/processor.py - Ingestion processor → Embedding service: embeds chunks
app/ingestion/processor.py - Ingestion processor → Pinecone index: upserts vectors
app/ingestion/processor.py - Runtime settings → Pinecone index: configures access
app/services/retrieval/pinecone_service.py