Manuel B. Garcia

Manuel B. Garcia serves as the Senior Director for Educational Technology and Digital Learning at FEU Institute of Technology, Manila, Philippines. Read More

Contact Info

1607, FEU Tech Building,
P. Paredes St, Sampaloc,
Manila, Philippines
mbgarcia@feutech.edu.ph

Follow Me

How Do Researchers Create an Audit Trail for AI-Assisted Data Cleaning?

An audit trail makes AI-assisted data cleaning traceable by recording what changed, why it changed, who approved it, and how the result was verified. Learn how to document transformations, preserve dataset versions, and reconstruct the cleaning process without relying on chatbot conversations alone.

382
AI Data Cleaning Audit Trails Guide 382 of 1196
01 · The Question

How Can You Prove What AI Changed in Your Research Dataset?

You have used generative AI to help clean a dataset containing 600 student questionnaires. The AI suggested corrections to invalid responses, standardized academic program labels, identified possible duplicates, and generated a script that modified several variables.

Three months later, a coauthor asks why a particular response changed from 8 to 3. A reviewer wants to know how missing values were handled. You can locate the cleaned spreadsheet, but can you reconstruct the decisions that produced it?

An audit trail addresses this problem. It connects the original evidence to the transformations, decisions, and verification procedures that produced the analysis-ready dataset.

02 · The Short Answer

Record the Changes, Their Justifications, and Their Verification

In Brief

Researchers can create an audit trail for AI-assisted data cleaning by preserving the original dataset and systematically recording proposed changes, approved rules, executed transformations, responsible persons, verification results, and dataset versions. The record should make it possible to explain and reproduce how the final analytical data were produced.

A chatbot conversation or a saved cleaning script alone may be insufficient. A defensible audit trail should distinguish what AI suggested from what was actually executed, what the researcher approved, and what independent evidence supports each consequential change.

03 · What You Need to Know

What an AI-Assisted Data Cleaning Audit Trail Should Contain

What Is a Data Cleaning Audit Trail?

A data cleaning audit trail is a structured record of the decisions and operations through which source data become a cleaned or analysis-ready dataset.

Its purpose is to establish provenance: where the information originated, what happened to it, and how subsequent versions relate to the original observations.

For AI-assisted cleaning, the record should also distinguish the AI system's contribution from the researcher's decisions. An AI suggestion is not necessarily an approved transformation, and an approved transformation is not necessarily evidence that the intended operation executed correctly.

The UK Data Service emphasizes documenting data processing and changes to research data. The W3C PROV model provides a more formal framework for representing provenance through entities, activities, and agents.

Researchers do not necessarily need to implement a formal provenance database. A well-maintained change log, versioned datasets, and reproducible scripts may be sufficient for many projects.

What Is the Difference Between a Change Log and an Audit Trail?

A change log ordinarily records what changed. An audit trail should provide enough context to establish how and why the change occurred and who or what was responsible.

Change log Records the modifications performed, such as the original value, new value, variable, and record identifier.
Audit trail Connects modifications to their rationale, authorization, execution, verification, and relevant dataset versions.

A change log can form part of an audit trail, but it does not necessarily capture the full decision-making process.

Which Details Should Be Recorded for Each Cleaning Decision?

The appropriate level of detail depends on the operation. Individual corrections may require record-level documentation, while an approved transformation affecting thousands of values can be documented through a rule, execution record, and complete change report.

Audit Field What It Records Example
Change ID Unique identifier for the decision or operation. CL-0042
Record and variable Observation and field affected. P017, SE04
Original and new value Before-and-after representation. 8 to 3
Reason Why the change was considered necessary. Confirmed transcription error.
Supporting evidence Source used to justify the decision. Original questionnaire, Item 4.
AI contribution What the AI system suggested or generated. Flagged value outside the permitted range.
Approval and execution Who authorized the action and how it was performed. Researcher-approved script.
Verification status Whether the completed change was checked. Verified against source and output.

For batch operations, the audit record should also identify the exact rule, script version, number of affected observations, and any unexpected outcomes.

Should Researchers Save Every AI Prompt and Response?

Not necessarily. Saving every exploratory conversation may create excessive documentation without improving reproducibility.

What matters is preserving the information needed to understand and reconstruct consequential decisions. This may include the final instructions supplied to the AI, the relevant model or tool configuration, the generated code, and the outputs that informed approved transformations.

If an AI suggestion was rejected because it would have altered valid observations, recording that rejection may be useful when it explains a significant methodological choice.

Researchers should also consider confidentiality. Prompts and chatbot outputs may contain participant information, so they should not automatically be placed in publicly accessible repositories.

A practical recommendation is to preserve material AI interactions relevant to substantive decisions rather than indiscriminately archiving every conversational exchange.

How Should Dataset Versions Be Managed?

Each important processing stage should be identifiable without overwriting the original source.

For example, a project might retain:

  • survey_raw_v1.csv as the protected source export.
  • survey_validated_v1.csv as the version with validation flags.
  • survey_cleaned_v1.csv as the first approved cleaned dataset.
  • survey_analysis_v1.csv as the version prepared for the specified analysis.

These filenames are illustrative, not a mandatory naming convention. A project may instead use institutional repositories, database snapshots, or a managed data pipeline.

The essential requirement is that each version can be identified and connected to its inputs and transformations.

For stronger file-level verification, researchers may record cryptographic checksums. A checksum can help establish whether file contents have changed, although it does not demonstrate that the contents are methodologically correct.

How Do Scripts Contribute to the Audit Trail?

A saved script records the computational instructions used to transform the dataset. It can support reproducibility when paired with the correct inputs, software environment, and execution settings.

However, a script does not necessarily explain why its rules were chosen. For example, code may delete every record with a particular flag without documenting the evidence that justified exclusion.

Researchers should therefore preserve both the executable procedure and the methodological rationale.

OpenRefine supports operation histories that can be reviewed, exported, and reapplied. Its documentation illustrates how recorded transformations can help reconstruct cleaning procedures, although researchers must still document decisions that the software history does not explain.

Should Rejected AI Suggestions Be Recorded?

Not every rejected suggestion requires a separate entry. However, consequential rejected proposals may be important to the methodological history.

Suppose AI recommends deleting a student who reports 40 hours of weekly AI use because the observation is statistically extreme. The researcher checks the original questionnaire and retains the response.

Recording that decision helps demonstrate that the observation was investigated rather than overlooked.

Similarly, if AI proposes merging two academic programs that the researcher determines are distinct, the rejected mapping may be worth preserving to prevent the same mistake during later processing.

The audit trail should remain proportionate to the risks and consequences of the decisions.

How Should Verification Be Documented?

Verification should establish that approved changes were applied correctly and that unintended changes did not occur.

For a single corrected value, the researcher may compare the cleaned record with the original questionnaire. For a batch recoding operation, a complete before-and-after comparison can establish whether every affected value follows the approved mapping.

The verification record should identify the procedure used, its result, and any unresolved exceptions.

For example, "All 42 category replacements matched the approved mapping; no unmatched values were altered" is more informative than simply recording "Cleaning completed."

The specific procedures for verifying AI-assisted data changes should be documented alongside the transformation itself.

Who Should Maintain the Audit Trail?

The research team should assign responsibility for recording and approving cleaning decisions. In collaborative projects, the person proposing a change may differ from the person authorizing it or verifying its execution.

Clear responsibilities help prevent uncertainty about who made a consequential decision and whether the final dataset was approved for analysis.

For AI-assisted workflows, the AI system should be identified as a tool or processing component rather than treated as the accountable investigator.

Institutional policies, funder requirements, and disciplinary conventions may establish additional expectations for data retention and documentation.

How Detailed Must the Audit Trail Be?

An audit trail should be detailed enough to support the reconstruction and evaluation of consequential transformations without collecting unnecessary information.

For example, trimming harmless whitespace from a categorical label may be documented through one approved rule and a generated change report. Deleting participant records or replacing missing values may require substantially more explanation.

The level of scrutiny should reflect the risk that an incorrect operation could affect the research findings.

The broader decision about which cleaning rules require explicit researcher specification determines much of what the audit trail must preserve.

04 · A Practical Example

Documenting AI-Assisted Cleaning of an Academic Self-Efficacy Dataset

Hypothetical Example

Building a Traceable Cleaning Record

A researcher collects 300 academic self-efficacy questionnaires. An AI assistant helps identify invalid item values, inconsistent academic program labels, and possible duplicate records.

The researcher maintains a change log and a separate decision record while preserving the original dataset.

Change ID Proposed Operation Evidence and Decision Status
CL-001 Change P017, SE04 from 8 to 3. Original questionnaire confirms 3. Approved. Executed and verified.
CL-002 Standardize "BS IT" to "BSIT." Official program list confirms equivalence. Approved. Executed and verified.
CL-003 Delete two identical questionnaire rows. Different participant identifiers; duplication not established. Rejected.
CL-004 Replace a missing Likert response with 3. No original response available; replacement unsupported. Rejected.

After executing the approved transformations, the researcher saves a new dataset version and generates a complete comparison report. The original dataset remains unchanged.

Six months later, a coauthor asks why P017's response differs between the original and analysis-ready files. The researcher can locate CL-001, inspect the supporting source record, and reproduce the correction.

Interpretation: The audit trail does more than identify changed cells. It demonstrates which AI suggestions were accepted, which were rejected, and how the resulting dataset can be traced to the original evidence.

05 · What Researchers Often Get Wrong

Common Misconceptions About AI Data Cleaning Audit Trails

Misconception

Is Saving the Final Cleaned Dataset Enough?

No. The final file does not necessarily reveal what changed, why it changed, or whether the modifications were justified. Preserve the source and transformation history.

Misconception

Does a Saved Chatbot Conversation Count as a Complete Audit Trail?

Not necessarily. Conversations may contain unexecuted suggestions, abandoned approaches, and incomplete information. The record must distinguish proposed actions from approved and completed transformations.

Misconception

Does a Cleaning Script Explain Every Methodological Decision?

No. A script documents computational operations but may not explain why a particular threshold, category mapping, or exclusion rule was selected.

Misconception

Must Every Routine Transformation Have a Separate Narrative Explanation?

No. Repeated deterministic operations can be documented through approved rules, scripts, and complete change reports. More consequential or ambiguous decisions generally require additional justification.

Misconception

Does Version Control Guarantee That the Data Are Correct?

No. Versioning preserves states and supports recovery, but it does not establish the methodological validity of the transformations. Verification and justification remain necessary.

06 · What This Means for You

How Should You Organize an AI Data Cleaning Audit Trail?

For many research projects, a practical arrangement consists of protected source data, a decision log, reviewed transformation scripts, versioned outputs, and verification reports.

These components should reference one another through stable identifiers or filenames so that a particular analytical value can be traced back to its source.

A simple decision framework

If AI proposes a change that has not been approved
Record it as a proposal rather than a completed correction.
If a change is approved
Record its rationale, supporting evidence, responsible reviewer, and intended operation.
If a script executes a batch transformation
Preserve the script version, input dataset, output dataset, and complete change report.
If verification identifies an unexpected change
Record the exception, investigate it, and withhold approval of the affected dataset version until resolved.

Do not allow an AI agent to overwrite the original data or alter the audit records without appropriate controls. The separate question of AI access to the master research dataset should be resolved before deployment.

A useful audit trail should allow another qualified researcher to understand the transformations without having to guess what an AI prompt meant or rely on an unavailable chatbot session.

07 · A Quick Checklist

Before Finalizing an AI-Assisted Data Cleaning Audit Trail

Before approving the cleaned dataset, check:
Preserve an identifiable, protected version of the original dataset.
Assign stable identifiers to consequential cleaning decisions and operations.
Record original values, proposed changes, approved actions, and supporting evidence.
Distinguish AI suggestions from researcher approvals and executed transformations.
Retain reviewed scripts, relevant AI configuration details, and software versions.
Connect every important output dataset to its input version and transformation procedure.
Document verification results and unresolved exceptions.
Protect participant information contained in logs, prompts, and source records.
Confirm that the final analytical dataset can be reconstructed from preserved inputs and procedures.
08 · Frequently Asked Questions

Frequently Asked Questions About AI Data Cleaning Audit Trails

Do I need an audit trail if AI only suggests cleaning rules?

If the suggestions influence consequential cleaning decisions, documenting the accepted rules and their justification is advisable. Not every exploratory suggestion requires preservation, but material decisions should remain traceable.

Is a spreadsheet change log sufficient for a research audit trail?

It may be sufficient for a relatively simple project when combined with preserved source data, approved rules, and verification records. More complex workflows may benefit from scripts, version control, and formal provenance systems.

Should I save every prompt used during AI-assisted data cleaning?

Not necessarily. Preserve prompts and outputs that materially influenced the procedure, along with the executed code and approved decisions. Avoid unnecessary retention of confidential participant information.

Can Git be used to track research data cleaning?

Git can help version scripts and documentation. Its suitability for datasets depends on file size, format, confidentiality, and repository access. Sensitive research data should not be placed in an unauthorized public repository.

Does an audit trail need to record rejected AI suggestions?

Consequential rejected suggestions may be worth documenting, particularly when they explain why unusual observations were retained or proposed exclusions were rejected. Routine exploratory suggestions need not all receive individual entries.

How can I prove that the cleaned dataset was not modified afterward?

Version-controlled storage, access records, and cryptographic checksums can help establish file integrity. These mechanisms demonstrate whether content changed, not whether the original cleaning decisions were correct.

Should the audit trail be included in the published research paper?

The paper should describe consequential cleaning procedures sufficiently for methodological evaluation. Detailed logs or scripts may be supplied as supplementary materials or retained in an appropriate repository, subject to journal policies and confidentiality restrictions.

09 · The Bottom Line

An Audit Trail Should Explain the Data, Not Merely Record the AI

The Bottom Line

A defensible AI-assisted data cleaning audit trail connects original observations to proposed changes, researcher-approved decisions, executed transformations, verification results, and the final dataset version.

Preserve enough information to reconstruct consequential changes and evaluate their justification. The objective is not to document every chatbot exchange, but to establish a reliable history of how the research evidence was processed.

10 · Sources and Further Reading

Sources and Further Reading

11 · Cite this Guide

How to Cite This Guide

This guide is intended to be read, shared, and used in research, teaching, and academic work. If you draw on its ideas, explanations, or other content, please acknowledge the source by citing the guide. Doing so gives appropriate credit and helps your readers locate the original resource.

Has the Field Guide helped your research?

If a guide helped clarify a question, inform a research decision, or move your work forward, I would love to hear about your experience. Your story may also help other researchers discover the Field Guide.

Share Your Experience
Takes only a few minutes