Skip to content
SA.Shantanu Acharya
MenuClose
Demos

Governed rules, before any generated code.

RuleWeaver extracts business rules from metadata and documents, keeps them in a versioned registry, and only then generates dbt or PySpark. This page runs the evaluation half of that system on a synthetic claims pack. No API, no model call, no member identifier.

Domain
Healthcare payer claims
Policy
claims-adjudication@1.4.2
Runtime
Browser, deterministic

01 — Problem & Constraints

A candidate rule is not an adjudication.

Payer rules live in policy documents and in the shape of the warehouse: member, claim, provider, network, billed amount. A model can pull a candidate out of that material, attach an evidence excerpt, and score its confidence. That candidate is still a draft. It does not get to move a claim, and it does not get to be pasted into a transformation.

The constraint is the registry. A rule has a lifecycle — draft, review, approved, published, deprecated — a closed set of operators, and a version. Simulation runs before publication. Governance can hold a graph patch or an approval without a redeploy. Generated ELT references the rule id. The threshold stays in the registry, where it can change without a hunt through SQL.

  1. Lifecycle

    Auto-apply requires published. Review and draft can be matched for inspection. They cannot approve a claim.

  2. Operators

    Twelve operators are valid. eq, lte, in, and the rest of the allow-list. Anything else fails validation.

  3. Writes

    Escalate returns an approval with can_proceed: false. Deny and schema failure withhold the artifact. The ledger still records the row.

02 — System Architecture

Seven stages, three outcomes.

Upstream, document intelligence and the ontology graph propose structure: concepts, aliases, evidence, a confidence. The path below is what happens once a rule is in the registry and a claim arrives. Context loads the policy. Alignment binds fields onto the healthcare ontology. Match and validate are deterministic. Govern and simulate decide whether an artifact is even eligible. The ledger is written for every outcome.

Figure — Governed evaluationclaims-adjudication@1.4.2
[ Claim payload ]
RULE REGISTRY
01 Context
Policy version, published registry, confidence floor
02 Align
Bind the claim onto Member, Provider, and Claim
03 Match
Run allow-listed operators against the payload
04 Validate
Conflicts, coverage gaps, operator schema
05 Govern
Draft and review cannot auto-apply
06 Simulate
Dry-run the action before any artifact is eligible
07 Ledger
Append the decision, the rule ids, and a checksum
Allow — published match, artifact eligible
Escalate — approval pending, no write
Deny — policy or schema, mutation blocked
Extraction, retrieval, and ontology mining sit upstream. They propose rules. This loop is what applies them.

03 — Interactive Sandbox

Run the registry.

Four claims, the same policy pack. Move the billed amount, the auto-approve ceiling, or the confidence floor and run again. Executive view states the outcome and who is accountable. Architect view shows the predicate trace, the latency of each stage, and the full ledger. Narration reads that same run aloud, using the browser voice.

Simulation · claims-adjudication@1.4.2

Same inputs, same ledger. Narration reads each stage in the browser voice.

View mode
Scenario
$240
$500
0.80
Member status
Network

Block unpublished rules

Review and draft rules stay out of the match. Turning this off lets them appear in the trace. It does not let them auto-approve.

Hard deny ceiling $10,000 · claim type professional · not a slider

Idle

Choose a claim and run the registry. The decision is computed here, not requested.

  1. 01 — Context

    wait

  2. 02 — Align

    wait

  3. 03 — Match

    wait

  4. 04 — Validate

    wait

  5. 05 — Govern

    wait

  6. 06 — Simulate

    wait

  7. 07 — Ledger

    wait

Decision ledger

{
  "decision": null
}

04 — Architectural Trade-Offs & Metrics

What the split costs, and what it buys.

Rules stay out of the model

A mapping records which rules applied. The dbt model names them. It does not inline the ceiling. Changing policy is a new version and a new simulation. The cost is a registry join at generation time, and a refusal to hot-edit generated SQL.

The hot path is not a model call

Extraction can use a model. Evaluation of a published rule does not. Operators compare field and value, which is why this page can promise the same checksum for the same input. Milliseconds here. The model stays upstream, where being slow does not adjudicate a claim.

The gap is a decision

Amounts between the auto-approve ceiling and the hard stop match nothing on purpose. Validation records the gap. Governance opens a review and sets can_proceed to false. Filling that band inside a prompt would turn an exception into a payment.

Low confidence has no direction

A matched rule under the floor escalates whether its action would have approved or denied. Weak extractions do not get to move money either way. The floor is a control on this page so that behavior is visible.

Operators
12
Lifecycle states
5
Evaluation stages
7
Network calls
0

Figures describe the public model on this page: a synthetic policy pack and a claims payload with no member, provider, or host identity. They are not a production benchmark. PostgreSQL holds the registry, evidence, approvals, and audit log. The graph holds concepts and relationships. Both sit behind the same gate.