anthropics / anthropics/claude-cookbooks

Recipe: Adding trust provenance to Claude API responses

Open
#485 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
52.7k
Forks
6.3k
Avg merge
25m
Merged PRs (30d)
6

Description

## Idea

A cookbook recipe showing how to attach provenance metadata to Claude API responses before saving or forwarding them.

When an application calls the Claude API, the response is high-quality text — but carries no provenance metadata for downstream consumers. If the response gets saved to a file, emailed, or passed to another service, the recipient has no structured way to know it was AI-generated or what confidence level it has.

## What the recipe would cover

1. Call Claude API normally
2. Attach provenance metadata (model, timestamp, confidence, sources)
3. Save to a file with embedded provenance (Markdown frontmatter, PDF metadata, or DOCX properties)
4. Show how a downstream consumer reads the provenance

## Why this is useful

- EU AI Act Article 50 (August 2, 2026) requires transparency metadata on AI content
- Applications that forward Claude outputs to end users need provenance chains
- Fits alongside existing cookbook recipes about structured outputs, tool use, etc.

## Reference

- [AKF](https://akf.dev) provides a compact schema for this — could be one approach in the recipe
- The recipe could also show a plain JSON approach without external dependencies

Would this fit the cookbook? Happy to write it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.