From text to model
A worked example: the short-sale price test in SEC Regulation SHO, Rule 201(b). The same steps apply to any clause, obligation or requirement.
Source text, 17 CFR 242.201(b)(1)
A trading center shall establish, maintain, and enforce written policies and procedures reasonably designed to:
(i) Prevent the execution or display of a short sale order of a covered security at a price that is less than or equal to the current national best bid if the price of that covered security decreases by 10% or more from the covered security's closing price as determined by the listing market for the covered security as of the end of regular trading hours on the prior day; and
(ii) Impose the requirements of paragraph (b)(1)(i) of this section for the remainder of the day and the following day when a national best bid for the covered security is calculated and disseminated ...
Extracted record
| rule | Regulation SHO, Rule 201(b) |
|---|---|
| trigger | price ≤ 0.90 × prior close |
| baseline | listing market close, prior day |
| restriction | no short sale at or below national best bid |
| duration | rest of trigger day + the following day |
| exceptions | (b)(1)(iii)(A) and (B), extracted as separate records |
| source | 17 CFR 242.201(b)(1) |
Each field keeps a link to the exact phrase it came from. Point at a field or a phrase to see the pair.
A stated property, then a check
Once the record is reviewed, we write down what the rule requires and test the model against it.
Property, stated in plain language and encoded in the model
Once the trigger fires, no short sale order executes or displays at or below the national best bid until the end of the following day, except as (b)(1)(iii) allows.
Boundary cases
Checks start where the text draws lines. A fall of exactly 10% triggers the restriction, because the rule says "10% or more". A trigger in the last minutes of the session carries the restriction through the next day.
Generated sequences
We generate sequences of quotes, orders and cancellations around the trigger and run each one through the model. Any sequence that breaks the property comes back as a counterexample, with the clause involved.
Recorded history
The same model runs over U.S. equity trade and quote history from 2018 in our research warehouse, so trigger and duration logic is compared with recorded prices as well as generated cases.
The result is one of two outcomes. The property holds on the model, or the check returns a concrete sequence of events that breaks it, traced back to the clause in the source text.
What we work with
Any text that sets rules, obligations or requirements. Each document type gets its own record design.
| Document type | What we extract | What it becomes |
|---|---|---|
| Legal decisions and statutes | Holdings, outcomes, dates, cited authorities and the passages that support them | Research corpora, citation graphs and retrieval for legal research agents |
| Regulation | Obligations, triggers, thresholds, exceptions and effective dates | Obligation registers and rule models |
| Exchange and venue rulebooks | Order types, priority and matching rules, auctions, price bands and halts | Machine-checkable models of order handling |
| Technical specifications | Parameters, limits, interfaces and conformance requirements | Requirement tables and conformance checks |
| Contracts and filings | Parties, defined terms, obligations, conditions and deadlines | Structured records and obligation and deadline lists |
Scanned pages are read with OCR, and each field still links to its page and passage.
Market rules as checkable models
We model how a trading system accepts, prioritizes, matches and cancels orders, and how scarce capacity is allocated. Then we state the properties it should hold and search for counterexamples.
What we test
- Properties such as "every order shown in the book can execute" and "moving the price requires capital at risk".
- Counterexample search: sequences of orders and events that break a stated property.
- Timing and sequencing: order arrival, cancel races and stale state.
- Paths to manipulation or disruption through a venue's public interfaces.
- Repairs: proposed rule changes, checked so normal operation keeps working.
Where we apply it
- Equities
- Order types, priority, opening and closing auctions, price bands and short-sale rules such as Rule 201.
- Futures
- Matching and allocation rules, price limits and trading halts.
- Decentralized exchanges
- On-chain order books and perpetual futures, including matching, liquidation and funding rules.
- Compute capacity
- Spot, preemptible and reserved pricing, interruption rules, reservation windows, and who gets capacity when it runs short. Rillor Compute Index
The same evidence rule in production
Two of our own systems hold every extracted fact to its source passage.
Grellum
Agentic legal research. Every citation in an answer must match the retrieved source passage, across the full corpus.
Every citation checked against the source passage it came from
Public-records platform
Archives public procurement records and regulation text, extracts document text, including OCR, and tracks changes, so every record links back to the document and version it came from.
Regulation text extracted alongside procurement records
A person reviews every record
The LLM proposes each field. A reviewer accepts it before the record is used.
- What the reviewer sees
- Each proposed field beside the passage it came from, with the phrase highlighted.
- What the reviewer does
- Accepts, corrects or rejects each field.
- What the record keeps
- The reviewer, the time, the source version and every change since.
- When the source changes
- Records that depend on the changed passage go back to review.
- Where corrections go
- Into the test set for the next extraction run, so a repeated error is caught before review.
Notices
AI outputs. AI outputs can be wrong. Important decisions should include human review.