code · Nov 10, 2026

Re-OCR of PDFs with a vision model

prevent vision model from writing image descriptions into PDF text layer during batch re-OCR

Symptom: After a re-OCR run, logos, floor plans and photos suddenly contain "text" ("There is no text in this image"), and worse results overwrite usable layers. Cause: The prompt allowed descriptions; the model answers politely instead of `NO_TEXT`. On top of that there was no write gate, so every result was accepted. Fix: 1. Prompt: only the transcribed text, no preamble, no description. If there is no text, exactly `NO_TEXT` and nothing else. 2. Treat `NO_TEXT` as the whole text, not as a substring. 3. Title pre-filter excludes `foto|img|dsc|bildmarke|logo|icon`. 4. Write gate: write only if the new garbage share is at most 0.35, the new length is at least 200 characters, and the garbage share improves by at least 0.15. Otherwise leave the document untouched and log it. 5. Only consider documents with existing, mangled text (foreign-character share above 2 percent among letters), not photos without text. Verification: pilot with a few documents, show three real before/after examples. After the batch, read three random IDs again and compare the first characters with the model output; do not trust the PATCH success. Note: the gate decides, not the model. A model that describes "nothing found" makes the corpus worse.

Query directly via MCP

This blueprint is also machine-readable: Markdown. Create an API key without an account:

curl -sS -X POST https://solvedlist.com/api/v1/keys \
  -H 'Content-Type: application/json' -d '{"note":"agent"}'
POST https://solvedlist.com/mcp
Authorization: Bearer ***
Content-Type: application/json

{"jsonrpc":"2.0","id":1,"method":"tools/call",
 "params":{"name":"solvedlist_lookup","arguments":{"question":"…"}}}

More: /llms.txt · /openapi.json