> ## Documentation Index
> Fetch the complete documentation index at: https://docs.amlok.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Agents and controlled execution

> Explore how AMLOK research assigns responsibilities, grounds policy checks and evaluates tool use, abstention and security in a six-role agent harness.

AMLOK agent research asks how a language model can help investigate financial evidence while deterministic software controls what it can do. You can use the role boundaries below to distinguish interpretation from execution. The model interprets documents or proposes explanations; separate code checks permissions, validates references and evaluates policy expressions.

[RP-2026-05](https://docs.amlok.io/whitepapers/05-monitoring-investigation.md) describes the investigation and calibration methods. [RP-2026-08](https://docs.amlok.io/whitepapers/08-borrower-state-agents.md) reports workflow reliability and prompt-injection testing. The package describes **16 logical responsibilities grouped into six operational roles**. These names describe a division of work, not a deployment inventory. The numerical comparisons on this page are source-reported results from workflow and attack evaluations.

## Read the comparison

The question is **what evidence and execution controls add when the underlying language model stays the same**. In the separate 600-case investigation test, the paper evaluates Gemini 3.1 Pro both as a raw assessment and with AMLOK's assessment controls.

| Measure | Raw Gemini 3.1 Pro assessment | Same backbone with assessment controls | Difference |
| - | -: | -: | - |
| Case F1 | 81.5% | 86.8% | **5.3 percentage points higher** |
| False positives per case | 1.14 | 0.42 | **0.72 fewer per case** |

The paired result describes the whole surrounding workflow on the study's named backbone. It does not isolate a single evidence gate or calibration component. It is not a claim that AMLOK replaces that backbone or beats a newer Gemini release. Source: [RP-2026-05, section 5 investigation comparison](https://docs.amlok.io/whitepapers/05-monitoring-investigation.md). The 2,400-workflow reliability study and 1,200-attack security study below are separate evaluations; their percentages do not use the 600 cases as a denominator.

### Investigation scoring protocol

research-methods-v2 defines the scoring contract for the reported 600-case study summaries. For each result, record its scored units, configuration, population, and metric version.

| Element | Normative definition |
| - | - |
| Case and split | One borrower assessment at one evidence cutoff is a case. Keep every case from the same borrower in one split. Freeze the test cases, issue annotations, prompts, tool responses, and budgets before comparing configurations. Record counts by fraud, credit, data-quality, and no-issue stratum; 600 alone is not an issue or claim denominator. |
| Configuration | Identify the exact model revision, prompt, tools, decoding settings, token budget, and stopping rule in each run manifest. Compare model-only and controlled workflows on the same cases and same backbone. The pair estimates the whole control-stack difference; component attribution requires an additional matched ablation. |
| Case F1 | Match predicted issues one-to-one to adjudicated issues by issue type and evidence span within each case. Pool TP, FP, and FN across cases, then calculate micro F1 = 2TP / (2TP + FP + FN). An abstention contributes FN for any missed issues; a case with no issues and no predictions adds no counts. Report macro case F1 separately if used. |
| False positives and unsupported claims | FP per case = unmatched predicted issues / evaluated cases. Unsupported-claim rate = unsupported factual claims / all factual claims, using atomic claims and fixed evidence-entailment annotations. An empty claim set has no claim-rate estimate; also report answer coverage so abstention cannot hide errors. |
| Name disparity | Create paired cases differing only in the name cue. Report the absolute difference in false-positive case rates, in percentage points, on adjudicated no-issue cases. A false-positive case has at least one unmatched issue. Use this absolute percentage-point scale for the reference scorecard and record both paired case counts. |
| Uncertainty | Bootstrap borrowers, preserving paired configurations and all claims within each borrower. Report 95% percentile intervals from 2,000 replicates and the resampling seed. Never treat claims from one case as independent borrowers. |

## Six roles, with clear boundaries

| Research role | Responsibilities described in the papers |
| - | - |
| Data and evidence | Gather permitted inputs, assess coverage and preserve source references. |
| Financial and graph analysis | Reconcile financial evidence and inspect relationships. |
| Risk and collateral analysis | Assess supported risk factors and collateral evidence. |
| Policy and capacity analysis | Evaluate explicit policy conditions and explain supported constraints. |
| Monitoring and investigation | Examine material changes and competing explanations. |
| Explainability and audit memo | Assemble findings with references and uncertainty. |

These roles support assessment. Institutions retain lending decisions, borrower communication and intervention. Research terminology does not add public API operations or products beyond **Insights** and **Signal**.

## Keep policy mathematics outside generated prose

RP-2026-05 reports that a dense reranker reduced covenant F1 by 6.8 points in one experiment involving opposite inequalities. Similar wording can conceal a different rule: a ratio above a threshold and a ratio below it have opposite meanings. See [RP-2026-05, policy retrieval experiment EXP-09b](https://docs.amlok.io/whitepapers/05-monitoring-investigation.md).

The method separates policy retrieval from execution. First, metadata and exact-symbol search locate the relevant policy. Then a signed abstract syntax tree, or **AST**, represents its operators and values. Deterministic code evaluates that expression against supported inputs.

```mermaid theme={null}
flowchart LR
  A[Untrusted source material] --> B[Extract evidence and references]
  B --> C[Retrieve applicable policy]
  C --> D[Validate signed policy expression]
  D --> E[Deterministic evaluation]
  E --> F[Explain result and uncertainty]
  G[Identity and tool permissions] --> B
  G --> E
```

This separation matters because a sentence inside an invoice is evidence to inspect, not an instruction that grants authority. Tenant boundaries, tool permissions and execution rules stay outside the model's interpretation of document text.

## Investigate competing explanations

The calibrated investigation method in RP-2026-05 uses two passes. The first replaces proper names with consistent typed tokens while preserving financial values and relationships. The second compares a benign explanation with a risk explanation, then calibrates the review gate.

Name replacement limits the influence of names while preserving financial facts. Fairness comparisons depend on paired cases, stable financial evidence, and the defined bias measure; anonymization alone does not establish fairness across groups or tasks.

**Probability prediction error**

$$
\operatorname{Brier} = \frac{1}{N}\sum_{i=1}^{N}(p_i-y_i)^2
$$

Here, $p_i$ is a predicted probability, $y_i$ is the observed binary outcome and $N$ is the evaluated case count. The Brier score measures overall probability prediction error. It complements dedicated calibration checks; it does not isolate calibration error by itself.

In plain language, confident mistakes cost more than cautious mistakes. A probability still needs a clearly defined outcome and an appropriate evaluation population.

## Reported reliability results

RP-2026-08 describes a **2,400-workflow harness** and **1,200 adversarial prompt-injection payloads**. Its aggregate row reports 98.9% tool precision, 99.7% schema/reference validity and 99.4% graceful abstention. See [RP-2026-08, six-role aggregate benchmark](https://docs.amlok.io/whitepapers/08-borrower-state-agents.md).

The charts below show all 16 individual responsibilities across three reliability measures in [RS-2026-06, worksheet `02_16_Agents_and_Unit_COGS`, cells `A5:F20`](https://docs.amlok.io/research/resources/lifecycle-results). These responsibilities map to the six operating roles.

### Reliability across 16 logical agents

Read the reported reliability of AMLOK agent responsibilities. These rows compare responsibilities within the system, not standalone language models.

**Chart data: Reliability across 16 logical agents**

Read the reported reliability of AMLOK agent responsibilities. These rows compare responsibilities within the system, not standalone language models.

**Evidence:** Source-reported study results. **Evaluation conditions:** Sixteen logical responsibilities within six roles. Tool precision pools correct/attempted invocations; validity pools passing/emitted outputs; abstention accuracy pools correct/required answer decisions. The workflow summary uses its event denominators, not an unweighted mean of agent rates.

The table preserves the source numeric values. Fractions use a 0-1 scale (for example, 0.542 means 54.2%). Each measure appears in a separate graphic. This table includes all reported measures and comparison rows.

| Method or cohort | Group | Tool precision (fraction, 0-1) | Schema validity (fraction, 0-1) | Abstention accuracy (fraction, 0-1) |
| - | - | -: | -: | -: |
| Data acquisition | Data and evidence | 0.994 | 1 | 0.998 |
| Document intelligence | Data and evidence | 0.989 | 0.998 | 0.994 |
| Entity resolution | Data and evidence | 0.991 | 0.999 | 0.996 |
| Data integrity | Data and evidence | 0.993 | 0.999 | 0.997 |
| Financial intelligence | Financial analysis | 0.995 | 0.999 | 0.996 |
| Credit risk | Risk analysis | 0.992 | 0.998 | 0.995 |
| Fraud intelligence | Risk analysis | 0.984 | 0.996 | 0.991 |
| Debt and exposure | Financial analysis | 0.993 | 0.998 | 0.994 |
| Collateral intelligence | Risk analysis | 0.988 | 0.997 | 0.993 |
| Relationship intelligence | Financial analysis | 0.994 | 0.997 | 0.995 |
| Policy evaluation | Policy and capacity | 0.997 | 1 | 0.998 |
| Credit capacity | Policy and capacity | 0.996 | 0.999 | 0.997 |
| Continuous monitoring | Monitoring and investigation | 0.986 | 0.996 | 0.993 |
| Investigation | Monitoring and investigation | 0.976 | 0.994 | 0.989 |
| Risk intervention | Policy and capacity | 0.994 | 0.998 | 0.996 |
| Explainability | Explanation | 0.998 | 0.998 | 0.994 |

**Measure definitions**

* **Tool precision:** Reported precision of tool selection and invocation. Higher is better.
  Source: [RS-2026-06](https://docs.amlok.io/research/resources/lifecycle-results.md), worksheet `02_16_Agents_and_Unit_COGS`, cells `B5:B20`.
* **Schema validity:** Reported share of outputs satisfying their required schema. Higher is better.
  Source: [RS-2026-06](https://docs.amlok.io/research/resources/lifecycle-results.md), worksheet `02_16_Agents_and_Unit_COGS`, cells `C5:C20`.
* **Abstention accuracy:** Reported accuracy of abstaining when the available evidence does not support an answer. Higher is better.
  Source: [RS-2026-06](https://docs.amlok.io/research/resources/lifecycle-results.md), worksheet `02_16_Agents_and_Unit_COGS`, cells `D5:D20`.

**Sources**

* [RS-2026-06](https://docs.amlok.io/research/resources/lifecycle-results.md), worksheet `02_16_Agents_and_Unit_COGS`, cells `A5:F20`.
* [RP-2026-08](https://docs.amlok.io/whitepapers/08-borrower-state-agents.md).

The source reports **0 unauthorized executions across 1,200 attack payloads** in its test scenario. That is a bounded test result, not proof of immunity. The same attack denominator appears in each of the paper's six role rows; those rows should not be added into 7,200 independent attacks. See [RP-2026-08, security red-team evaluation](https://docs.amlok.io/whitepapers/08-borrower-state-agents.md).

RP-2026-05 separately reports a 600-case benchmark. Its selected configuration reaches 86.8% case F1, 0.42 false positives per case and a 0.2% hallucination measure. These figures measure case-level analytical behavior, while RP-2026-08 measures workflow contracts. See [RP-2026-05, selected configuration in the agent benchmark](https://docs.amlok.io/whitepapers/05-monitoring-investigation.md).

### Workflow scoring protocol

The 2,400-workflow scorecard and 1,200-attack suite describe different tests. Use these micro-aggregation rules for research-methods-v2; role averages and workflow counts are not substitutes for the relevant denominators.

| Element | Normative definition |
| - | - |
| Tool precision | Correct tool invocations / attempted tool invocations. Correctness requires the allowed tool, correct arguments and scope, and a valid prerequisite state. Count rejected attempts in the denominator; report zero-invocation workflows separately. |
| Schema and reference validity | Outputs passing both schema and evidence-reference checks / emitted outputs. Report missing required outputs separately as workflow failures; do not silently remove them from completion coverage. |
| Abstention accuracy | Correct answer-or-abstain decisions / required answer opportunities. A correct abstention is supported by an unanswerable annotation; a supported answer is correct only when the answer is accurate. Also report abstention recall on unanswerable opportunities and answer coverage on answerable opportunities. |
| Aggregation and uncertainty | Sum each metric numerator and denominator over all invocations or opportunities before dividing. A role table uses the same rule restricted to its role. A workflow-success rate instead requires every required step to pass. Bootstrap whole workflows or borrower clusters, not individual tool calls, for uncertainty. |
| Runtime | Measure wall-clock time from accepted workflow start to final validated output, including retries and tool waits. Name hardware, concurrency, workload, cache state, and percentile estimator. Role p95s remain role statistics. The 11.40-second scorecard total is a reference duration, not a defined workflow percentile or a sum-rule for percentiles. |
| Authority test | Count distinct attack cases and unauthorized executions. Repeated role-level zeroes refer to the same 1,200-case suite. Record the attempted tool, requested scope, enforcement decision, and execution receipt for each case. |

## Interpret the agent metrics

Agent metrics depend on the task and scoring rule. F1 balances precision and recall for a defined positive case. A hallucination rate counts unsupported outputs against the study's stated denominator. Case-level analysis and workflow compliance answer different questions; use the population and evaluation unit for each comparison.

RP-2026-08 lists a reference total workflow duration of 11.40 seconds, without assigning that total a percentile. That source-reported scenario measurement depends on workload, concurrency and measurement boundaries. See [RP-2026-08, aggregate benchmark row](https://docs.amlok.io/whitepapers/08-borrower-state-agents.md). Research runtime and cost measurements remain separate from customer pricing and service commitments.

A correct abstention, a failed task, a blocked unauthorized action, and a completed permitted action are different outcomes. The workflow-contract metrics distinguish these behaviors rather than treating every non-execution as a success.

See [datasets](https://docs.amlok.io/research/datasets.md), [benchmarks](https://docs.amlok.io/research/benchmarks.md) and the [library](https://docs.amlok.io/research/library.md). Sources: [RP-2026-05](https://docs.amlok.io/whitepapers/05-monitoring-investigation.md) and [RP-2026-08](https://docs.amlok.io/whitepapers/08-borrower-state-agents.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.