DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to measure extraction accuracy with the eval harness with Py Idp

Score a backend on field F1 and schema-valid rate before you trust it in production.

Short answer: Run pip install py-idp[eval] to add the datasets and pandas packages that idp eval needs; then run idp eval against 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. All steps.

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

  1. Run pip install py-idp[eval] to add the datasets and pandas packages that idp eval needs.
  2. Run idp eval against your labeled documents, selecting the backend you want to compare.
  3. 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

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer