Skip to content

Grade Marker and KUDOS text against page tests, and set the rules for benchmarks - #126

Open
kentare wants to merge 4 commits into
mainfrom
ingestion-benchmark
Open

kentare wants to merge 4 commits into
mainfrom
ingestion-benchmark

Conversation

@kentare

@kentare kentare commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

What and why

genki had to choose which text to chunk for Kudos: the text KUDOS serves, or Marker's markdown from the PDF. A service's test set is too small to show a few points lost in text extraction, so this adds the first component benchmark and the rules every benchmark follows.

  • ADR 0003, "Component comparisons" (partly built): a component behind a port is compared with a candidate under benchmarks/, against a reference that never comes from a side, with paired differences and a margin set before the candidate runs.
  • benchmarks/README.md: the shape of a benchmark folder and its report, and the list of benchmarks, including kudos-pilot and knowledge-spikes, which stay on their branches (tagged evidence/kudos-pilot and evidence/knowledge-spikes).
  • benchmarks/benchlib: shared code for run records, resampling and verdicts.
  • benchmarks/ingestion: where KUDOS text and the indexed Marker text disagree, and the page data the page tests use.
  • benchmarks/ingestion/opb: 1,933 tests on 221 pages, written from page images and checked blind. Marker ranks first, ahead of KUDOS text with or without its page breaks (results/report.md).
  • docs/development.md points to the benchmarks.

ADR 0040 (#125) cites the report for its text-layer guard. Part of #29.

How it was tested

  • npm run check in a clean worktree at the branch head (451 files, 4,710 tests pass).

  • python -m unittest discover -s benchlib -t . (35 tests) and python -m unittest test_report in benchmarks/ingestion/opb (2 tests), including "refuses_to_compare_records_with_different_references", "not_worse_needs_the_whole_interval_above_minus_margin" and "no_reference_test_is_derived_from_a_side_output".

  • report.py rebuilds results/report.md from the committed verdicts and reference with no difference.

  • Main is merged in; the only conflict was the ADR index table, resolved with main's rows and the new 0003 status.

  • npm run check passes

Checklist

  • Every new rule has a test whose name states it
  • User-facing text is in the i18n catalogues, in bokmål and English, with no em-dashes
  • Vendor SDKs stay in packages/providers-*
  • ADRs, docs and docs/architecture/modules are updated if a contract, boundary or module changed
  • No secrets, personal data or local paths

kentare added a commit that referenced this pull request Oct 28, 2026
…pages

- benchmarks/benchlib and benchmarks/README.md come from #126, unchanged.
  benchmarks/kudos-pilot splits into engines, embeddings and indexes, each
  with a report.py that rebuilds its report from results/; engines and
  embeddings also keep their reference, per-side verdicts and run records.
- New embedding models: gte-multilingual-base, pplx-embed-v1-0.6b,
  F2LLM-v2-0.6B, harrier-oss-v1-0.6b and text-embedding-3-small, plus
  Qwen3-Embedding-8B, 4B and Arctic shortened from their stored vectors
  (shorten.py).
- Search steps: setup_models.py writes genki's search without the planner
  cut down to one step at a time (vector or fusion search, with and without
  ColBERT, and the whole search without ColBERT). chain_steps.sh runs them
  for text-embedding-3-large and pplx-embed, and the embeddings report shows
  which step loses the pages: the keyword fusion costs the most page MRR.
- kudos-pilot-compare.ts writes per-question verdicts for the reports. The
  old flat results/ and its scripts go, and __pycache__ is no longer tracked.

Part of #29, from the spike in
#92.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant