Stacked on #6 (facts); independent of #7. Retarget to master once #6 merges.
What
EvaluateUseCase (Application): the C# port of bin/wiki_rank_eval.py. Every output/ document with a question: and a sources: list is a labelled query; gold is the cited slugs that still exist as wiki notes. Ranks each with RankUseCase and reports recall@k, hit-rate@k, MRR (k ∈ {1,5,10,20,50}) plus one-hop recall (gold reachable from a top-k note by wikilink or related:). Deterministic sampling by seed. No judge: this measures the embedding model alone.
POST /api/v1/lab/eval{model, sample, seed, k}, write policy (it is expensive, not a public read).
Lab page: pick any registered embedding model, run, compare runs side by side.
Tests
4 use-case tests (metrics on a seeded catalog, skipped docs, sampling determinism, one-hop credit), host test for 401 and a labelled run.
Stacked on #6 (facts); independent of #7. Retarget to master once #6 merges.
## What
- `EvaluateUseCase` (Application): the C# port of `bin/wiki_rank_eval.py`. Every `output/` document with a `question:` and a `sources:` list is a labelled query; gold is the cited slugs that still exist as wiki notes. Ranks each with `RankUseCase` and reports recall@k, hit-rate@k, MRR (k ∈ {1,5,10,20,50}) plus one-hop recall (gold reachable from a top-k note by wikilink or `related:`). Deterministic sampling by seed. No judge: this measures the embedding model alone.
- `POST /api/v1/lab/eval` `{model, sample, seed, k}`, write policy (it is expensive, not a public read).
- **Lab** page: pick any registered embedding model, run, compare runs side by side.
## Tests
- 4 use-case tests (metrics on a seeded catalog, skipped docs, sampling determinism, one-hop credit), host test for 401 and a labelled run.
- `dotnet test Wiki.slnx`: 114 green on this branch.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Adds EvaluateUseCase, the C# port of bin/wiki_rank_eval.py: every output/
document with a question and a sources list labels a query, gold is the
cited slugs that still exist as wiki notes, and RankUseCase ranks each
one to report recall@k, hit-rate@k, MRR and a one-hop recall variant that
also credits a gold note reachable from a top-k note by wikilink or
related:. Exposes it as POST /api/v1/lab/eval (write-policy) and a new
/lab page for running it against any registered embedding model and
comparing runs side by side.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Implements IAnswerModel over Anthropic's streaming Messages API: SSE
parsing (text_delta/usage/error), 429/529 retry with Retry-After or
exponential backoff, and a pure AnswerPrompt.Build for the evidence
and judgements prompt shape. Health check hits GET /v1/models.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
POST /api/v1/questions runs ask (rank + judge), selects the paragraphs that
carry probability mass, and streams one answer-model call over them. Below
the coverage gate no model is called and the response names the gap. With
save: true (signed-in user or API key) the answer lands in output/ as a
synth-shaped document with sources, confidence and the answering model.
The Answers page streams the same use case and lists saved answers.
Anthropic is the first IAnswerModel adapter; the answer model is chosen per
request or from Wiki:AnswerModels:Active.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Both phases register their use cases and map their endpoints in the same host
files. The lab host test asserted exactly one labelled query, which held only
while no other test in the shared fixture wrote to output/; it now checks the
seeded query is among the rows.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Reopened against main after #6 merged (Gitea closed the stacked PRs). This branch now also contains #7 (feat/answer-model merged in, conflicts in Program.cs/ApiV1.cs/README resolved), so it merges cleanly in either order: merge #7 first and this shows only the lab diff, or merge this alone and #7 becomes a no-op. Full suite: 128 green.
Reopened against main after #6 merged (Gitea closed the stacked PRs). This branch now also contains #7 (feat/answer-model merged in, conflicts in Program.cs/ApiV1.cs/README resolved), so it merges cleanly in either order: merge #7 first and this shows only the lab diff, or merge this alone and #7 becomes a no-op. Full suite: 128 green.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Stacked on #6 (facts); independent of #7. Retarget to master once #6 merges.
What
EvaluateUseCase(Application): the C# port ofbin/wiki_rank_eval.py. Everyoutput/document with aquestion:and asources:list is a labelled query; gold is the cited slugs that still exist as wiki notes. Ranks each withRankUseCaseand reports recall@k, hit-rate@k, MRR (k ∈ {1,5,10,20,50}) plus one-hop recall (gold reachable from a top-k note by wikilink orrelated:). Deterministic sampling by seed. No judge: this measures the embedding model alone.POST /api/v1/lab/eval{model, sample, seed, k}, write policy (it is expensive, not a public read).Tests
dotnet test Wiki.slnx: 114 green on this branch.🤖 Generated with Claude Code
Reopened against main after #6 merged (Gitea closed the stacked PRs). This branch now also contains #7 (feat/answer-model merged in, conflicts in Program.cs/ApiV1.cs/README resolved), so it merges cleanly in either order: merge #7 first and this shows only the lab diff, or merge this alone and #7 becomes a no-op. Full suite: 128 green.