You are helping me build the following AI agent workflow. ## Goal RAG Knowledge Base Chatbot: Ingests PDF knowledge bases via Jotform and answers user chat questions using semantic search and Google Gemini. ## Specification - What it does: You get instant, accurate answers to your questions by chatting with a bot trained specifically on your uploaded PDF documents. The system automatically processes your files from Jotform and uses semantic search to find the right information in Supabase before Google Gemini generates precise responses based only on that knowledge base. - Trigger: Triggered by an event (Event ยท on new Jotform submission or chat message) - Autonomy: Fully hands-off - Expected setup effort: a few focused days - Tools/services involved: - Jotform: Trigger and file upload intake - Supabase: Vector database storage and retrieval - Together AI: Generating text embeddings - Google Gemini Chat Model: LLM for answer generation ## Known pitfalls, handle each one explicitly in your implementation 1. PDF parsing can fail on scanned images so add an OCR step like Tesseract before chunking. 2. Vector search might return irrelevant results if embeddings are noisy, so implement a relevance threshold filter. 3. Context window limits can truncate important information, so prioritize chunks by semantic similarity score. 4. Supabase query latency may increase with large datasets, so add indexing on the vector column. ## Reference implementation https://n8n.io/workflows/9626 (workflow template) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/rag-knowledge-base-chatbot/ via usecasesforagents.com