Skip to main content
Exemplar

How it works

Five chapters, each on one real recorded artifact, from reading a clip to a bound on false alarms.

Every chapter uses one recorded artifact, and every control re-runs Exemplar’s offline logic in your browser on that artifact: the same rule evaluator, the same witness extraction and the same rank arithmetic as the engine, checked against its outputs. Nothing on this page calls a model.

Step 1: Claude reads the clip once

The 16 frames perception read for recorded event 3, each with the facts written down for it.

Playground recording 19: box seen on the steps and the porchframe 1 of 16 · 1.0 s

Arrow keys step one frame, Page Up and Page Down step four.

Facts Claude wrote for this frame

  • in_zone(k1, steps)

    k1 is a package (cardboard box)

    confidence: high
  • in_zone(o1, porch)

    o1 is a object (watering can or bottle, blue cap)

    confidence: low

A fact is a predicate about an entity (in_zone, enters, picks_up…) with a confidence of low, med or high. These facts, not pixels, are all the later steps see.

Claude’s one-line summary of the clip

The clip is essentially static: a cardboard box sits on the front steps and a small object by the porch remains unchanged while snow covers the yard, with no people or vehicles appearing across all 16 frames.

The same facts across all 16 frames

Confidence of each fact at each sampled frame. Filled cells are present; the shade is the confidence.
FactFrames 1 to 16
in_zone(k1, steps)
in_zone(o1, porch)

highmedlownot seen

Frames read
16
in one model call
Samples
1
fast model: each frame set read once
Tokens in / out
7,956 / 1,342
as recorded
Model time
10.6 s
recorded latency

This is recorded event 3 of the 5 in the live run on the Ring Developer Playground. Claude on Amazon Bedrock wrote these facts once, when the clip arrived. Every rule is then scored on these facts alone, which is why checking a new rule costs no model call.

Frame 1 of 16, at 1.0 seconds: 2 facts.

Step 2: The agent writes a rule with a blank

A language model proposes the shape of a rule and leaves the numbers blank. A type checker sends back what does not fit.

Claude on Amazon Bedrock via the Strands agent, recorded. The model does not write the numbers. It writes the shape of a rule and leaves each number as a blank, written ?d or ?b. A deterministic printer turns each sketch into plain English, blank included; no model paraphrases it. When the model’s rounds left fewer than six consistent rules, the run topped up from a fixed template library; those sketches are marked.

  • Round 1one blank: ?d
    exists k: Package: holds_for >= ?d (in_zone(k, steps) or in_zone(k, porch))

    There is a package k such that (k is on the steps or k is on the porch) continuously for at least ?d s.

    recorded solvesat?d = 15margin 0.45

  • Round 1one blank: ?d
    exists k: Package: holds_for >= ?d in_zone(k, steps)

    There is a package k such that k is on the steps continuously for at least ?d s.

    recorded solvesat?d = 15margin 0.451 example missed

  • Round 1one blank: ?d
    exists k: Package: holds_for >= ?d in_zone(k, porch)

    There is a package k such that k is on the porch continuously for at least ?d s.

    recorded solvesat?d = 15margin 0.452 examples missed

  • Round 2one blank: ?b
    exists k: Package: always[0, ?b] (in_zone(k, steps) or in_zone(k, porch))

    There is a package k such that at every moment within 0 to ?b s, (k is on the steps or k is on the porch).

    recorded solvesat?b = 19.5margin 0.45

  • Round 22 blanks: ?b, ?a
    exists k: Package: eventually[0, ?b] in_zone(k, steps) and eventually[?a, ?b] (in_zone(k, steps) or in_zone(k, porch))

    There is a package k such that (at some point within 0 to ?b s, k is on the steps) and at some point within ?a to ?b s, (k is on the steps or k is on the porch).

    recorded solvesat?b = 19.5?a = 0margin 0.451 example missed

  • Round 2one blank: ?d
    exists k: Package: holds_for >= ?d in_zone(k, steps) or holds_for >= ?d in_zone(k, porch)

    There is a package k such that k is on the steps continuously for at least ?d s or k is on the porch continuously for at least ?d s.

    recorded solvesat?d = 15margin 0.45

  • Template back-fillone blank: ?b
    exists k: Package: eventually[0, ?b] attr(k, cardboard_box)

    There is a package k such that at some point within 0 to ?b s, k has the attribute "cardboard box".

    recorded solvesat?b = 19.5margin 0.32 examples missed

  • Template back-fillone blank: ?b
    exists k: Package: eventually[0, ?b] in_zone(k, porch)

    There is a package k such that at some point within 0 to ?b s, k is on the porch.

    recorded solvesat?b = 19.5margin 0.452 examples missed

  • Template back-fillone blank: ?b
    exists k: Package: eventually[0, ?b] in_zone(k, steps)

    There is a package k such that at some point within 0 to ?b s, k is on the steps.

    recorded solvesat?b = 19.5margin 0.451 example missed

  • Template back-fillone blank: ?d
    exists k: Package: holds_for >= ?d attr(k, cardboard_box)

    There is a package k such that k has the attribute "cardboard box" continuously for at least ?d s.

    recorded solvesat?d = 24margin 0.3

  • Template back-fillone blank: ?b
    exists o: Object: eventually[0, ?b] attr(o, watering_can_blue)

    There is an object o such that at some point within 0 to ?b s, o has the attribute "watering can blue".

    recorded solvesat?b = 19.5margin 0.32 examples missed

  • Template back-fillone blank: ?b
    exists o: Object: eventually[0, ?b] in_zone(o, steps)

    There is an object o such that at some point within 0 to ?b s, o is on the steps.

    recorded solvesat?b = 19.5margin 0.12 examples missed

The type checker catches the agent’s mistakes

In this recorded session the agent proposed a sketch the grammar does not allow. The checker sent it back with this message, word for word, and the agent revised it.

Sketch sent back

exists k: Package: holds_for >= ?d in_zone(k, steps) or exists k: Package: holds_for >= ?d in_zone(k, porch)

Recorded error text

syntax error: line 1, column 57: unexpected 'exists'; expected a formula (an atom like present(p), or not / eventually[a, b] / always[a, b] / holds_for >= d, or '(')
exists k: Package: holds_for >= ?d in_zone(k, steps) or exists k: Package: holds_for >= ?d in_zone(k, porch)
                                                        ^

Step 3: How the solver fills the blank

Why 15 s: the range of values that keeps the examples right, and the value placed in it.

The recorded sketch and the rule the solver made from it

exists k: Package: holds_for >= ?d (in_zone(k, steps) or in_zone(k, porch))
exists k: Package: holds_for >= 15 (in_zone(k, steps) or in_zone(k, porch))

There is a package k such that (k is on the steps or k is on the porch) continuously for at least 15 s.

Why 15 s?

Each row is one example. The dots are the sampled frames: a filled dot where the part of the rule inside the “continuously” holds, a ring where it does not. The thick tick is the longest stretch the example holds for. A yes example needs d at or below its tick; a no example needs d above its tick (or no tick at all). The shaded band is the range of d that keeps the examples right, as computed here; the amber line is the value the engine recorded.

  • yesPlayground recording 01: box on the steps
    on the right side: +0.45

    Holds for up to 29.746 s in a row (to the end of the clip).

  • yesPlayground recording 06: box on the steps
    on the right side: +0.45

    Holds for up to 29.746 s in a row (to the end of the clip).

  • yesPlayground recording 07: box seen on the steps and the porch
    on the right side: +0.45

    Holds for up to 29.746 s in a row (to the end of the clip).

  • noDoorstep video, 35 to 55 s
    on the right side: −0.45

    The part of the rule inside “continuously” never holds on this clip.

  • noDoorstep video, 40 to 60 s
    on the right side: −0.45

    The part of the rule inside “continuously” never holds on this clip.

  • noPlayground recording 01: cars in a parking lot
    on the right side: −0.50

    The part of the rule inside “continuously” never holds on this clip.

  • noPlayground recording 01: birds at snowy feeders
    on the right side: −0.50

    The part of the rule inside “continuously” never holds on this clip.

Drag, or use the arrow keys for 0.5 s and Page Up / Page Down for 5 s. Every score is recomputed by the evaluator. Marks under the track: amber is the recorded value, blue the ends of the range.

Weighted agreement at d = 15 s

21 of 21

3 of 3 yes examples matched, 4 of 4 no examples rejected.

Margin at d = 15 s

0.45

The smallest |score| over all examples; every example is on its labelled side.

Recorded

d = 15 s, margin 0.45

You are looking at the recorded value.

The solver first keeps as much of the (weighted) example set on the right side as it can, then makes the margin as wide as possible. For that best set it computes the range of d that keeps those same examples right at that margin. The engine places d in the middle of the range, on a 0.5 s grid.

Range of d at margin 0.45
0 to 29.746 sequals the engine’s exported range
Middle of the range
14.873 s
Snapped to the 0.5 s grid
15 sequals the recorded d

d = 15 seconds. 3 of 3 yes examples matched, 4 of 4 no examples rejected. Weighted agreement 21 of 21. Margin 0.45.

Step 4: Why it fired

Every alert comes with the evidence behind it. Drag the blank and watch each part of the rule re-score.

Recorded event

Rule

The rule, with its blank filled by the slider below

exists k: Package: holds_for >= 15 (in_zone(k, steps) or in_zone(k, porch))

There is a package k such that (k is on the steps or k is on the porch) continuously for at least 15 s.

Playground recording 19: box seen on the steps and the porch. The frame where the rule found its evidence, at 1.0 s.

The part of the rule that has to hold, at each sampled frame

bar up: holdsbar down: does not holdwindow the rule checked

Arrow keys move 0.5 s, Page Up and Page Down 5 s. The window, the score and the match state are recomputed by the evaluator.

Does the rule match? (ρ > 0)

Yes

score +0.45

Does it fire? (ρ > τ)

Fires

τ = 0 (stage 1)

Against the recording

Reproduces the recorded witness exactly

Recorded on the Playground: fired, score +0.45.

Why it fired

score +0.45vsτ 0·margin +0.45

  • kbound tok1package · cardboard_box

There is a package k such that (k is on the steps or k is on the porch) continuously for at least 15 s.

Witness timeline: each row is a subformula with the window it was evaluated on (or the moment of evidence) and its robustness ρ.
Part of the ruleTime axis in secondsρ
holds_for >= 15 (in_zone(k, steps) or in_zone(k, porch))from 1.0 to 16.0 s+0.45
in_zone(k, steps)at 1.0 s+0.45

A bar is the window of the clip that part of the rule was checked over (a 15 s rule shows a 15 s bar); a diamond is the moment of evidence. ρ says how strongly, from −0.5 (clearly not) to +0.5 (clearly yes).

Recomputed in your browser from the recorded facts, with the same evaluator and witness code the engine’s outputs were checked against.

package rule on event 3 with d = 15 seconds: score +0.45, the rule matches, it fires against tau 0.

Step 5: A bound on false alarms

The recorded random sample, how its k-th score becomes the threshold, and the arithmetic of the rank.

A. Recorded calibration of the deployed package rule

Immutable: read from the export

Before the rule was deployed, 20 clips were drawn at random from the library (through the random-sample endpoint, disjoint from the examples the rule was taught from and from the Lab’s curated clips) and labelled. The rule was scored on each. Its alert threshold τ comes from the random negatives: the k-th smallest of their n scores, where k = ⌈(n + 1)(1 − α)⌉.

α
0.1
target false-alarm rate
Random negatives n
12
scored for the threshold
Rank k
12
⌈(12 + 1) × 0.9⌉
τ_α, the k-th smallest
−0.45
before the floor at 0
τ, the alert threshold
0
max(τ_α, 0): fire if score > τ
Recall on random positives
8 of 8
95% CI 0.63 to 1

random negative (circle)random positive (square)the k-th negative, 12th of 12τ

The 12th of the 12 negative scores is −0.45. Scores below zero never fire a rule anyway, so τ is floored at zero: the rule fires when its score is above 0.

Scope of the recorded bound

Stage-1 decisions on fast-perception facts, for events exchangeable with the random sample. The recorded rule and its calibration are not changed by anything on this page.

The same calibration, recomputed here from the recorded facts: identical (20 of 20 scores and every calibration field compared).

The random sample as a table
The random clips, their label and the deployed rule’s score on each. Negatives are listed in rank order.
Rank among negativesClipLabelScore
1Doorstep video, 25 to 45 sno−0.50
2Doorstep video, 50 to 70 sno−0.50
3Doorstep video, 55 to 75 sno−0.50
4Doorstep video, 65 to 85 sno−0.50
5Doorstep video, 70 to 90 sno−0.50
6Doorstep video, 75 to 95 sno−0.50
7Doorstep video, 80 to 100 sno−0.50
8Playground recording 03: birds at snowy feedersno−0.50
9Playground recording 04: birds at snowy feedersno−0.50
10Playground recording 03: cars in a parking lotno−0.50
11Doorstep video, 10 to 30 sno−0.45
12k-th: becomes τ_αDoorstep video, 20 to 40 sno−0.45
n/aPlayground recording 10: box on the stepsyes+0.45
n/aPlayground recording 16: box on the stepsyes+0.45
n/aPlayground recording 12: box on the stepsyes+0.45
n/aPlayground recording 11: box on the stepsyes+0.45
n/aPlayground recording 13: box on the stepsyes+0.45
n/aPlayground recording 15: box on the stepsyes+0.45
n/aPlayground recording 04: box on the stepsyes+0.45
n/aDoorstep video, 5 to 25 syes+0.45

B. The arithmetic of the rank

Exploration: change α and n

The threshold is the k-th smallest of the n negative scores, with k = ⌈(n + 1)(1 − α)⌉. Under exchangeability, a new negative event then scores above the threshold with probability at most α. The sliders change only the arithmetic: no scores are drawn beyond the 12 real ones.

k = ⌈(12 + 1) × (1 − 0.1)⌉ = ⌈11.7⌉ = 12

The threshold would be the 12th smallest of 12 negative scores.

These are the recorded values: k = 12, the 12th of 12 negatives, as in part A.

Smaller α asks for fewer false alarms and needs more random negatives: the fewest that give a finite rank at α = 0.1 is 9.

Alpha 0.1, n 12 random negatives: the rank k is 12, so the threshold is the 12th smallest score.