Spaces:
Running
Running
| title: MoNaCo Dev Viewer | |
| emoji: π§© | |
| colorFrom: pink | |
| colorTo: indigo | |
| sdk: static | |
| pinned: false | |
| license: apache-2.0 | |
| # π§© MoNaCo Dev Viewer | |
| A per-qid web viewer for the **100-question dev subset** of the | |
| [MoNaCo benchmark](https://github.com/tomerwolgithub/monaco) | |
| ([paper](https://arxiv.org/abs/2506.12523)), mirroring the layout of the | |
| sibling [`open-wikitable-smoke-viewer`](https://huggingface.co/spaces/timchen0618/open-wikitable-smoke-viewer). | |
| Live: **https://timchen0618-monaco-dev-viewer.static.hf.space** | |
| ## 12 tabs | |
| | # | tab | contents | mean LLM judge score | | |
| |--:|---|---|--:| | |
| | 1 | π **Dataset** | raw monaco question + gold answer + flat list of supporting docs | β | | |
| | 2 | π§ **Unified eval** | cross-dataset bundle: question + gold answers + gold docs (markdown) | β | | |
| | 3 | π **Structure per q** (was Baseline A) | agentic run over per-qid scaffolds (cell 4) | 90.48 | | |
| | 4 | π **Structure per ds** (was Baseline B) | agentic run over flat structure corpus (cell 5) | 87.94 | | |
| | 5 | π **DCI** (was Baseline C) | agentic run over rawtext corpus (cell 6 v2 rerun) | 82.96 | | |
| | 6 | π€ **e2e v0** | e2e_pipeline run with on-the-fly per-shape extraction | 82.01 | | |
| | 7 | π€ **e2e v2** | e2e_pipeline run v2 | 80.94 | | |
| | 8 | π€ **e2e v3** | e2e_pipeline run v3 | 81.32 | | |
| | 9 | π **e2e structures v0** | for each supporting doc, the 5-shape structures produced by e2e v0 | β | | |
| | 10 | π **e2e structures v2** | same for the v2 pipeline | β | | |
| | 11 | π **e2e structures v3** | same for the v3 pipeline | β | | |
| | 12 | π **Compare** | 9 cells side-by-side per qid (all 6 baselines + 3 e2e runs) | β | | |
| Scoring column is the **LLM judge_score** (0.0-1.0) from the AML | |
| `submit_judge_responses_aml.py` protocol with `--deterministic-extract` | |
| auto-enabled for `--dataset monaco_dev` β this is the canonical | |
| scoring protocol for MoNaCo. `correct = 1 iff judge_score β₯ 0.99`. | |
| Mean judge_scores are over **all 100 qids**: qids missing a judge row | |
| (judge dropouts) count as `judge_score = 0`. If you only want the mean | |
| over judged qids, use the numbers in | |
| `information-scaffolds/data_creation/monaco_dev/README.md`. | |
| ## Repo layout | |
| ``` | |
| monaco-dev-viewer/ | |
| βββ index.html # 12-tab topbar + sidebar + main pane | |
| βββ viewer.js # single-file frontend (~1250 lines) | |
| βββ style.css | |
| βββ README.md # this file | |
| βββ index.json # π Dataset β flat array of {qid, question, ...} | |
| βββ records/<qid>.json # π Dataset per-qid raw docs | |
| βββ unified/ # π§ Unified eval | |
| β βββ index.json | |
| β βββ records/<qid>.json | |
| βββ trajectories/ # π Structure per q (cell 4) | |
| β βββ index.json (wrapped: {meta, rows}) | |
| β βββ records/<qid>.json | |
| βββ trajectories_corpus/ # π Structure per ds (cell 5) | |
| βββ trajectories_rawtext/ # π DCI (cell 6 v2) | |
| βββ trajectories_e2e_v0/ # π€ e2e v0 | |
| βββ trajectories_e2e_v2/ # π€ e2e v2 | |
| βββ trajectories_e2e_v3/ # π€ e2e v3 | |
| βββ e2e_structures_v0/ # π e2e structures v0 | |
| βββ e2e_structures_v2/ # π e2e structures v2 | |
| βββ e2e_structures_v3/ # π e2e structures v3 | |
| βββ compare/ # π Compare | |
| β βββ index.json (per-qid {cells:[β¦], question, gold_answers_length}) | |
| β βββ records/<qid>.json | |
| βββ scripts/ # builders (see below) | |
| βββ build_dataset.py | |
| βββ build_unified.py | |
| βββ build_trajectories.py | |
| βββ build_e2e_structures.py | |
| βββ build_compare.py | |
| ``` | |
| All shards are small (~5β200 KB); the site is served as static files | |
| (no backend). Deep-linkable via URL hash, e.g. | |
| `#trajectories:42`, `#compare:1048`, `#e2e_structures_v0:12`. | |
| ## Reproduction | |
| Run from this directory. Adjust paths if you're mirroring the layout on | |
| a different machine. | |
| ```bash | |
| cd data_visualizer/monaco-dev-viewer | |
| # 1. Dataset β reads $DATA_ROOT/eval/monaco_dev/raw/test_with_chunks.jsonl | |
| python scripts/build_dataset.py | |
| # 2. Unified eval β reads $DATA_ROOT/eval/monaco_dev/unified/test_with_chunks.unified.jsonl | |
| python scripts/build_unified.py | |
| # 3-5. Baseline trajectories (needs pred + judged JSONLs under information-scaffolds/outputs/monaco_dev) | |
| python scripts/build_trajectories.py \ | |
| --predictions ~/projects/information-scaffolds/outputs/monaco_dev/baselines/cell4_agentic_a/named-outputs/response/response \ | |
| --judged ~/projects/information-scaffolds/outputs/monaco_dev/judges/c4_agentic_a/named-outputs/judged/judged \ | |
| --out trajectories \ | |
| --label "structure per q (monaco_dev Β· Baseline A Β· cell4_agentic_a)" | |
| python scripts/build_trajectories.py \ | |
| --predictions ~/projects/information-scaffolds/outputs/monaco_dev/baselines/cell5_agentic_b/named-outputs/response/response \ | |
| --judged ~/projects/information-scaffolds/outputs/monaco_dev/judges/c5_agentic_b/named-outputs/judged/judged \ | |
| --out trajectories_corpus \ | |
| --label "structure per ds (monaco_dev Β· Baseline B Β· cell5_agentic_b)" | |
| python scripts/build_trajectories.py \ | |
| --predictions ~/projects/information-scaffolds/outputs/cell6_v2_reruns/monaco_dev_cell6_v2/named-outputs/response/response \ | |
| --judged ~/projects/information-scaffolds/outputs/monaco_dev/judges/c6_agentic_c_v2/named-outputs/judged/judged \ | |
| --out trajectories_rawtext \ | |
| --label "DCI (monaco_dev Β· Baseline C Β· cell6_agentic_c v2)" | |
| # 6-8. e2e trajectories (predictions + judged live under run_logs/) | |
| for v in v0 v2 v3; do | |
| python scripts/build_trajectories.py \ | |
| --predictions ~/run_logs/e2e-monaco_dev-comparison/outputs/$v/named-outputs/predictions/predictions \ | |
| --judged ~/run_logs/e2e-monaco_dev-comparison/judge_outputs/$v/named-outputs/judged/judged \ | |
| --out trajectories_e2e_$v \ | |
| --label "e2e $v (monaco_dev)" | |
| done | |
| # 9-11. e2e structures (per-qid supporting docs + 5-shape scaffolds) | |
| for v in v0 v2 v3; do | |
| python scripts/build_e2e_structures.py \ | |
| --scaffolds-dir ~/run_logs/e2e-monaco_dev-comparison/outputs/$v/named-outputs/scaffolds_dir \ | |
| --out e2e_structures_$v \ | |
| --label "e2e $v (monaco_dev)" | |
| done | |
| # 12. Compare β reads all 9 (pred, judged) pairs and joins by qid | |
| python scripts/build_compare.py | |
| ``` | |
| ## Local preview | |
| ```bash | |
| python -m http.server 8877 | |
| # then open http://127.0.0.1:8877/ | |
| ``` | |
| ## Deploy | |
| ```bash | |
| HF_TOKEN="$HF_TOKEN" python ~/.copilot/skills/hf-space-push/push_hf_space.py \ | |
| timchen0618/monaco-dev-viewer . \ | |
| --commit-msg "Monaco dev viewer β 12 tabs" | |
| ``` | |
| The Space is `sdk: static`, so it redeploys instantly on push (no build step). | |
| ## Data notes | |
| - **Cell 1 (closed-book)** has no `outputs/monaco_dev/baselines/cell1_closedbook/` | |
| dir; the raw response lives at | |
| `outputs/monaco_dev_smoke/sincere_pepper_d54pl76cjj/named-outputs/response/response`. | |
| The compare builder points there directly. | |
| - **Cell 6 (DCI)** β `outputs/monaco_dev/baselines/cell6_agentic_c/` is the | |
| **broken v1** run (100/100 `missing_structures`). The good v2 rerun is at | |
| `outputs/cell6_v2_reruns/monaco_dev_cell6_v2/`, judged under | |
| `outputs/monaco_dev/judges/c6_agentic_c_v2/`. | |
| - **Judge dropouts**: cell 1 = 4/100 missing Β· cell 2 = 4 Β· cell 3 = 7 Β· | |
| cell 4 = 0 Β· cell 5 = 1 Β· cell 6 = 4 Β· e2e v0/v2/v3 = 0. Missing rows | |
| score 0. | |
| - **Non-agentic cells 1-3** have no `events` in the response.jsonl (single | |
| LLM call). The trajectory-record renderer collapses to just | |
| system prompt + user prompt + model answer + score. | |
| ## See also | |
| - Full-benchmark viewer: `data_visualizer/monaco-benchmark-viewer/` | |
| (~1315 questions, docker-backed). | |
| - Sibling for open-wikitable dev: `data_visualizer/open-wikitable-smoke-viewer/`. | |
| - Authoritative reproduction guide with per-cell judge means: | |
| `information-scaffolds/data_creation/monaco_dev/README.md`. | |