Repository navigation
feat(eval): add markkit_qa LLM eval via OpenRouter and Anthropic - #56
Merged
Merged
Conversation
markkit-eval was a CLI stub. It is now a mira study binary (modeled on bashkit-eval) advertising markkit_extract: ten realistic HTML pages run through markkit in-process and scored by typed deterministic checks, with one scorer per quality metric (completeness, accuracy, formatting, noise). Offline and key-free; the single target is markkit itself. Baseline: 72.5% mean weighted rate, noise 34.3%. Gaps recorded in knowledge/operations/eval.md.
…-96emgz # Conflicts: # knowledge/log.md
markkit_extract gains a mode axis (default vs main_content) so reports
compare the two configs on the same pages. First full run committed as
results/markkit_extract-2026-10-27.{md,json}: default 73.6% (0/10 pages),
main_content 87.4% (3/10); main_content drops the forum question.
…-96emgz # Conflicts: # knowledge/log.md
Re-run after #23 (markdown escaping): product_page now fails contains "4.6 out of 5 stars" because the renderer emits 4\.6, which is not a list marker. Recorded as an open gap.
Models answer 23 questions about the eval pages from markkit markdown, main-content markdown or raw HTML (input axis), scored on accepted answers with token usage per input. Targets: meta/muse-spark-1.3-contributor via OpenRouter and claude-sonnet-5-5 via Anthropic, key-gated; keys come from Doppler (doppler run -- just eval-llm).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NJrjA1oBRTmMTURr2kwNSJ
1 of 2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Михайло · project thread
What changed
This PR adds a second mira eval,
markkit_qa. It checks whether an LLM answers correctly when it reads markkit's output, and how many tokens that costs.data/qa-tasks.jsonl), each with a list of accepted answer substrings. A test checks that every question has an accepted answer literally present on its page.inputaxis:markdown(default markkit output),main_content(main-content mode) andhtml(the raw page, as a baseline).answer_correct: passes if the reply contains an accepted answer. Matching is case-insensitive with whitespace collapsed, so scoring is deterministic and needs no judge model.openrouter/meta/muse-spark-1.3-contributorandanthropic/claude-sonnet-5-5. Each target runs only when its API key is set (OPENROUTER_API_KEY,ANTHROPIC_API_KEY), so offline runs and CI skip every case.src/provider.rs) for the Anthropic Messages API and Chat Completions (OpenRouter). Keys stay inside the study process and are never logged.*_BASE_URLoverrides the endpoints.just eval-llmruns the eval. The keys live in Doppler:doppler run -- just eval-llm.Why
The maintainer asked for the LLM evals to use Muse 1.3 contributor through OpenRouter, with tokens from Doppler, and confirmed the Anthropic key is in Doppler as well. This is the downstream half of roadmap initiative 9: whether markkit output is better LLM context than raw HTML.
Before / After
Before, the only eval was
markkit_extract, which runs offline.After, an offline run with
mira run --study-bin markkit-eval markkit_qa --dry-runand no keys gives0 passed / 0 scored (0 failed, 0 n/a, 138 skipped).End to end, I ran it against a local mock Anthropic endpoint (
ANTHROPIC_BASE_URL=http://127.0.0.1:18733,--tag data_table):The mock always gives the same answer; the run only checks the wiring. There has been no run with real keys yet, because this cloud environment can't reach Doppler and blocks
api.doppler.comandopenrouter.ai.Risk
reqwestis added tomarkkit-evalonly;cargo tree -p markkitstill has no reqwest or hyper.Checklist
markkit_extractis unchanged.Locally, fmt, workspace clippy
-D warnings,cargo test --workspace, check_okf, okf-lint andcargo deny checkall pass.Generated by Claude Code