> For the complete documentation index, see [llms.txt](https://rawctx.gitbook.io/rawctx-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rawctx.gitbook.io/rawctx-docs/documentation/answer-evidence.md).

# Answer evidence

Answer Audit keeps the submitted answer, model-run information, evidence references, and later changes in one reviewable history.

## Start with the minimum record

Record only what your review process needs:

* `application_key`, `environment`, and a stable `idempotency_key`
* question and answer inputs that match the workspace commitment policy
* `source_refs` for policy documents, files, media, or external trace references
* `external_trace_id` and `external_message_id` when they support investigation

If the platform manages keyed hashing, submit text without a caller hash. The service can then derive the tenant HMAC. When workspace text storage is disabled, the service may discard that text immediately. The current SDK text convenience path also supplies a caller SHA-256. For a workspace that requires keyed HMAC, use the text-only HTTP form in Get started. Submit caller-generated hashes without text only when workspace policy explicitly accepts that mode.

## Preserve changes as events

Do not rewrite the original record when an answer changes. Append an event:

* `correction_appended` links a corrected answer and its reason.
* `voided` marks the original record as no longer usable.
* `redacted` narrows what may be disclosed or retrieved.
* `retention_extended` records an approved retention action without changing the lifecycle status. It does not itself update `retention_until`.

Only tenant managers can append lifecycle events. Application JWTs cannot append them, even when they can create or read answer records.

```python
import rawctx

with rawctx.RawctxClient() as client:
    client.append_answer_log_event(
        "ANSWER_LOG_ID",
        event_type="correction_appended",
        reason="Policy review found that the Enterprise tier applies.",
        payload={"corrected_answer_hash": "sha256:..."},
    )
```

## Privacy defaults

* Treat text submission and text storage as separate policy decisions.
* Enable raw-text storage only with retention and review access configured.
* When platform-managed keyed hashing is required, send text only over the authenticated API so the service can derive tenant HMAC commitments.
* Use caller-generated hashes without text only when workspace policy accepts them.
* Do not use plain SHA-256 as anonymization for secrets or predictable personal data.
* Keep original files and media in separately controlled evidence assets. Put only the required reference and commitment in the answer record.

## API boundary

SDK and service integrations call the authenticated workspace API directly:

```
POST https://<workspace-api-host>/api/answer-audit-logs
GET  https://<workspace-api-host>/api/answer-audit-logs/{id}
POST https://<workspace-api-host>/api/answer-audit-logs/{id}/events
GET  https://<workspace-api-host>/api/answer-audit-logs/export?format=jsonl
```

Use the workspace API host saved by `rawctx login`. Browser session routing is reserved for the Hub UI and is not an SDK registry.

## What can be verified

rawctx can check the internal consistency of submitted records, event hash chains, commitments, Merkle inclusion, signatures, and receipts. It cannot by itself prove factual accuracy, delivery, actual source use, or the truth of an upstream trace.

## Related guides

* Independent reconciliation
* Log lifecycle, search, and export
* Media and file evidence
* Advanced inference trust
* OpenTelemetry trace references
* Trust and verification
* [Official Answer Audit web guide](https://hub.rawctx.dev/docs/answer-audit)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://rawctx.gitbook.io/rawctx-docs/documentation/answer-evidence.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
