Skip to content

Critique-and-revise pass on cover letters, with a quality eval - #25

Merged
coderback merged 2 commits into
mainfrom
feat/doc-critique
Oct 16, 2026
Merged

coderback merged 2 commits into
mainfrom
feat/doc-critique

Conversation

@coderback

Copy link
Copy Markdown
Owner

Phase 2, part 2: a critique-and-revise pass on tailored documents, measured by a new quality eval. On for cover letters only, by default.

What it does

After a document is written, the model reviews it against a recruiter's rubric for the ad and rewrites only what falls short.

  • Letters: the swap test for "why them" (fails if another company's name could replace theirs), two or three of the ad's requirements proved with named projects or roles, a specific opening, a short ending, no hedging or filler.
  • CVs: relevance, evidence, summary, projects and bullet order.

A rewrite is kept only if the document check finds no new unsupported claim in it and it is at most 15% longer, so the page fit holds. The result carries review: {issues, kept}, and the job workspace's Checks strip shows "Reviewed for this ad: N fixes" with the list in its details.

DOC_CRITIQUE picks the documents it runs on (cv, letter, comma-separated); the default is letter.

Why letters only

api/evals/test_doc_quality_eval.py (opt-in, WINDRUSH_LLM_EVAL=1) tailors the graduate profile to six adverts with the real model, runs the critique on each draft, and has a judge compare draft and revision blind, in both orders.

Run Letters (revision–draft) CVs (revision–draft)
1 4–2 1–3
2 5–1 4–0
3, both orders 2–1, 3 ties 2–0, 1 tie

No kept rewrite added an unsupported claim. Letters improved every run; CV rewrites were mostly reorderings and once dropped a real result, so the CV critique stays off. The eval fails if a kept rewrite adds an unsupported claim or if letters stop beating their drafts.

Tests

  • API: 685 pass. The suite turns the critique off by default and covers it explicitly: a rewrite that holds up is kept, one that invents a claim or runs long is dropped, and no issues leaves the document alone.
  • Frontend: build and lint pass; 10/10 Playwright smoke tests (the workspace test now checks the review pill).

A critique pass reviews a tailored document against a recruiter's rubric for
the ad and rewrites only what falls short. For letters the rubric is the swap
test for 'why them', evidence mapped to the ad's requirements, the opening,
the ending and the language. For CVs it is relevance, evidence, summary,
projects and bullet order. A rewrite is kept only if the document check finds
no new unsupported claim in it and it is at most 15% longer, so the page fit
holds. The review (issues found, kept or not) goes out with the document.

DOC_CRITIQUE picks the documents it runs on (cv, letter); letters only by
default. evals/test_doc_quality_eval.py measures it: the graduate profile is
tailored to six adverts with the real model, the critique runs on each draft,
and a judge compares draft and revision blind in both orders. Over three runs
the critiqued letter beat its draft every time (4-2, 5-1, 2-1 with 3 ties);
CVs were mixed (1-3, 4-0, 2-0), so the CV critique stays off. The eval fails
if a kept rewrite adds an unsupported claim or if letters stop winning.

Tests turn the critique off by default (one more model call per document)
and cover it explicitly: a rewrite that holds up is kept, one that invents a
claim or runs long is dropped, and no issues leaves the document alone.
When the critique's rewrite was kept, the Checks strip says how many things
the review fixed for this ad, and its details list them.
@coderback
coderback merged commit 47683d3 into main Oct 16, 2026
4 checks passed
@coderback
coderback deleted the feat/doc-critique branch October 16, 2026 04:31
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