## AI Workflow Assistant — Document understanding wired into an existing business process. - URL: https://www.naveentehrpariya.dev/projects/ai-workflow-assistant - Industry: AI / Operations - Client type: SaaS Company - Country: United States - Role: Full Stack Product Engineer - Duration: 4 months - Status: Live - Year: 2025 An assistant that reads incoming operational documents, extracts the fields a team actually keys in by hand, and routes anything it is unsure about to a human, with the source passage attached. ### Problem An operations team was reading PDFs and emails and retyping the same eight fields into an internal tool. It was slow, it was inconsistent between people, and a generic chatbot pilot had failed because nobody could tell where an answer came from. ### Objectives - Extract structured fields from unstructured documents - Make every extraction traceable to its source text - Route low-confidence results to a human instead of guessing - Keep inference cost proportional to document volume ### Solution Documents are chunked and embedded into a vector index; extraction runs as a structured tool call against Claude with a strict schema, so the model returns typed fields rather than prose. Each field carries the passage it came from and a confidence value, and anything below threshold lands in a review queue where a human correction is captured as training signal. Responses are cached by document hash so re-processing costs nothing. ### Features - Structured field extraction with a typed schema - Source-passage citation on every extracted value - Confidence thresholds with human review queue - Semantic search across the processed corpus - Prompt and cost caching by document hash - Per-team usage and spend reporting ### Stack - Frontend: Next.js, React, Tailwind CSS - Backend: Node.js, Express - Database: PostgreSQL, pgvector, Redis - Cloud: AWS, Vercel, Docker - Integrations: Claude API, OpenAI embeddings, LangChain ### Engineering challenges ### An assistant nobody trusted Problem: The earlier pilot returned confident prose with no provenance, so reviewers had to re-read the document anyway and the tool saved nothing. Approach: Every field returns with the exact passage it was drawn from, turning review into a glance at a highlight rather than a full re-read. ### Cost that scaled with retries, not with work Problem: Re-processing a document after any pipeline change re-paid for inference that had not changed. Approach: Results are cached against a hash of the document and the prompt version, so only genuinely new work reaches the model. ### Outcome - Manual re-keying replaced by review of pre-filled, cited fields - Uncertain extractions surfaced for humans instead of silently guessed - Repeat processing made effectively free through hash-based caching ### What it taught The hard part of shipping AI in a business process is not the model. It is provenance, thresholds and a human path for the cases the model should not decide. Case study: https://www.naveentehrpariya.dev/projects/ai-workflow-assistant More work: https://www.naveentehrpariya.dev/llms.txt