You are helping me build the following AI agent workflow. ## Goal Tax Code Policy Assistant: Ask natural language questions about tax code policies and get precise answers grounded in specific sections of government documents. ## Specification - What it does: Ask natural language questions about complex tax code policies and receive precise answers grounded in specific sections of government documents. It ingests structured policy data into a vector store with chapter and section metadata to ensure accurate, context-aware retrieval rather than generic summaries. - Trigger: Run manually (Manual ยท on demand) - Autonomy: You stay in control - Expected setup effort: a few focused days - Tools/services involved: - n8n: Workflow orchestration - Qdrant Vector Store: Vector storage and metadata filtering - Mistral Cloud: Embeddings generation - OpenAI Chat Model: Conversational AI responses ## Known pitfalls, handle each one explicitly in your implementation 1. Tax codes change frequently so you need a scheduled workflow to re-embed and update the vector store weekly. 2. Large PDFs may exceed token limits during embedding, split binary documents into individual pages before processing. 3. Metadata filtering can become slow with high cardinality, pre-filter by tax year and document type before vector search. ## Reference implementation https://n8n.io/workflows/2341 (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/tax-code-policy-assistant/ via usecasesforagents.com