Purpose: to measure the fact reading on cases its developers have never seen.
The 61 cases in tests/fact-cases were used to build and tune the reader, so its score on them is optimistic. The hidden set is the honest measure.
Rules
- Who writes it. Someone who has not worked on the reader: an independent agent, or a person.
- What the author may read:
- this file;
- the claim catalogue
data/law/claims/*.json, for what each claim type is; data/law/claim-elements.json, for the facts and requests each claim type is read for;- the codes in
src/DzLegal.Drafting/CaseFacts.cs(FactVocabulary).
- What the author must not read:
- the prompts in
data/law/prompts/; - the cases in
tests/fact-cases/andtests/grounds-cases/; - the benchmark results.
- the prompts in
- Where it lives. Never in the repository and never sent to the developers. It stays in a folder outside the repository, for example
C:\dz-hidden\. - Fictitious data only. Names, places, dates and amounts are invented. Formal Arabic (الفصحى) only.
- Runs.
- It is run once per frozen version. The commit is recorded in
manifest.json. - Only
summary.mdis shared. - The
--outfolder holds every case’s text: do not share it.
- It is run once per frozen version. The commit is recorded in
- After use. Once its failures are opened to improve the reader, the set has been seen. It then joins development, and the next measure needs a new hidden set.
Content (about 100 cases)
Coverage:
- 4 or 5 cases for each of the 21 claim types in the catalogue, about 90 in all.
- 10 cases outside the catalogue (
"claim": "out-of-scope"), for example an inheritance partition, an administrative appeal, a company dispute or a correction of civil status.
Make them read like a lawyer’s notes, not like an exercise:
- 3 to 10 sentences;
- side details that do not matter;
- several dates and amounts, some of them belonging to different facts;
- a key date given only in the documents list;
- facts that did not happen («لم يوجه أي إعذار»);
- facts one party denies («ينكر المدعى عليه…»);
- the plaintiff on either side when the claim type allows it (the lessee in a commercial lease, the father in a custody case);
- a monthly amount next to a total;
- a court section that does not match the facts.
Format
One file, for example hidden-cases.json. It holds an object with a cases list, and each case is:
{
"name": "h001",
"partition": "hidden",
"claim": "unpaid-rent",
"inputs": {
"claim.subject": "…",
"notes.facts": "one fact per line\n…",
"notes.requests": "…",
"documents.list": "…",
"court.section": "القسم المدني"
},
"gold": {
"relation": "lease",
"position": "lessor",
"events": [
{ "kind": "contract_concluded", "date": "15/02/2024", "polarity": "affirmed", "decisive": true },
{ "kind": "rent_unpaid", "amount": "400000", "actor": "defendant", "polarity": "affirmed", "decisive": true },
{ "kind": "notice_served", "polarity": "denied", "decisive": false }
],
"forbidden": [ { "kind": "rent_unpaid", "amount": "50000" } ],
"requests": [ { "kind": "payment", "amount": "400000" }, { "kind": "eviction" } ]
}
}
The fields
name: neutral (h001, h002…). It appears in the shared summary, so it must say nothing about the case.claim: a claimidfromdata/law/claims/*.json, orout-of-scope.inputs: only these keys. Any of them may be left out exceptnotes.facts.relation,position, eventkind, requestkind: codes fromFactVocabulary. Several accepted answers are separated by|("lender|creditor").- The position must be one of the roles
claim-elements.jsonlists for the claim type. - Every event and request must be one that claim type is read for.
- The position must be one of the roles
date:dd/mm/yyyy, or a year (2019);- the same date must be written in the case text.
amount:- digits only (
400000for «400.000 دج»); - the same amount must be written in the case text.
- digits only (
actor:plaintiffordefendant, only when who did it matters.polarity:affirmed,denied(the text says it did not happen) ordisputed(one side claims it, the other denies it).decisive:truewhen a reader that misses this fact would get the case wrong.forbidden: a reading that must never be made:- an event that is absent or denied, read as affirmed;
- or a value bound to the wrong event (the monthly rent given as the total owed).
- Out-of-scope cases: fill in
relationandpositionas well as possible, and leaveeventsandrequestsempty.
Check the file without showing it to anyone
dotnet run -c Release --project src/DzLegal.Harness -- facts check --cases C:\dz-hidden
The check names each problem by case name only, never by text. It reports:
- unknown codes or claim types;
- dates and amounts that are not written in the case;
- answers the reader is never asked for.
Fix them until it prints «No problem found.»
Running it
dotnet run -c Release --project src/DzLegal.Harness -- facts --alpha --cases C:\dz-hidden --partition hidden --models gemma3:4b --out C:\dz-hidden-results
Share only C:\dz-hidden-results\summary.md.
For the whole chain, with the claim type read by the analysis instead of given, add --claims read.
Runs
| Date | Version | Mode | Result | Summary |
|---|---|---|---|---|
| 30 Oct 2026 | 83cd421 |
claim type given | 32 of 90 cases fully right, 63 s per case | docs/baselines/2026-10-30-hidden-given/ |
| 31 Oct 2026 | 140a353 |
Nemotron 3 Ultra online, claim type given | 64 of 90 cases fully right, 4 s per case, 0 failed calls | docs/baselines/2026-10-31-hidden-nemotron-given/ |
| 31 Oct 2026 | 140a353 |
Nemotron 3 Ultra online, claim type read | 60 of 90 in-catalogue cases fully right, claim type right on 85 of 90, 10 of 10 out-of-scope declined, 8 s per case | docs/baselines/2026-10-31-hidden-nemotron-read/ |
| 8 Nov 2026 | cda67fc (codex/alpha-03) |
set v2, gemma3:4b, claim type given | 39 of 90 cases fully right, 28 s per case, mains and Best performance | docs/baselines/2026-11-08-hidden-v2-gemma3-given/ |
| 8 Nov 2026 | cda67fc (codex/alpha-03) |
set v2, gemma4:e4b with thinking off, claim type given | 58 of 90 cases fully right, 21 s per case, model memory peak 7.2 GB | docs/baselines/2026-11-08-hidden-v2-gemma4-given/ |
| 9 Nov 2026 | 5ffc12c (codex/alpha-03) |
set v2, gemma4:e2b with thinking off, claim type given | 41 of 90 cases fully right, requests found 63%, 7 s per case, model + app memory peak 5.1 GB | docs/baselines/2026-11-09-alpha-03-hidden-v2-phone-models/ |
| 9 Nov 2026 | 5ffc12c (codex/alpha-03) |
set v2, gemma3n:e2b, claim type given | 42 of 90 cases fully right, requests found 69%, 19 s per case, model + app memory peak 6.9 GB | docs/baselines/2026-11-09-alpha-03-hidden-v2-phone-models/ |
The two 31 October runs used the same reader (Alpha-01) as the first run, with only the model changed (and, in read mode, every claim type offered to the online model, the court section given as a hint). The set had already been seen at summary level, so they compare models on the same cases; they are not a fresh unseen measure. Both ran on battery power, recorded by the new run manifest.
The first set (100 cases, written by Codex on 30 Oct 2026) has now been seen at the level of the summary: case names, error types and the codes involved. Its case texts were never opened by the developers; the results folder sent with the summary had its case files deleted unread. Under rule 7, it is no longer hidden for changes made from these results: the next measure of a changed reader needs a new set.
The second set (v2) has 100 cases (n001 to n100, 90 within the catalogue), written on 8 Nov 2026 by an author who had seen neither the reader’s prompts, nor its cases, nor its results, under docs/briefs/HIDDEN-V2-BRIEF.md and the polarity rule agreed then. Both v2 runs used the unchanged Alpha-01 reader at the frozen commit cda67fc, with only the model changed. The owner’s guarded command (tools/alpha-03/Run-OwnerAlpha01.ps1) ran each once, serially, on mains power with Best performance, a model reload every ten cases and a 512 MiB memory guard. It was launched by Codex as a blind operator, who saw only the exit codes, never the cases or the results. Only the two summary.md files left the laptop. Set v2 is now seen at summary level as well: the next measure of a changed reader needs a new set.
The two phone-sized models (9 Nov 2026) were run the same way, with the reader still unchanged, to see how small a model can be before the reading falls apart. gemma4:e2b reads about as well as gemma3:4b on position (93%), decisive events (93%), dates (89%) and stance (85%), four times faster and with less memory, but finds only 63% of the requests, and 36 of its answer lines could not be read by the parser (3 for gemma3:4b): it understands the case but does not always keep the answer format. gemma3n:e2b is slower than gemma4:e2b and weaker on dates (77%). These runs were measured on the laptop, not on a phone. Because they change only the model, set v2 still serves to compare models; a change to the reader to fix the requests would need a new set.