PAILEvidence Runtime
How it works

From raw data to evidence authority.

Step one

What a normal RAG pipeline does.

A RAG system stores searchable pieces of source material and gives selected pieces to a generator.

1 · PARSE

Read the source

Extract text and structure from PDFs, documents, logs, tables, databases, APIs, audio transcripts, or other supported formats.

2 · CHUNK

Create useful retrieval units

Split by policy section, paragraph, function, transaction, incident, entity, scene, or another boundary that preserves meaning.

3 · INDEX

Store searchable representations

Each chunk may be embedded into a vector and stored with its original text and metadata. Exact, keyword, SQL, and graph indexes may coexist.

4 · RETRIEVE + GENERATE

Find candidates and build context

The question is searched, the top candidates are placed in a context packet, and an LLM usually writes the answer.

The PAIL insertion point

Candidate evidence is not yet trusted evidence.

PAIL evaluates candidates after retrieval and before generation. It may also normalize evidence before indexing and verify claims after generation.

BEFORE STORAGE

Canonical events

Group interleaved logs by transaction, trace, entity, and time rather than arbitrary line windows.

AFTER RETRIEVAL

Evidence guard

Remove wrong entities, expose relation conflicts, and preserve the strongest valid bridge.

BEFORE GENERATION

Permission gate

Only verified packets may reach an optional model; missing or conflicting evidence closes the gate.

AFTER GENERATION

Claim check

Model prose can be rejected when it introduces values or conclusions absent from the packet.

Chunking without confusion

Teams define a policy once. They do not cut every file by hand.

One universal fixed-size chunker is convenient but can destroy the exact boundary the answer depends on.

SourceUseful boundaryWhy
Policy PDFHeading and policy sectionKeep eligibility, exceptions, and version metadata together
Bank/POS logsTransaction, STAN, RRN, trace, or sessionAvoid mixing events from concurrent payments
Application incidentIncident plus bounded time windowPreserve sequence without absorbing unrelated traffic
SQL/CSVEntity or recordKeep field relationships and keys intact
CodeFunction or classPreserve executable scope
Story/proseScene or overlapping narrative windowMaintain characters and before/after context
Concrete decision example

“Can I take 30 annual leaves?” is not the same as “How can I take 30 days off?”

The number is identical. The intent and permitted answer are different.

INPUT

Request

Employee requests 30 days away.

STATE

Available

24 annual-leave days remain.

RULES

Shortfall

6 days; unpaid leave allowed with approval.

DECISION

Partially allowed

24 annual + 6 unpaid, manager approval required.

ANSWER

Explain

Template or LLM restates only that decision.

Generation is replaceable

Three valid ways to use a model.

The trustworthy core remains deterministic in every mode.

NO LLM

Rules decide; a template answers

Best for bounded API responses, policy calculations, offline systems, and workflows where language variation is limited.

LLM AFTER PAIL

Rules decide; the model explains

The model sees the decision object and evidence IDs. It cannot change numbers, status, or permitted alternatives.

LLM BEFORE + AFTER

The model normalizes language; PAIL keeps authority

A model may map flexible language into a canonical intent, but PAIL verifies that structure against evidence and policy before any action or answer.

See the difference

Use the same records with and without the evidence gate.

The public lab makes the outcome visible without exposing the proprietary runtime.