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

# Provenance and audit trails

> How Wu-Weism traces every inference back to its model, intervention, and evidence sources.

Provenance in Wu-Weism means that every claim can be traced back to exactly three things: the **evidence** that informed it, the **model** that structured the reasoning, and the **computational steps** that produced the conclusion. Nothing is asserted without a traceable origin.

This page explains how that trace is structured, where you can find it, and how to use it to audit your own reasoning over time.

***

## The counterfactual trace

Every do-calculus intervention — every time Wu-Weism answers a "what if" or "what would have happened" question — produces a **counterfactual trace record**. This record is the authoritative account of how a conclusion was reached.

```json theme={null}
{
  "traceId": "trc_9xm2pq7kl4rz8w1n3v5b",
  "modelRef": {
    "modelKey": "economics_marketing",
    "version": "2"
  },
  "intervention": {
    "variable": "advertising_spend",
    "value": 1.2
  },
  "outcome": "revenue",
  "method": "deterministic_graph_diff",
  "assumptions": [
    "No unmeasured confounders between advertising spend and brand awareness.",
    "Production costs are held constant across the intervention horizon.",
    "Elasticity estimates from Smith (2021) apply to this market segment."
  ],
  "adjustmentSet": ["brand_awareness", "seasonality_index", "competitor_spend"],
  "timestamp": "2026-03-14T11:41:58Z"
}
```

### Trace fields

| Field           | Description                                                                                                                                                     |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `traceId`       | Unique identifier for this inference. Every claim in the [Claim Ledger](/governance/claims) links back here via its `trace_id` field.                           |
| `modelRef`      | The Structural Causal Model used — identified by `modelKey` (the domain model) and `version`. A new version is recorded whenever the model is updated.          |
| `intervention`  | The variable that was set and the value it was set to for this do-calculus operation.                                                                           |
| `outcome`       | The outcome variable whose expected value was evaluated under the intervention.                                                                                 |
| `method`        | Always `deterministic_graph_diff` for do-calculus interventions. This records the computational approach so results can be independently reproduced.            |
| `assumptions`   | The causal assumptions made during the inference — things Wu-Weism treated as given. Review these critically; they are the basis on which the conclusion rests. |
| `adjustmentSet` | The variables used to control for confounding. These are selected automatically by the back-door or front-door criterion applied to your SCM.                   |
| `timestamp`     | When the inference was computed.                                                                                                                                |

<Info>
  The `adjustmentSet` tells you which confounders Wu-Weism controlled for. If you believe an important variable is missing, that is the place to investigate — it may indicate a gap in your SCM specification.
</Info>

***

## Evidence links

Claims are not only grounded in model structure — they are also linked to the specific evidence sources that informed them. Evidence links can include:

* **PDFs** you uploaded to the workbench, referenced by filename and internal page/paragraph extraction.
* **Web sources** retrieved during analysis, stored by URL and retrieval timestamp.
* **Scientific extractions** — structured data points (effect sizes, confidence intervals, sample characteristics) extracted from your document corpus by the PDF synthesis engine.

Each evidence link is attached to the claim record in the Claim Ledger under `evidence_links`. To review the source material for a given claim, click the evidence reference in the claim detail view.

<Warning>
  Evidence links are references, not copies. If a web source goes offline or a PDF is removed from your library, the reference remains in the claim record but the underlying content may no longer be accessible. Download or archive sources you intend to rely on long-term.
</Warning>

***

## Session provenance

Each workbench session maintains its own provenance history. A session record captures:

* The **full message history** — every question you asked and every response produced, in order.
* **Domain classifications** — how Wu-Weism categorized your research domain at each step (e.g., `economics_marketing`, `epidemiology_observational`).
* **SCM loads** — which Structural Causal Model was loaded at each point in the session, including version numbers.

This means you can return to any past session and understand not just the conclusions, but the state of the model and domain context at the moment those conclusions were drawn.

***

## The alignment audit report

Wu-Weism tracks how your reasoning practice has aligned with scientific best practices over time. The alignment audit report is available at:

```bash theme={null}
GET /api/scm/alignment-audit
```

The report covers metrics such as:

* What proportion of your claims passed the falsifiability gate.
* How often your interventions were identifiable before do-calculus was run.
* Whether your SCM models have been updated in response to new evidence, or left stale.
* Patterns in uncertainty labels across your sessions — for example, whether a particular domain consistently produces high-uncertainty claims, which may warrant further literature review.

Use the alignment audit to identify systematic gaps in your research practice rather than reviewing claims one at a time.

***

## Scientific integrity dashboard

The scientific integrity dashboard shows the current integrity status of your SCM models:

```bash theme={null}
GET /api/scm/integrity/dashboard
```

For each model in your library, the dashboard reports:

* Whether the model has been validated against known benchmark results.
* The date of the last update and whether any new literature has been ingested since.
* Any open integrity flags — for example, an assumption in the model that conflicts with evidence in your uploaded corpus.

<Steps>
  <Step title="Open the integrity dashboard">
    Navigate to **Settings → SCM Integrity** in the workbench, or call `GET /api/scm/integrity/dashboard` to retrieve the raw report.
  </Step>

  <Step title="Review flagged models">
    Models with open integrity flags are listed at the top. Each flag includes the specific assumption or structural element under question and the conflicting evidence source.
  </Step>

  <Step title="Resolve or acknowledge flags">
    You can upload new evidence to resolve a flag, update the model assumption, or acknowledge the flag with a rationale. Acknowledged flags remain visible in the audit trail.
  </Step>

  <Step title="Re-run affected analyses">
    If you update a model, consider re-running key analyses. Wu-Weism will produce new claim records linked to the updated model version — the older records remain in the ledger, now referencing the prior model version.
  </Step>
</Steps>

***

## Reading a full provenance trail

To reconstruct the complete reasoning path for any claim:

<Steps>
  <Step title="Start from the claim">
    Open the claim in **/claims**. Note the `trace_id` and `session_id`.
  </Step>

  <Step title="Follow the trace">
    Open the counterfactual trace using the `trace_id`. Review the `modelRef`, `intervention`, `assumptions`, and `adjustmentSet`.
  </Step>

  <Step title="Review the evidence links">
    Examine the `evidence_links` on the claim to see which PDFs, web sources, or extracted data points supported the conclusion.
  </Step>

  <Step title="Check the gate decisions">
    Review the `gate_decisions` on the claim to confirm that falsifiability and identifiability checks passed before the claim was recorded.
  </Step>

  <Step title="Inspect the session context">
    Use the `session_id` to open the full session history — the domain classifications and SCM loads at the time the claim was produced.
  </Step>
</Steps>

<AccordionGroup>
  <Accordion title="Can I export the full provenance trail for a claim?">
    Yes. Retrieve the claim via `GET /api/claims/{id}`, then follow the `trace_id` to `GET /api/scm/counterfactual-traces/{traceId}`. The session message history is available via `GET /api/causal-chat/sessions/{sessionId}`. You can assemble the complete trail from these three endpoints.
  </Accordion>

  <Accordion title="What if two claims have the same trace ID?">
    This indicates that two claims were produced by the same do-calculus intervention step — for example, a primary outcome claim and a secondary derived claim from the same intervention. Both are valid and both reference the same underlying computation.
  </Accordion>

  <Accordion title="Are trace records immutable?">
    Yes. Trace records are written once and never modified. If a model is updated and the same intervention is re-run, a new trace record is created with the updated `modelRef`. The original trace record is preserved.
  </Accordion>

  <Accordion title="How long are trace records retained?">
    Trace records and session histories are retained for the lifetime of your account. Contact support if you need to export your full data archive.
  </Accordion>
</AccordionGroup>

***

## Related

<CardGroup cols={2}>
  <Card title="Claim governance" icon="list-check" href="/governance/claims">
    The structure and fields of every claim in the Claim Ledger.
  </Card>

  <Card title="The Falsifiability Gate" icon="shield-check" href="/governance/falsifiability">
    How Wu-Weism evaluates claims before recording them.
  </Card>
</CardGroup>
