Repository navigation
feat: show each citation highlighted to the character in its source - #13
Merged
Merged
Conversation
The claim that every citation resolves to exact characters was visible only as a number and a JSON report. A static page now shows each of the 30 golden answers beside its source PEP; selecting a citation highlights document[start_char:end_char] next to the span the golden set expected. The exporter (python -m rageval.site) builds the page data from the reports CI gates and refuses a corpus version or golden-set digest that does not match. Spans are cut in Python because the offsets are code points and JavaScript strings are UTF-16. The site is Astro with no runtime JavaScript, deployed to GitHub Pages from main; a test over the built HTML checks all 51 resolved citations. Decision record: ADR 0012.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A static page for the 30 golden questions. Each answer sits beside its source PEP; selecting a citation highlights exactly
document[start_char:end_char], next to the span the golden set expected. A second page shows the README's retrieval numbers for all seven configurations, question by question. It deploys to GitHub Pages frommain. This closes F7 on the roadmap.Why
The project's central claim is that every citation resolves to exact characters of its source (ADR 0007). Until now that was a number (0.981 resolved) and a JSON report: nobody reading the repository could see a span without Docker, Python and a key.
How
python -m rageval.sitebuilds the page data from the answer baseline and the three retrieval baselinesci.ymlpins, plus four recorded reports, the golden set anddocuments/. It recomputes the corpus version and the golden-set digest and refuses any mismatch. Reports written before RAG-11 carry no digest; they are accepted only if they answer exactly the golden set's questions, and they are labelled recorded, not gated.:targetand:has()emphasise every segment of the span and the chip that points at it.Verification
uv run ruff check .,uv run ruff format --check .,uv run mypy: passuv run pytest: 299 passed.tests/test_site.pycovers segmentation (including an astral character before a span, overlapping marks, a mark across a line break), every refusal, and 51/51 exact spans over the committed baselineuv run python -m rageval.site --out web/src/data: 30 questions, 7 configurations, 51 resolved of 52 citationspnpm --dir web install --frozen-lockfile,check(0 errors, 0 warnings),build(33 pages),test(4/4): pass. These four were run by hand. The plan's verifier exited 127 on each because it cannot launch thepnpm.CMDshim on Windows; the newwebCI job runs them on Ubuntu.web/test/site.test.mjschecks the built HTML: every resolved citation's marked text equals its span sliced by code point, all 30 expected spans the same way, and no page loads anything from another origin. Moving one citation's start by a single character fails it.Risk and rollback
No critical zones. No existing behaviour changes: the exporter only reads committed files. Revert the PR and disable Pages; until Pages is enabled, the README link returns 404.
Open questions
pagesworkflow can deploy. That is a repository setting, left to the author.