Arihant Global Ventures Inc. Machine-readable Markdown for this page: send Accept text/markdown, or open /guides/ai-logging-retention-and-evidence/index.md. Site overview for language models: /llms.txt. Full guide text: /llms-full.txt.

Canadian enterprise & public-sector advisoryPrincipal-led deliveryToronto, ON, Canada

Arihant Global Ventures Inc.
Discuss an Assessment
← All guides

Guide · November 21, 2026 · 11 min read

AI Logging, Retention, and Evidence

What to record when a model answers or calls a tool, how long to keep it, and how that record supports a review without storing secrets.

AI GovernanceEnterprise AICompliance

A finished answer is a poor record of how it was produced. A later review may need the model, the documents retrieved, whether a tool was allowed to run, and whether a person accepted the result. The on-screen text does not carry that history. Copying the prompt, the case file, and every pasted secret does, and it creates a second system of record with its own, often weaker, access rules.

This guide is a middle path for teams that design, buy, or operate enterprise AI. Record enough structure to reconstruct a decision and to evaluate the system. Leave secrets and full case files where they are already governed. Match retention to the importance of the decision, and set the period with privacy and records staff.

This is educational material, not legal advice. Retention, privacy duties, and records schedules depend on the organization and the statute that applies. Counsel, the privacy office, and the records office decide those points. Engineering records the decision faithfully and makes access, deletion, and review work.

What a useful log contains

Write the log as fields that answer a few questions about one interaction, not as a transcript kept in case someone asks.

Request identifier. Model calls, retrieval, and tool calls for one user action share a request id, created before the first model call and passed downstream. Keep a conversation id, case or file id, tenant, and environment beside it. Store a provider’s id next to yours so the systems can be joined.

Model name and version. Record the identifier the provider actually ran, the instruction or prompt-template version, and parameters worth explaining later: temperature, maximum output length, tool-choice mode, and whether a safety filter was on. If no version is exposed, record the observation date and a hash of the configuration, and label that as weaker evidence.

Retrieved source identifiers. Store the ids of chunks or documents passed to the model, the corpus or index version, and enough rank detail to see what was offered and dropped. A document id, title, locator, and content hash are enough to open the source in the system of record. Leave the retrieved text out of the log.

Tool name and the allow or deny decision. Log the tool name, an action class such as read, write, send, or delete, and whether policy allowed the call. On a denial, store the rule id and a reason code. On an allow, store success or failure and a pointer to the side effect — a ticket or record id — rather than the payload. A log of only successful calls hides controls that worked.

Human decision. Record approval, edit, rejection, or override, with role, actor id, and time. If nobody reviewed the output, record that, so silence is not later read as approval. Point at the note, order, or disposition in the system that already owns the outcome.

Timing and outcome. Add timestamps and a coarse outcome: completed, failed, or abandoned.

Privacy and records staff can keep these fields with the business record and delete a debug sample on a short clock.

What the log must not contain

The default record points at the governed source.

Raw secrets. Passwords, API keys, session tokens, private keys, one-time codes, and connection strings stay out of logged prompts, tool arguments, headers, and errors. Redact before the event leaves the process, replace the value with a typed marker such as [REDACTED_SECRET], and test with fixtures that contain realistic key shapes.

Full case files, by default. Medical, legal, employment, benefits, and investigative files already have access rules. Copying the file, or the prompt that contains it, into an observability product makes a second copy for engineers and, often, vendor support. The default log carries the case or file id, the source ids, and a hash of what the model saw. Staff open the file in the case system when a named review needs it.

Full text is a named exception: a short debugging window with an owner, a reason, and a deletion date, destroyed when the window ends. Tool results are the usual leak. Logging the JSON from a “get record” tool copies the file even when prompts are redacted, so enforce the limit where the result is handled and fail a test if a forbidden field appears. If retrieval returns a forbidden source, log the id and the denial, then fix retrieval.

Keep the log out of model training, at a provider or inside the organization. The contract should say prompts and outputs are not used to train models for other customers; without that commitment, do not send the content. Treat the schema as a contract that names which fields may hold personal information and which redaction rule applies, and review it when a tool is added.

Retention that matches the decision

A wording suggestion and a benefits determination are not the same kind of evidence. Write a retention class on the event when it is created.

Low stakes. Drafting help, suggestions, and formatting, where the person remains the author of any decision. Keep operational metadata for days or a few weeks, long enough to debug an incident. Do not keep prompts.

Ordinary business use. Answers that inform internal work and do not themselves decide rights, money, or access to a service. Keep the evidence fields — request id, model version, source ids, tool decisions, human decision — for the period the records schedule already uses for that activity. Keep any raw text much shorter, if you keep it at all.

Consequential decisions. Outputs used to grant, deny, or shape an individual outcome: eligibility, credit, employment screening, clinical support, enforcement, or a formal recommendation. Keep the evidence fields for as long as that decision must remain explainable. The period comes from the records schedule and legal-hold practice, not from a storage target, and it is often measured in years. Store this slice as a record with integrity controls, not as a debug trace in a vendor default bucket.

Protect that slice from silent edits with append-only storage, or an equivalent, and a record of exports and deletions. Deletion must reach the hot store, the search index, and backups. A visible legal hold has to exist before the first consequential workflow, so a purge does not destroy material a matter still needs.

Sample bulky text and keep the decision path complete. A vendor default of thirty days, or of never deleting, is a product setting. Map each use case to a class you already use for email, case notes, or transaction logs.

Who may read the log

A review log is personal information and operational detail. Separate the readers. Debugging needs recent, redacted events. A challenged decision needs that request’s evidence fields, usually through the case workflow rather than a raw query tool. Privacy and security staff need access for incidents and access requests. Vendor support does not get standing access to production log content. A support look is time-bound, approved, and itself logged.

Opening a consequential log is an event: who, when, and why. The case-file standard applies to its trail.

Collectors, buffers, support portals, and backups are in scope, not only the model endpoint. Where the organization expects Canadian residency, a model call in Canada and a trace stored elsewhere should be visible on one diagram. The contract covers purpose, subprocessors, retention, and deletion at the end. Running the service is a purpose. Training a general model for other customers is not. A further use — another product, an unrelated experiment, a profile of people in the prompts — needs its own authority. Aggregates without identifiers are the usual material for broad reporting. Take any other export to the privacy office first.

Using logs for evaluation

Evaluation asks whether the system is good enough. Evidence asks what happened once. They can share a pipeline if evaluation does not become a second archive of personal information.

Join on the request id: use case, model and template versions, source ids, allow or deny, the human decision, and a quality label such as a reviewer score, a thumbs-down reason, or a check that citations stay inside the retrieved sources. An authorized job can read text through the case system, write a score, and drop the text.

Build the set from synthetic cases, consented examples, or de-identified excerpts the privacy office has approved. Production events are only candidates. Promoting one means removing direct identifiers, recording the authority to keep it, and assigning a new id. Aggregate by model, template, and corpus version. Read a few events when citations drop or denials spike; do not widen retention to do it. After an incident, hold the affected ids, export the minimum fields, and return to the normal schedule when the hold lifts.

Overrides show where a reviewer and the model disagreed. Count and sample them. If the note is sensitive, keep it in the business system and store only the fact of the override in the AI log. Fine-tuning on production prompts is a new purpose. If training is approved, draw it from the curated set, not from a debug stream that may still hold secrets.

A retention conversation with privacy and records

Bring the use-case list, one sample event with live values removed, and every store that receives it, including vendors. Leave with three written decisions from privacy and records.

Purpose. Say whether the log operates the service, reconstructs a decision, meets a records schedule, or supports evaluation. Anything else is outside that collection. Ask whether full prompt text is required. For most reviews it is not: source ids, model version, tool decisions, and the human decision carry it.

Class and period. Name the records series and the keep-and-destroy rule. If none fits, records creates one. Do not set “keep forever” in a config file because disk is cheap. Give any debug sample its own short window, an owner for the deletion job, and a date to confirm the job ran.

Access, residency, and individual rights. Name who may read which fields, and whether storage and support stay in Canada when that is the rule. An access, correction, or deletion request has to reach the log as well as the case system. Where the workflow affects a person, the human-decision field is what you keep so the human role can be shown.

Invite security when the evidence is consequential, and file purpose, class, period, readers, residency, and the deletion job beside the schema. Reopen it when a tool is added, when drafting becomes a formal recommendation, on a set cadence, and after a hold.

Canadian privacy context, at a high level

Personal information in Canada is not under one statute. The federal Personal Information Protection and Electronic Documents Act covers many private-sector activities. Alberta, British Columbia, and Quebec have their own private-sector laws. Public bodies are covered by statutes such as Ontario’s Freedom of Information and Protection of Privacy Act and provincial equivalents; federal institutions have their own regime. Health information often falls under a separate act, such as Ontario’s Personal Health Information Protection Act. The notes below are themes for a conversation with counsel, not an interpretation.

Someone accountable should be able to say what the log holds and why. Limiting collection means source ids and reason codes, not files and secrets. Limiting use and retention means the event lasts for the stated purpose, the records schedule, or a hold, and is not reused for training. Safeguards include access control, redaction, and a plain account of where processing runs, including whether it stays in Canada. An access request should cover the log, and a record used to explain a decision has to be accurate and correctable.

A public-sector log can be a record, and personal information in it may have to be removed before a freedom-of-information release. Some federal automated decision systems also fall under the Treasury Board Directive on Automated Decision-Making, which expects documentation, quality checks, and recourse. Quebec’s private-sector law adds transparency duties and, in defined cases, notice when a decision rests only on automated processing. Whether any of these apply is a legal question for the organization.

What engineering can commit to is smaller: the consequential record shows the model, the sources, the allow or deny result, and the human role; it omits raw secrets and full case files except under a named exception; and it is destroyed on the schedule privacy and records set. Nothing here certifies Arihant Global Ventures Inc. or describes a client’s system.

A log that can be shown

Given a request id, you should be able to name the model and instruction version, the source ids and corpus version, the tools allowed or denied, and the human decision. You should also be able to show that secrets and the case file were not copied into the log, how long the event is kept, who may open it, and how a privacy request reaches it.

Take one consequential use case to privacy and records, with a sample that already excludes secrets and case-file text, before production traffic. Arihant Global Ventures Inc. publishes this as educational material. To discuss a particular schedule, use the contact page.

Start with a conversation.

A free 30-minute introduction to discuss your AI governance challenge, constraints, and whether we can help. No project brief required.

Contact us for current availability. Scope, timing, and fees are agreed before paid work begins.