Recent posts

OCR Evaluation, Rebuilt for Insurance Claims in GenAI Era

3 minute read

Processing scanned claim PDFs used to be “good enough” if the text was mostly readable. In the GenAI era, that’s no longer true: if OCR misses a checkbox, scrambles a table, or loses layout context, the document becomes unreliable for extraction, retrieval, and automated decisions. Insurance makes this worse—many documents are old, low-quality scans with handwriting and dense forms—so we need evaluation that reflects real usability, not just character-perfect transcription.

DSPy, Meet Enterprise: Plugging in an Internal LLM Endpoint

2 minute read

DSPy is powerful, but many enterprise environments can’t call public LLM endpoints directly. This guide shows a minimal, practical way to plug an internal (non-standard) LLM service into DSPy by writing a custom dspy.BaseLM adapter.

Handling Long-Running Tasks in Modern Web Apps

4 minute read

In this post, I explore how modern web apps like RAGflow handle long-running tasks (such as OCR or keyword extraction) without relying on time-limited HTTP API methods. Instead, tasks are processed in the background by worker processes, with progress updates communicated to the frontend via Redis. I demonstrate this design with a simple app built using FastAPI, Vue 3, and Redis, where tasks are submitted, processed in the background, and their statuses are periodically updated on the frontend...