Turn tribal knowledge into one context graph any agent can follow.
Trail is the Nanonets context graph. It turns your policies, procedures, systems, and institutional knowledge into rules an agent can apply, with every rule traceable to the document it came from.
The problem
Rules collapse when they depend on each other.
As instructions stack up, frontier models silently drop rules, double-count them, or apply them in the wrong order. Agents break completely when rules conditionally activate or override one another.
Watch the same prompt run two ways. Toggle between a flat context and a context graph.
prompt: confirm this PO, 600 units, contract pricing, deliver in 3 days, credit limit $50k
How it works
Four steps, from raw inputs to a verified result.
01Decompose the rules
Parse your documents, policies, and instructions into explicit rules, conditional branches, and approval gates. Every constraint becomes a node, whether it's a credit limit in order management, a GL rule in AP, or a payer requirement in RCM.
02Map the logic between rules
Draw edges between rules that activate, override, or narrow each other. A surcharge that re-checks a limit, a discount that trips an approval gate, a denial code that changes the next step.
03Build graph-guided outputs
This is where the agent takes action. It builds the result step-by-step with active constraints bound to each part, and global rules stay attached as conditions stack up, so they never silently drop midway.
04Check results against the graph
Re-check the finished output against every node and edge. When a late step violates a constraint, the conflict is caught and routed for review before anything is finalized.
Complex Rules benchmark
Trail is the best model for following complex business rules.
The ComplexConstraints benchmark measures performance with densely interlocking rules, where constraints activate, override, and contradict one another. The Trail context graph engine leads the strongest models.
Read the ComplexConstraints benchmarkPercentage of prompts fully solved on ComplexConstraints. Higher is better.
Individual rules satisfied across 1,559 evaluation items in the benchmark.
How it compares
Trail vs the alternatives
| Trail context graph | In-house build | Generic agent platform | |
|---|---|---|---|
| Constraint handling | Every rule is a node; every dependency is an explicit edge. | Hand-written if/else rules that grow brittle as policies stack up. | Everything in one flat prompt; constraints get silently dropped. |
| Conditional & overriding rules | Activate, override, narrow, and contradict edges modeled directly. | Each interaction coded by hand, easy to miss a branch. | Model double-counts or mis-applies rules that activate each other. |
| Verification | Answer re-checked against the graph; violations repaired before output. | Manual QA and spot checks after the fact. | Hope the model got it right; no structural check. |
| Traceability | Every rule cited to the document it came from, on every decision. | The rule lives in code, so the reason lives in a commit message. | No record of which instruction drove which decision. |
| Maintenance | Edit the graph; dependencies propagate automatically. | Rules rot as policy changes; every edit is an eng ticket. | Re-prompt and pray; regressions are invisible. |
| Accuracy on entangled constraints | 45.0% task pass, 90.0% rubric pass on ComplexConstraints. | Only as good as the branches you remembered to write. | 40.4% task pass rate (strongest public model). |
| Time to production | Deploy on day one; reliability scales with complexity. | Weeks of engineering per ruleset. | Fast to start, unreliable once rules interlock. |
Go deeper
The benchmark behind the numbers.
Explore the platform
Trail is one layer of the platform.
Build agents without writing workflow logic.
Turn business documents into usable data, delivered to your systems.
Extract structured data from any document.
Generate compliant documents from structured data.
Route exceptions to the right person, with full context.
Track throughput, cost, and exceptions across workflows.
Coordinate agents across multi-step processes.
See it run on your process.
From AI-native hypergrowth companies to Fortune 500 enterprises,
Nanonets automates business processes so teams can focus on what matters.