End-to-End Data Analysis Agent (DeepSeek-OCR + vLLM)
Drop in a PDF / table image: DeepSeek-OCR parses structured data, FastAPI runs analysis, charts auto-render. OCR / analysis / viz are three swappable layers.
A guided replay of the three-layer system on a sample financial table: ocr_service parses table structure, analysis_service computes KPIs + an LLM summary, visualization_service lets the LLM pick the chart type and renders it.
Why this local version exists
This replays the architecture from the real project (core/ocr · core/analysis · core/visualization wired by integration_service). It calls no live vLLM/LLM — the sample table, KPIs, and chart-type choice illustrate the real per-layer behavior.
Run the three-layer analysis pipeline
Replays OCR → analysis → visualization on a sample financial table: each layer is its own service + core, wired by integration_service.
Input document
2024 quarterly revenue report (PDF scan)
ocr_service → core/ocr (DeepSeek-OCR-2 · vLLM)
Table-structure parse → cells with row/col coordinates, not flat text.
analysis_service → core/analysis (pandas + LLM)
Stats over the structured table, then an LLM summary → {summary, kpis, anomalies}.
visualization_service → core/visualization
LLM first picks the chart type, then the matching renderer draws it.
Swappable layers
Swapping the OCR engine touches only core/ocr/ — the service interface is unchanged; a new chart is just another renderer in core/visualization/.
Activity log
Run the pipeline to watch a PDF table become a chart.
What to try
Run the pipeline and watch a PDF table become structured cells, then KPIs, then a chart.
Note the OCR latency badge — vLLM brings DeepSeek-OCR-2 to 0.6s/page vs ~3s on bare transformers.
See that the LLM picks the chart type before rendering, instead of a hard-coded if-else.
What this demo proves
You build layered AI systems — OCR / analysis / visualization as separate service + core, not a monolith.
You match the OCR engine to the task: table-structure-aware (DeepSeek-OCR-2) beats flat-text OCR for financial / research tables.
You care about inference latency, deploying on vLLM rather than bare transformers.
Architecture
ocr_service · analysis_service · visualization_service · integration_service
OCR latency
DeepSeek-OCR-2 on vLLM: ~0.6s/page (vs ~3s on bare transformers)
Best signal
Swappable layers + latency-aware deployment for a real-time loop