AI Chatbot + RAG
pgvector retrieval grounds every answer in your knowledge.
Every question is embedded and matched against the tenant knowledge base in pgvector. The top-ranked chunks are handed to Gemini as context, so answers stay grounded in the customer’s own content rather than invented by the model.
Data flow
How the pieces connect and where data moves.
Components: Visitor (asks a question), Chat widget (embedded on site), Chat API (FastAPI), RAG retrieval (embed + rank), Knowledge store (pgvector), Gemini (grounded answer). Connections: Visitor to Chat widget; Chat widget to Chat API for question; Chat API to RAG retrieval; RAG retrieval to Knowledge store for similarity search; Knowledge store to RAG retrieval for top chunks; RAG retrieval to Gemini for context + question; Gemini to Chat API for answer; Chat API to Chat widget for streamed reply.
Behavior
How it behaves step by step over time.