PAILEvidence Runtime
Developer docs

One decision contract. Any retrieval stack.

Local runtime

Install, initialize, ingest, query.

The local Python runtime is the current reference implementation. Use synthetic or sanitized data until your security and retention boundary is approved.

python -m venv .venv
source .venv/bin/activate
pip install pail-cognitive-middleware

pail init
pail doctor
pail ingest ./sample-data --section demo
pail query "transaction_id=TXN-25 status cause" \
  --section demo --explain
Stable API boundary

Branch on status, not prose.

Applications should make decisions from explicit fields and treat natural-language answers as optional rendering.

VERIFIED_PACKET

Generation may proceed

Includes evidence IDs, bounded packet, unknowns, token statistics, relation status, and an audit trace.

CONFLICT_WITHHELD

Generation must stop

Includes conflicting fields and values. The application may ask for review or additional evidence.

NO_VERIFIED_EVIDENCE

Answer from model memory is forbidden

Includes an explicit empty-evidence contract and the reason the query could not be supported.

Integration pattern

Retriever → PAIL → renderer.

PAIL can receive externally retrieved documents or manage local ingestion. The guard must remain on every path, including bring-your-own-retriever adapters.

LANGCHAIN / LANGGRAPH

Runnable middleware

Wrap retriever output, return a typed decision, and call the model only for verified packets.

SQL / DATA API

Exact candidate source

Pass rows with provenance and preserve original identifiers and timestamps.

LOCAL FILES

Managed ingestion

Use file-aware parsers and source-specific record boundaries.

AGENT TOOL

Generation gate

Require a verified packet before an answer or downstream action can proceed.

Security boundary

Public contract. Protected core.

The public repository demonstrates API shapes, evaluator behavior, and safe synthetic fixtures. Proprietary grammar, relation internals, acoustic fingerprints, private evidence, secrets, and customer adapters stay out.

SurfacePublicProtected
Website evaluatorBounded synthetic JSON behaviorNo private runtime or customer evidence
API contractStatus, evidence, token, and audit schemasRule implementation and ranking policy
File uploadBrowser form and forwarding boundaryAuthenticated tenant runtime and storage
LLM callGrounded prompt contractModel credentials and customer packet
ResearchMethods and honest resultsUnpublished rule catalog and private datasets
Start safely

Choose the surface that matches your evaluation.

Public downloads do not contain the protected core.

PUBLIC · LEGACY CONTRACT 1.1

Evaluation kit

Clients, schemas, fixtures, and smoke assertions for the earlier public evaluator contract. Use the live OpenAPI document for the current 2.0 trial contract.

Download ZIP →
CONTROLLED

Private local runtime

Full ingestion and guarded query evaluation after scope, retention, and access are agreed.

Request evaluation →
Build the smallest proof

Integrate one retriever and one failure case first.

Measure wrong joins, answer coverage, conflict recall, latency, and exact prompt tokens before expanding.