← BACK TO PORTFOLIO
[SYSTEM.ARCHITECTURE]

AGENTIC FINANCIAL PARSER

8-Node Production-Grade RAG Pipeline with PII Shield, Cross-Questioning Logic & Hallucination Guard

8
Pipeline Nodes
75%
Storage Saved
256d
Jina MRL Vectors
3
Layer Guard
EXECUTIVE SUMMARY

Building Fault-Tolerant Financial Intelligence

The Agentic Financial Parser represents a breakthrough in document intelligence—an 8-node LangGraph orchestration pipeline that processes financial documents with unprecedented accuracy and security.

Engineered with dual Pinecone retrieval, PII Shield for GDPR compliance, and a 3-layer Hallucination Guard, this system delivers production-grade performance handling complex financial queries with contextual understanding.

ARCHITECTURE OVERVIEW

8-Node LangGraph Pipeline

1. Classifier Node Intent-Based Dynamic Routing with Zero-shot Classification
2. PII Shield Node Microsoft Presidio + spaCy PII Masking Engine
3. Cross-Q Node Finite State Machine with Human-in-the-Loop Guard
4. Retriever Node Dual Pinecone Namespace Strategy
5. Validator Node Semantic Similarity Check with Cross-Encoder
6. Synthesizer Node Context-Aware Response Generation
7. Hallucination Guard Faithfulness & Answer Relevance Scoring
8. Output Node Structured Response with Source Citations
NODE BREAKDOWN

Key Pipeline Components

NODE 01
Classifier Node
Intent-Based Dynamic Routing utilizing Zero-shot Intent Classification with 4-way classification via single LLM call. Implements Metadata-driven Namespace Filtering (system_only, user_only, hybrid) to eliminate redundant Pinecone API searches.
Zero-shot Qwen 72B Metadata Filtering
NODE 02
PII Shield Node
GDPR-Compliant PII Masking Engine using Microsoft Presidio with spaCy entity recognition. Real-time anonymization of sensitive financial data with reversible masking for audit trails.
Presidio spaCy GDPR
NODE 03
Cross-Q Node
Finite State Machine with Counter tracking AgentState.cross_question_count. Enforces strict State Machine Termination (max 2 rounds) via Human-in-the-Loop Guard, conditionally routing to Retriever regardless of query vagueness.
FSM HITL Graceful Degradation
NODE 04
Retriever Node
Dual Pinecone Retrieval Strategy with Namespace Isolation. System documents vs User uploads separated for precise context retrieval. Jina MRL 256d embeddings for 75% storage reduction vs 1024d.
Pinecone Jina MRL Dual Namespace
NODE 05
Validator Node
Semantic Similarity Validation using Cross-Encoder models. Filters irrelevant retrieved chunks before synthesis, ensuring only contextually appropriate documents enter the generation phase.
Cross-Encoder Semantic Filtering
NODE 06
Hallucination Guard
3-Layer Guard with Faithfulness Scoring, Answer Relevance Evaluation, and Context Utilization Metrics. Rejects responses below 0.7 confidence threshold with automatic retry logic.
Faithfulness Relevance Threshold 0.7
[KEY INNOVATION]

Dual-Indexing Architecture: Migrated from single 1024d embeddings to dual 256d Jina MRL vectors, achieving 75% storage reduction while maintaining 98.5% retrieval accuracy. System processes 20K+ chunks across financial corpora with sub-200ms retrieval latency.

TECHNICAL SPECIFICATIONS

Stack & Infrastructure

Orchestration
LangGraph 8 Nodes State Machine
LLM Engine
Qwen 2.5 72B OpenRouter 8K Context
Vector Store
Pinecone Dual Namespace Jina MRL 256d
Backend
FastAPI Python 3.11 Async
PRODUCTION METRICS

Performance & Impact

20K+
Total Chunks Processed
75%
Storage Savings
<200ms
Retrieval Latency
98.5%
Retrieval Accuracy
0.7+
Hallucination Threshold
100%
GDPR Compliant