Skip to content
Artificial Intelligence

Audit trails for AI decisions: what to record so you can answer “why did it do that?”

An AI audit trail shows why your AI did something. What to record for each AI decision, how long India and the EU expect logs kept, and how to seal them.

A black archival tray holds a row of frosted cyan index cards threaded on one glowing cyan rod. One card is raised above the others and marked with a small orange clip. The Bluelupin logo sits in the lower left.

Checked 26 November 2026.

Say a customer writes: “Your assistant told me my claim was rejected. Why?” Your team opens the chat transcript, the provider dashboard and a log file. Nothing ties them together, and nobody can say which model version answered or whether a person approved it.

An AI audit trail is the record that lets you answer “why did it do that?” months later. For every AI decision, write down who or what triggered it, what the model was shown, which model and prompt version ran, which tools and human approvals fired, and what went out. Keep it long enough for your rules, and make silent edits detectable.

This post covers your own record of each decision. Approval design is in approval gates for AI agents, and evidence is in DPDP proof packs.

What an AI audit trail is

An ordinary app log answers “what broke this afternoon”. An audit trail answers “what happened on 3 March and who allowed it”. It is written at the moment of decision, ties a person or system to a model version and an outcome, and is kept as evidence.

Many teams have no such record. RBI’s committee report on responsible and ethical AI (13 August 2025) found that of 127 regulated entities that reported using AI, only 18% maintained audit logs.

8 things to record for every AI decision, so you can answer "why did it do that?" months later. A studio still life on one warm paper desk, read top to bottom along a single cyan thread. At the top, a customer's cream speech-bubble card asks "Why did the AI do that?", with an opened envelope beside it. The thread runs from the bubble and zigzags under eight desk objects, one for each thing the record captures: 1 a desk clock for the run ID and timestamp; 2 an ID badge for who or what triggered it; 3 kraft tags for the agent, model and prompt versions; 4 clipped reference slips for inputs and retrieved docs, by reference; 5 a wrench beside a red tag for tool calls, including refused ones; 6 a rubber stamp with a green tick for human approvals, rejections and edits; 7 a sealed envelope for the output, destination and result; 8 chain links for the previous record's hash. Next, index cards joined by steel rings lead into a steel card drawer: each record is chained to the one before and filed in a separate, append-only archive. An edit breaks the chain, so the trail is tamper-evident. Below, "How long to keep them" shows archive boxes to scale, one box for about 6 months. No Indian law sets AI-specific log rules yet. CERT-In: 180 days, rolling, for ICT system logs (one box). EU AI Act: at least 6 months, for Annex III high-risk AI, from 2 December 2027 (one box). DPDP: 1 year, for personal data logs, from 13 May 2027 (two boxes). RBI: at least 5 years, for non-bank payment system operators (ten boxes). At the end, months later, the record card is clipped to the customer's question with a green tick: the record shows what ran, who approved it and what went out. Sources: CERT-In Directions, DPDP Rules 2025, RBI, EU AI Act. Checked 26 November 2026. Not legal advice. Book a 20-minute consult at bluelupin.com/contact.
One AI decision, recorded: who triggered it, what the model saw, which tools and approvals ran, and what went out. Checked 26 November 2026.

What to record for every AI decision

Our checklist:

What to record Why you need it What to redact or reference
Run ID and UTC time Joins every step on a timeline Nothing
Who or what triggered it, and for whom Shows who started it Internal user ID
Agent name and version Shows which release decided Nothing
Model name returned by the provider, prompt and policy version Explains a decision after models change Never store API keys
Inputs and retrieved sources Shows what the model saw Document IDs, versions and hashes
Tool calls and results, including refused calls Shows what the AI did and was stopped from doing Mask account numbers
Approvals, rejections and human edits Shows who allowed the action Reviewer ID
Output, destination and result Shows what reached the customer Reference to stored output
Previous record’s hash Makes later edits detectable Nothing

Providers update models and your team edits prompts, so exact versions let you reproduce a decision. Record denials too: an auditor often asks what the AI tried and was stopped from doing. Our post on agent tool access covers deny logs.

What one record looks like

A fictional record:

{
  "run_id": "run-8f2c",
  "time_utc": "2026-03-03T09:41:07Z",
  "triggered_by": "user-1042",
  "agent_version": "claims-helper-1.4",
  "model_returned": "provider-model-2026-10",
  "prompt_version": "claims-prompt-12",
  "tool_call": {"name": "get_claim", "args_hash": "a91f"},
  "approval": {"reviewer": "staff-17", "decision": "approved"},
  "output_ref": "out-5530",
  "prev_hash": "c47d"
}

It holds references, so personal data stays out.

How long to keep AI logs in India

No Indian law sets AI-specific log rules yet. CERT-In’s November 2026 AI audit guidelines expect 180-day logs across AI components, but they are guidance and carry no legal mandate of their own. Several general rules may set floors.

Rule Who it covers How long From when
CERT-In Directions, 28 April 2022 Service providers, intermediaries, data centers, bodies corporate, government Rolling 180 days In force
DPDP Rules 2025, Rule 6(1)(e) Data Fiduciaries One year, unless another law needs more 13 May 2027
DPDP Rules 2025, Rule 8(3) Data Fiduciaries (covering their processors) Minimum one year, then erase unless another law needs more 13 May 2027
RBI Master Directions, 5 November 2026, para 27(e) Non-bank payment system operators At least five years Now; small operators 1 April 2028
RBI IT Governance Master Direction 2023, para 15 Banks, NBFCs, other regulated entities No fixed period 1 April 2024
EU AI Act, Articles 19 and 26(6) Providers and deployers of high-risk systems At least six months 2 December 2027 (Annex III)

CERT-In’s 28 April 2022 Directions ask for ICT system logs for a rolling 180 days within the Indian jurisdiction, and CERT-In’s FAQ (Q35) allows storage outside India if logs can be produced in reasonable time. CERT-In’s 2022 Directions already treat attacks on AI and ML systems as reportable, and its AI Security Auditing Guidelines (4 November 2026) expect logs from AI components to be kept for 180 days. The DPDP Rules 2025 add two one-year rules from 13 May 2027.

RBI’s 2023 IT Governance Master Direction requires audit trails with no fixed period. The five-year rule applies only to non-bank payment system operators.

In the EU, Article 12 of the AI Act binds high-risk systems only, such as hiring or credit. Deployers keep logs for at least six months under Article 26(6), and providers under Article 19. Regulation (EU) 2026/1744 moved the start to 2 December 2027 for Annex III systems and 2 August 2028 for AI inside regulated products.

Our practice: set retention per log type to the longest rule that applies to you, and have the log store enforce it.

We are engineers, so treat this as technical guidance and check legal questions with your counsel.

Keep personal data out of the trail

The trail must explain decisions, and DPDP expects you to minimize personal data. Redact or tokenize before writing, store document IDs and hashes, and keep full prompts only where needed, in a separate tighter store.

Our PII tokenization post shows how tokens work, and the Gemini API retention post covers the provider’s copy.

Make silent edits detectable

  • Sync the clock. Use NIC or NPL time, or a source traceable to them, and store UTC.
  • Append only. The app writes with a credential that cannot update or delete.
  • Separate place. Keep the audit store in another account from the app.
  • Hash chaining. Each record carries a fingerprint of the one before it, so an edit breaks the chain.
  • Retention lock. Cloud object lock refuses deletes until the period ends.

This makes tampering visible. Someone holding the signing key or full storage access can still rewrite history, so protect both.

Where to start this month

Pick one AI feature that can change money, a customer record or a public answer. Use the table above as its schema and write to one append-only store. Then run a drill: pick a random decision and answer “why did it do that?” from the trail alone in 15 minutes. The gap is your next task.

Add one inventory line per AI feature: owner, model, prompt version, retention. NIST AI RMF 1.0 (voluntary) asks for an inventory in GOVERN 1.6. A logging standard, ISO/IEC 24970, is still under publication. A SIEM can come later.

Common questions

What is an AI audit trail? A record written at the moment of each AI decision. It shows who or what triggered it, what the model was shown, which model and prompt version ran, which tools and approvals were involved, and what went out.

What should an AI audit trail include? A run ID and time, the trigger, the model and prompt version, the inputs, every tool call including refused ones, every human approval or edit, and the final output. Store references and hashes instead of personal data.

How long should we keep AI logs in India? No Indian law sets AI-specific log rules yet. CERT-In’s November 2026 AI audit guidelines expect 180-day logs across AI components, but they are guidance and carry no legal mandate of their own. CERT-In asks for ICT system logs for a rolling 180 days. From 13 May 2027, the DPDP Rules ask for one year of security and processing logs. RBI asks payment system operators for five years of audit logs.

Does the EU AI Act require logs for every AI system? No. Article 12 applies to high-risk AI systems, such as those used in hiring or credit. Providers and deployers keep logs for at least six months, from 2 December 2027 for Annex III uses.

Should we store full prompts and responses? Only where you need them to explain a decision. Redact or tokenize personal data first, keep IDs and hashes instead of copies, and put full text in a separate store.

How do we stop people from quietly editing AI logs? Sync clocks, write to an append-only store in a separate account, chain records with hashes, and use a retention lock. Edits become detectable, though whoever holds the signing key can still rewrite records.

Do NIST AI RMF or ISO/IEC 42001 prescribe a log format? No. NIST AI RMF is voluntary guidance, and ISO/IEC 42001 sets requirements for an AI management system. Neither gives a field-by-field schema.

Bluelupin builds governance controls into every AI project: audit logs, role-based approvals and guardrails on what each agent can do. See our AI solutions.

Book a 20-minute consult

Building something in this space?

Thirty minutes with an engineer, not a salesperson.

Start Your AI Journey