Who it is forA developer comparing LLM backends or prompt changes who needs numbers before choosing one for a document workflow.
The problemJudging extraction quality by reading a few outputs does not show how accuracy changes across fields or model versions.
The outcomeA per-field eval report with field F1 and schema-valid rate for the chosen backend.
What you need first
- Python with pip available
- An API key for a hosted LLM backend such as OpenAI, or a local backend such as Ollama (the zero-config path runs on the in-tree mock backend without a key)
- A sample PDF or text file to test with, such as invoice.pdf
Steps
- Run
pip install py-idp[eval]to add the datasets and pandas packages thatidp evalneeds. - Run
idp evalagainst your labeled documents, selecting the backend you want to compare. - Repeat the run with a second backend, such as
--backend ollama, and keep the report from each run. (inferred, check the README)
Prompt for your agent
In the py-idp repo, run `idp eval` on the labeled set at <path to eval data> using the <backend name> backend. Output the field F1 and schema-valid rate per field. Verify that the report lists every schema field.
Caveat. The README does not list the exact flags for `idp eval` or the label format, so check the CLI help or docs before preparing your dataset.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for rollroyces/py-idp and "Measure extraction accuracy with the eval harness"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer