Skip to content

feat(questions): run Inspect, OpenAI evals, skill-creator and promptfoo sets on the answers track - #214

Open
napetrov wants to merge 6 commits into
intel:mainfrom
napetrov:feat/run-answer-formats
Open

napetrov wants to merge 6 commits into
intel:mainfrom
napetrov:feat/run-answer-formats

Conversation

@napetrov

Copy link
Copy Markdown
Contributor

Stacked on #210 (tasks inspect). Review only the top commit until #210 merges.

Summary

This PR runs the answer-only formats that tasks inspect detects on the existing questions, answers and judge track. Each format gets an import adapter into one canonical record, so there is no parallel runner.

questions import <path>        # Inspect samples/@task (ast, never imported), OpenAI evals JSONL,
  -> questions.v2              # skill-creator evals.json, promptfoo config
     + prompt_style: verbatim
     + grading.checks[]        # match|exact|fuzzy|regex|choice|json|judge|unsupported
answers generate / arms run    # unchanged, except that verbatim questions are sent unwrapped
eval reference                 # deterministic checks: no model; judge: checklist, both polarities
  -> eval.v1 | arms
eval native-import <log>       # inspect json log / promptfoo -o json -> answers.v1 + eval.v1
 dokimi/
 ├── commands/
+│   └── answer_formats.py        # questions import, eval reference, eval native-import
 ├── eval/
+│   ├── reference_checks.py      # the check types
+│   └── reference_run.py         # answers/arms -> eval.v1/arms
 └── task_formats/
+    └── imports/                 # one adapter per format + native_logs

What does not carry over is listed in docs/answer-formats.md. The main points:

  • Only one message is sent: system and few-shot turns are folded into the prompt. No tools or sandbox are provided.
  • Inspect solvers other than multiple_choice/system_message are not reproduced.
  • Model-graded scorers (Inspect C/P/I, OpenAI fact, promptfoo llm-rubric) all become the yes/no checklist judge.
  • promptfoo js/py asserts, similar, cost and latency become unsupported, which is reported and not counted.

Evidence

Haiku 4.5 on Bedrock, at most 20 samples per set. Native tools were pinned: inspect-ai 0.3.283 and promptfoo 0.125.0. OpenAI evals graders were reproduced from upstream 8eac7a7d.

Set Grader n dokimi / native pass Agreement
born-first OpenAI Match 20 20 / 20 1.00
chinese-remainder-theorem OpenAI Includes 15 12 / 12 1.00
logic-fact OpenAI ModelBasedClassify fact 10 8 / 8 0.80
ARC-Easy, same completions Inspect choice 20 20 / 20 1.00
biology_qa, same completions Inspect model_graded_qa 20 20 / 19 0.95
riddles promptfoo icontains + llm-rubric 15 14 / 15 0.93
3 skill-creator sets grader.md, per expectation 77 0.88

The deterministic graders agree on 100% of the same completions. Every disagreement is a judge verdict. A split verdict (0.5) fails here, which is stricter than Inspect P.

Tests:

  • Before: tasks inspect born_first.jsonl gave consumers: [none-yet].
  • After: it gives [questions import].
  • New suites: tests/test_answer_imports.py (20 tests) and tests/test_reference_checks.py (28 tests). Both are offline and use a fake judge.
  • make ci-local passes 28 checks and fails 1: pip-audit flags filelock and setuptools in uv.lock, which this PR does not change.

Merge Danger

Door: two-way. The new commands and modules are additive. Two schemas are widened: questions.v2 gains grading and prompt_style, and task_inspect.v1 accepts the questions import consumer.

Blast Radius: small. The answerer changes only for questions with prompt_style: verbatim. answers generate --doc-source none is a new opt-in flag. benchmarks/spec.v1.yaml max_docs goes from 31 to 32 for the new doc.

Decisions for reviewers:

  1. Should a split judge verdict fail?
  2. Should a verbatim prompt in context arms get the docs before it?
  3. Should skill-creator imports carry expected_skill?
  4. Is --doc-source none acceptable as a flag?

🤖 Generated with Claude Code

A probe registry (dokimi.task_formats) names the format of a file, a task
directory or a tree, and reports kind, item count, present/missing parts,
lint problems and which dokimi backends consume it today. Probes: harbor and
task-md (wrapping harnesses.tasks), terminal-bench v1, SWE-bench, Inspect AI
samples and @task files (text scan, never imported), OpenAI evals,
skill-creator evals.json and trigger sets, skill-reach QuerySet, promptfoo
and dokimi questions. Unknown paths get a best-effort structure report;
malformed files are lint problems. Detection only: nothing new runs.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
`tasks inspect --json` now prints a stamped task_inspect.v1 artifact and
`--out FILE` writes it through save_artifact, as `repo budget` does.

Probes added or widened from runs over upstream checkouts:
- a dataset file a config names is read as that config says: Inspect
  FieldSpec remaps, OpenAI evals registry specs (openai-evals-spec, with
  model-graded samples needing no ideal), promptfoo `tests: file://`
  (promptfoo-tests);
- git-LFS pointer stubs are git-lfs-pointer, with the expected format
  when a config names them;
- CSV datasets, promptfooconfig.<variant>.yaml and redteam configs,
  ExploreBench task YAML (dokimi-explore-task, localization);
- a task.md with no BenchFlow front matter and no task part directories
  is no longer a task-md task.
YAML aliases are reported as refused, not as invalid YAML.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
tests/fixtures/task_formats/ holds small upstream files of every format
the probes know (intel/skills, skillsbench, terminal-bench, Inspect AI,
openai/evals, promptfoo; licenses in LICENSES/) and generated ones where
no public file exists (SWE-bench row, skill-creator evals.json,
skill-reach QuerySet, and the output of dokimi's trigger-set writers).
MANIFEST.yaml records each file's source, commit and license and what
inspect must report; test_task_format_corpus.py inspects the corpus as
one mixed tree, validates every --json report as task_inspect.v1, and
reads back what to_skill_creator, to_reach and to_questions write.

The fixture tree is kept out of pytest collection, ruff and the license
header check: its test_*.py are the verifiers of copied tasks.

Fixes found on the way: a task.md scan leaked the loader's UserWarning
from the fingerprint, and a path that is neither file nor directory
(/dev/null) crashed the tree scan.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
…oo sets on the answers track

questions import translates the answer-only formats that tasks inspect
detects into questions.v2 records with a format-neutral grading block.
eval reference scores answers or arms output against those checks:
deterministic checks need no model, judge checks use the checklist judge
in both polarities. eval native-import reads Inspect json logs and
promptfoo outputs so native verdicts sit next to dokimi's.

Inspect @task files are parsed with ast, never imported or run.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@github-actions github-actions Bot added the cli-interface-change Changes dokimi's user-facing CLI surface label Oct 24, 2026
@github-actions

Copy link
Copy Markdown

CLI interface change detected

This PR changes dokimi's user-facing CLI surface (commands and/or options):

+ added command `dokimi eval native-import`
    + argument `log`
    + option `--answers-out`
    + option `--eval-out`
    + option `--help/-h`
+ added command `dokimi eval reference`
    + option `--answers`
    + option `--concurrency`
    + option `--help/-h`
    + option `--judge-model`
    + option `--judge-provider`
    + option `--no-judge`
    + option `--output/-o`
    + option `--questions`
+ added command `dokimi questions import`
    + argument `path`
    + option `--format`
    + option `--grader`
    + option `--help/-h`
    + option `--output/-o`
    + option `--scorer`
    + option `--task`
+ added command `dokimi tasks inspect`
    + argument `path`
    + option `--help/-h`
    + option `--json`
    + option `--out`

Updated on every push; the cli-interface-change label is on while the diff is non-empty.

@codecov-commenter

codecov-commenter commented Oct 24, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 85.84071% with 272 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.62%. Comparing base (09be35b) to head (fa27cbd).

Files with missing lines Patch % Lines
dokimi/dokimi/task_formats/imports/inspect_ai.py 73.93% 23 Missing and 20 partials ⚠️
dokimi/dokimi/task_formats/imports/promptfoo.py 70.21% 26 Missing and 16 partials ⚠️
dokimi/dokimi/eval/reference_checks.py 85.45% 18 Missing and 14 partials ⚠️
dokimi/dokimi/commands/answer_formats.py 65.90% 27 Missing and 3 partials ⚠️
dokimi/dokimi/task_formats/imports/common.py 78.21% 13 Missing and 9 partials ⚠️
dokimi/dokimi/task_formats/imports/openai_evals.py 69.86% 14 Missing and 8 partials ⚠️
dokimi/dokimi/task_formats/source.py 84.11% 12 Missing and 5 partials ⚠️
dokimi/dokimi/task_formats/detect.py 87.96% 8 Missing and 5 partials ⚠️
dokimi/dokimi/task_formats/datasets.py 95.95% 5 Missing and 5 partials ⚠️
dokimi/dokimi/task_formats/dirs.py 91.08% 4 Missing and 5 partials ⚠️
... and 7 more
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #214      +/-   ##
==========================================
- Coverage   92.01%   91.62%   -0.40%     
==========================================
  Files         223      242      +19     
  Lines       27768    29677    +1909     
  Branches     4563     4892     +329     
==========================================
+ Hits        25552    27192    +1640     
- Misses       1570     1734     +164     
- Partials      646      751     +105     
Files with missing lines Coverage Δ
dokimi/dokimi/__init__.py 100.00% <ø> (ø)
dokimi/dokimi/artifacts.py 95.12% <ø> (ø)
dokimi/dokimi/commands/evaluate.py 83.90% <100.00%> (+0.10%) ⬆️
dokimi/dokimi/commands/questions.py 60.97% <100.00%> (+0.31%) ⬆️
dokimi/dokimi/eval/answerer.py 94.27% <100.00%> (+0.09%) ⬆️
dokimi/dokimi/task_formats/__init__.py 100.00% <100.00%> (ø)
dokimi/dokimi/task_formats/links.py 100.00% <100.00%> (ø)
dokimi/dokimi/task_formats/model.py 100.00% <100.00%> (ø)
dokimi/dokimi/task_formats/pointers.py 100.00% <100.00%> (ø)
dokimi/dokimi/commands/tasks.py 92.77% <97.43%> (+1.43%) ⬆️
... and 16 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
The skill an evals.json belongs to (skill_name, else the <skill>/evals/
directory) is each question's expected_skill, so the imported set also
scores skill selection on a skill-catalog: arm. Without either, the
import report notes it.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@napetrov
napetrov marked this pull request as ready for review October 25, 2026 00:37

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli-interface-change Changes dokimi's user-facing CLI surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants