You are helping me build the following AI agent workflow. ## Goal Web Content Ingestion and RAG Chat: Ingests URLs into a vector database for accurate, cited Q&A using AI retrieval and reranking. ## Specification - What it does: You get instant access to any website's content through a chat interface that answers your questions with accurate citations. This agent scrapes the specified URL, stores its knowledge securely, and uses AI retrieval to provide high-quality responses tailored to your queries. - Trigger: Triggered by an event (Event ยท on webhook URL submission) - Autonomy: Fully hands-off - Expected setup effort: a few focused days - Tools/services involved: - n8n: Workflow orchestration and chat interface - Firecrawl: Web scraping to markdown - Supabase: Vector storage and database management - OpenAI: Generating vector embeddings - Cohere: Reranking retrieval results ## Known pitfalls, handle each one explicitly in your implementation 1. Supabase vector dimensions must match the OpenAI embedding model output size exactly to avoid insertion errors. 2. Cohere reranking adds latency to each query, so implement caching for frequent similar questions to improve response times. 3. Webhook payloads can be large if scraping deep pages, so increase n8n's payload limit or stream data in chunks. ## Reference implementation https://n8n.io/workflows/13911 (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/web-content-ingestion-and-rag-chat/ via usecasesforagents.com