Skip to content

chore: commit TTS eval harnesses + agent operational notes - #151

Open
elimelt wants to merge 2 commits into
mainfrom
chore/tts-eval-harnesses
Open

chore: commit TTS eval harnesses + agent operational notes#151
elimelt wants to merge 2 commits into
mainfrom
chore/tts-eval-harnesses

Conversation

@elimelt

@elimelt elimelt commented Aug 2, 2026

Copy link
Copy Markdown
Owner

What

Preserves the TTS reader's eval/replay tooling and records the operational knowledge gathered while building the feature (PRs #144#148). Everything previously lived only in .quartz/, which is gitignored and wiped whenever the Quartz ref changes — this PR makes it durable.

quartz-site/tts-reader/eval/

File Purpose
prompts.mjs Prompt variants; S3 is the shipped system prompt
tts-extract.mjs Shared extraction mirroring components.js (textOf/cleanTex/needsRewrite/collectBlocks)
eval-semantic.mjs 18-case known-answer suite for math-to-speech (transpose, inverse, prime, norms, binom, ...)
eval-perblock.mjs Whole-block rewrites on real built notes: residual LaTeX, refusal, fidelity, length ratio
timeline.mjs Full-pipeline replay against a built note with real mp3 durations via ffprobe: TTFT, stalls, wall-vs-audio
inspect-inputs.mjs, inspect-fp.mjs Gate/input inspection helpers

They import hast-util-from-html (resolvable only inside the Quartz checkout), so the run recipe is copy-into-.quartz/ — documented in the notes.

docs/AGENTS.md

Agent-facing operational notes:

  • Architecture invariants: block extraction (incl. the .katex-display sibling-span gotcha), the rewrite gate, urgency skip, LLM serialization, cache versioning rules
  • Backend behavior: single resident model (never mix models), concurrent generations collapse prompt eval ~40x, prompt-cache economics (cold 28s → warm ~1s), think flags per model family
  • Model-selection results and prompt-design lessons (trivial-span rule, WRONG-reading examples)
  • Reference timeline numbers for regression comparison, and known gaps (cold-cache pre-warm, first-chunk stall, chars/s estimate)

No changes to shipped site code.

elimelt and others added 2 commits August 2, 2026 03:42
- .notes/frontmatter.yml: optional authors field (flat list of lowercase
  slugs) plus conventions; absence of model entries implies human-only
- AGENTS.md: agents append their model slug when creating or materially
  editing a note; no backfill onto untouched notes
- content/templates/*: authors block with elimelt as default
- scripts/validate_notes.py: reject authors when present but not a YAML list

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The eval/replay tooling used to develop the TTS reader lived only in
.quartz/, which is gitignored and wiped whenever the Quartz ref
changes. Preserve it under quartz-site/tts-reader/eval/:

- prompts.mjs        prompt variants; S3 is the shipped system prompt
- tts-extract.mjs    shared extraction mirroring components.js
                     (textOf/cleanTex/needsRewrite/collectBlocks)
- eval-semantic.mjs  18-case known-answer suite for math-to-speech
                     (transpose/inverse/prime/norm/binom/etc.)
- eval-perblock.mjs  whole-block rewrites on real built notes:
                     residual LaTeX, refusal, fidelity, length ratio
- timeline.mjs       full-pipeline replay against a built note with
                     real mp3 durations (ffprobe): TTFT, stalls,
                     wall-vs-audio
- inspect-inputs.mjs / inspect-fp.mjs  gate/input inspection helpers

These import hast-util-from-html, which only resolves inside the
Quartz checkout, so they are copied into .quartz/ to run (commands in
docs/AGENTS.md).

docs/AGENTS.md records the operational knowledge: architecture
invariants (block extraction incl. .katex-display, urgency skip, LLM
serialization, cache versioning), backend behavior (single resident
model, concurrency collapse, prompt-cache economics, think flags),
model-selection results, prompt-design lessons, reference timeline
numbers, and known gaps.
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