Skip to content

fix: keep the reason in each flag, and bound the customer outcome by the facts - #252

Merged
goldbarth merged 2 commits into
mainfrom
fix/flag-reasons-bounded-outcomes
Sep 24, 2026
Merged

goldbarth merged 2 commits into
mainfrom
fix/flag-reasons-bounded-outcomes

Conversation

@goldbarth

Copy link
Copy Markdown
Owner

Follows #250 and #251, and the flag review of the ServiceDeskLite v1.9.0 comparison runs they were built for.

Two commits, each on its own:

fix(faithfulness): keep the reason in each thorough-check flag

  • Why: feat(faithfulness): name the pull request behind each flag #250 turned the verdict into { claim, pullRequest }. With a field named only for the claim, the model returned only the claim: a smoke run came back with three quoted passages, no word on what was wrong with them, and 165 output tokens for two checks. A flag without its reason makes the reviewer redo the check, and it breaks FaithfulnessFlag.Text, documented as "what was flagged, and why".
  • What: the verdict is { claim, reason, pullRequest }, and the prompt asks for the quoted words and the reason. CallValidity joins them into the flag text as "<claim>" - <reason>.
  • One text field, not a new record field. A rule-based flag already carries its reason in its text ("The number '3' is not supported..."), so a separate reason in the run record would be absent for half the flags. Record schema and docs stay as they are; the code now matches them.
  • A claim without a reason is kept as the claim alone rather than dropped. Quotes the model put around the claim are taken off before ours go on, so the text does not read "“...”".
  • Prompt change: thorough-system snapshot and promptHash (sha256:a642c294...).

fix(prompting): bound the customer outcome by what the facts establish

  • Why: over three runs at the commit above (gpt-5.6-sol rendering and checking), 17 of 33 thorough-check flags quoted the customer outcome. The format requires an outcome on every entry and names "no longer have to" as its form, and the model filled it with a model instruction read as a guarantee (fix: report a refused publication next to the files the run wrote #221, changelog.json does not record thinking, the thorough check or the fact base depth #223 in all three runs), a behaviour promised beyond the part of the product it holds in, or a workaround no fact says the reader ever needed.
  • What: an outcome carries the limit the facts name, as a condition the reader can place themselves in. A model instruction counts as an outcome stated as what the product tells the model, so the honest sentence no longer fails the mechanism test. Something the reader no longer has to do is named only when the facts say they had to do it; the fix rule allows "what they can now count on" instead, which it previously did not.
  • Two rules, nothing else. The two example entries still close on "so you no longer have to...". They were left alone so the measurement below reads one change.
  • Prompt change: customer snapshot and promptHash (sha256:18467240...).

Verified on real runs: goldbarth/ServiceDeskLite v1.9.0 --since 675555a7, 18 facts, gpt-5.6-sol rendering and checking through openai-compatible, thinking disabled. Three runs before the second commit, four after.

per run before after
thorough-check flags 11 6.25
flags quoting the outcome formula 5.7 1.75
#221 / #223 flagged 3 of 3 / 3 of 3 1 of 4 / 2 of 4
#237, #244 (not touched by the change) 3 of 3 / 3 of 3 3 of 4 / 2 of 4

Tests: ChatModelTests (claim and reason joined, a claim without a reason kept, an already quoted claim not quoted twice), prompt snapshots for thorough-system and customer. Full suite 830 passing, build without warnings, dotnet format clean.

goldbarth added 2 commits September 24, 2026 15:20
The check's answer had a single claim field, so the model returned the
flagged passage and nothing about what was wrong with it. A flag without
its reason leaves the reviewer to redo the check: a smoke run on one
release came back with three quoted passages and 165 output tokens.

The answer now carries the claim and its reason as separate fields, and
the prompt asks for both. The flag text reads "<claim>" - <reason>, as
FaithfulnessFlag.Text and the run record already describe it. A claim
without a reason is kept, and quotes the model put around the claim are
not doubled.
The customer format requires an outcome on every entry and names "no
longer have to" as its form. Over three runs of one release, 17 of 33
thorough-check flags quoted that outcome: a model instruction read as a
guarantee, a behaviour promised beyond the part of the product it holds
in, or something the reader no longer has to do that no fact says they
ever did.

An outcome now carries the limit the facts name, and a model instruction
counts as an outcome stated as what the product tells the model, rather
than failing the mechanism test. Something the reader no longer has to
do is named only when the facts say they had to do it; the fix rule
allows what they can now count on instead.
@goldbarth
goldbarth merged commit 2aded1c into main Sep 24, 2026
4 checks passed
@goldbarth
goldbarth deleted the fix/flag-reasons-bounded-outcomes branch September 24, 2026 15:21
@goldbarth goldbarth self-assigned this Sep 29, 2026
goldbarth added a commit that referenced this pull request Oct 1, 2026
…, and drop private links (#317)

Closes #309

- **Why:** the README opened on a run against `goldbarth/Ingestor`, a
private repository, so its example could not be checked, and
`docs/outputs.md` linked five pull requests of the private
ServiceDeskLite. Beyond that, the page described the check before
showing why a release owner would want it, and kept status, start and
publishing behavior apart from each other.
- **The opening says what work Chartula does,** in ordinary words before
any term: it reads the merged pull requests, decides what the release
contains before a model writes, writes notes for developers, users and
product managers, and reports the statements it finds the pull requests
do not back. No glossary link interrupts the first paragraph.
- **The example is public and real:** the run that wrote Chartula's own
release notes for `v0.1.0-preview.3` (2026-09-24, `gpt-6-sol`, recorded
in its run record and named in `CHANGELOG.md`'s note). #252 measured
fewer overpromising outcomes, 5.7 to 1.75 flags per run; the customer
entry promised users they "can count on" it; the thorough check flagged
exactly that sentence, the rule-based check had nothing to find. It
reads as pull request, entry and finding, then why it matters to whoever
publishes. The raw flag and provenance from the record sit in a
collapsed `<details>`, byte for byte.
- **"Try it" puts status, prerequisites, install and the three commands
in one place,** and says beside `generate` what it writes, that a
published release's notes are replaced, and that `--no-publish` leaves
GitHub alone. Getting started and CI are the two next steps, for a first
local run and for a team's pipeline.
- **"How the check works" replaces the promises** and says only what the
code does: the change set and structure are fixed before the model, a
mismatched answer fails, two checks with their scope, flags as advice
that block nothing, and the comparison against pull requests rather than
code. "Neither check catches every unsupported statement" is stated
outright; nothing claims time saved or correctness.
- **Known limitations are grouped** by source data, checking,
publishing, and installation and support, with every bullet and its
wording kept, since `ROADMAP.md` names them.
- **The documentation index is grouped by what the reader wants to do:**
start, understand the output, automate, look up, contribute. Every page
from before is still listed.
- **`docs/outputs.md`:** the technical example is now the section a real
run wrote for Chartula's own `v0.1.0-preview.3` (2026-10-01), so every
reference in it resolves; the customer and product examples keep the
ServiceDeskLite release, whose runs are public in chartula-evals, and
link nothing of it.
- **`docs/glossary.md`:** "Audience" no longer says the texts "cannot
disagree"; a shared fact base gives them the same changes, categories
and breaking status, not a guarantee of agreement.

**Verified:**
- Every statement about behavior was checked against the code: the
planned entries and `FindMismatch` (`GroundedFactsFactory.cs`,
`RenderingComposer.cs`), the two checks
(`RuleBasedFaithfulnessChecker.cs`, `ThoroughFaithfulnessChecker`),
flags never blocking (`ReleasePipeline.cs`), drafts and replaced notes
(`GitHubReleaseNotesWriter.cs`).
- The example was checked against its sources: the entry in the run's
`release-v0.1.0-preview.3.md`, the flag and its `pullRequest` in the run
record (rule-based 0 flags, thorough 1, only-thorough 1), and the
figures in #252's description. The finding is justified: #252 reports
fewer such flags, not none.
- The README renders through GitHub's Markdown API with all eight
sections, the `<details>` block with its JSON, and the five index
tables. Light and dark appearance and a narrow width were not inspected
in a browser.
- The eight limitation names `ROADMAP.md` quotes still match README
bullets word for word (script).
- No page links a private repository (search for Ingestor,
ServiceDeskLite and port-tidewatch links).
- Every relative link and anchor in all Markdown files of the repository
resolves (script, with a negative test); the badge points to `#try-it`,
which replaced `#status`.

Tests: none, documentation only.
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