Case study / AGENTIC PIPELINE
SmartIngest
An agentic document-intelligence pipeline that ingests messy documents and returns validated, routed structured data — with guardrails, grounding and an intelligent retry loop.
Architecture
How it works
Guardrails
Every document is screened first — prompt-injection scanning and PII redaction before anything reaches the model.
Classification
The document is classified and routed to the correct extraction schema, so each type is handled by the right rules.
Extraction
Gemini produces structured output validated against Pydantic models — typed, predictable data instead of free text.
Validation & grounding
Outputs are grounded against the source to catch hallucinations; low-confidence results trigger an automatic retry loop.
Routing
Validated data is routed by deterministic YAML rules to its destination, with full LangSmith tracing end-to-end.
Engineering highlights
72 tests with an eval harness wired as a CI gate
Intelligent retry loop triggered on low-confidence extractions
Deterministic YAML routing + full LangSmith tracing
Next project
RecruitRadar →