- A Datalab account with an API key
- Python 3.11+ installed
- The Datalab SDK:
pip install datalab-python-sdk - Your
DATALAB_API_KEYenvironment variable set
Evals are in open beta. The request and response shapes may change.
Run an Eval from Python
This example uploads files, starts an Eval on a pipeline, waits for it to finish, and reads which variant wins:Compare specific variants
Omitvariants to compare the Fast, Balanced, and Accurate modes. To compare
your own settings, give 2 to 4 named variants. A variant may change only the
mode settings:
- For a pipeline of Convert steps:
output_modeandmerge_cross_page. - For a pipeline with one Extract step:
extraction_mode, and the Convert step’soutput_mode.
extraction_mode instead:
collection_id
instead of file_ids. Give exactly one of the two.
Read the result
Call
get_eval_differences(eval_id, file_id) for one file to see each place
the variants disagree: the page, each variant’s reading, the winning
variant(s), and the verdict (decided, none, unclear, or ignored).
For an Eval of Extract, question names the field and description is the
field’s description from your schema.
get_eval_differences() also returns fields for an Eval of Extract: every
compared field, equal or not, with each variant’s value in the order of
variant_names.
CLI
--json to any eval command to print the raw result instead of a summary.
Pricing
The comparison bills $20 per 1,000 pages, once for each document that it compares. Each variant’s own run bills at its own rate on top of that. See pricing.Limits
- 2 to 4 variants per Eval.
- Up to 100 files per Eval: PDFs and images. Spreadsheets have no pages to compare.
- A variant changes only the mode settings described above. For now, an Eval does not compare Segment steps or other settings.
Need help?
For questions about Evals or help with a custom evaluation, contact us at support@datalab.to.Next Steps
Forge Evals overview
Start an Eval from the app, and how to read the results.
Pipelines
Create and run the pipeline that an Eval compares.