docs← Back to article

Markdown for LLMs

Get a separate answer for each reading

The source Markdown for this article. Copy it into your assistant or download it as a text file.

Download this articlePlain text ↗
# Get a separate answer for each reading

## Intent

I want to get a separate answer for each reading.

## Wrong form and why it stays silent

Mixing alternative results means executing a third program that the author did not choose.

```text title="Incorrect form"
alternatives Broad;
```

## Correct form

```law
language "law.core" version "0.2";
package recipe.m07 version "1.0.0";
namespace "urn:recipe:m-queries:07";
source Act { kind policy; }
edition E of Act { language ru; officiality unofficial; materialization_status ABSTRACT_ONLY; in_force [@2026-01-01, infinity); }
fragment F in E { kind article; locator "1"; text ru unofficial "Учебная норма имеет два прочтения."; }
entity Person;
relation filed(p: Person);
relation accepted(p: Person);
rule Allow strict { for p: Person; when filed(p); then accepted(p); }
rule Deny strict { for p: Person; when filed(p); then not accepted(p); }
interpretation Broad of F { status disputed; include Allow; }
interpretation Narrow of F { status disputed; include Deny; }
interpretation_group Meaning { alternatives Broad, Narrow; selection exactly_one; }
```

## Frozen execution scene

| Input / variant | Question | Expectation |
|---|---|---|
| 1. both branches separately | `interpretation_analysis(Meaning, truth(accepted(entity_ref("urn:recipe:m-queries:p"))))` | `evaluation_status == INTERPRETATION_REQUIRED;` |
| 2. broad | `truth(accepted(entity_ref("urn:recipe:m-queries:p")))` | `truth_status == TRUE_ONLY;  evaluation_status == COMPUTED;` |
| 3. narrow | `truth(accepted(entity_ref("urn:recipe:m-queries:p")))` | `truth_status == FALSE_ONLY;  evaluation_status == COMPUTED;` |

```lawtest
test "both readings answered separately" {
    given {
        context { legal_time @2026-09-13; decision_time @2026-09-13T09:00:00Z; knowledge_time @2026-09-13T09:00:00Z; timezone "UTC";  }
        assert filed(entity_ref("urn:recipe:m-queries:p"));
    }
    evaluate interpretation_analysis(Meaning, truth(accepted(entity_ref("urn:recipe:m-queries:p"))));
    expect evaluation_status == INTERPRETATION_REQUIRED;
}
```

```lawtest
test "broad reading establishes" {
    given {
        context { legal_time @2026-09-13; decision_time @2026-09-13T09:00:00Z; knowledge_time @2026-09-13T09:00:00Z; timezone "UTC"; interpretation Broad; }
        assert filed(entity_ref("urn:recipe:m-queries:p"));
    }
    evaluate truth(accepted(entity_ref("urn:recipe:m-queries:p")));
    expect truth_status == TRUE_ONLY; expect evaluation_status == COMPUTED;
}
```

```lawtest
test "narrow reading refutes" {
    given {
        context { legal_time @2026-09-13; decision_time @2026-09-13T09:00:00Z; knowledge_time @2026-09-13T09:00:00Z; timezone "UTC"; interpretation Narrow; }
        assert filed(entity_ref("urn:recipe:m-queries:p"));
    }
    evaluate truth(accepted(entity_ref("urn:recipe:m-queries:p")));
    expect truth_status == FALSE_ONLY; expect evaluation_status == COMPUTED;
}
```

Nested results are pinned by the reading StableId:

| Reading | truthStatus | evaluationStatus |
|---|---|---|
| Broad | TRUE_ONLY | COMPUTED |
| Narrow | FALSE_ONLY | COMPUTED |

They match the separate scenes 2 and 3. The outer DATA result
measured INTERPRETATION_REQUIRED: the current status projection keeps
the absence of a choice from the original case. Results stay separate,
but no separate rule sets the outer analysis status; this is an interface
boundary, not a claim that nested branches were uncomputed.

Scene 1 runs on both evaluators, but the canonical documents differ in exactly four paths: the nested per-reading hashes of both alternatives and the derived proof and result hashes. The nested answers themselves match, and the separate scenes 2 and 3 keep full parity. Scene 1 therefore lives in resources and is pinned by the adapter to that concrete gap without normalization; the normative expectation is checked by both engines.

The analysis test is shown in a lawtest block: lower-test knows this form, while
a program check, if the test is placed in law, reports E2105/E2109.
This is inconsistency of surface stages; the nested hash divergence below is pinned separately.

Check of result fields and extra inputs:

```python
>>> import runpy
>>> checks = runpy.run_path("docs/recipes/m-queries/resources/check.py")
>>> checks["alternatives"](https://github.com/arxohq/law/blob/master/docs/recipes/m-queries/7)
True
```

## Counterfactual

The sidecar mutation reproduces `LDC-E0201`. Counterfactual table variants are executed separately; input errors are not passed off as NEITHER.

## Boundary

results_by_interpretation is a descriptive record. The surface query is interpretation_analysis; nesting is allowed once. No separate result of the example is Contradiction.

## Pitfall

A choice must not leak between independent runs — see [Two readings of one norm](/recipes/z-interpretations/choose-reading/).