03 · What You Need to Know
Why Direct AI Modification Creates Research Data Integrity Risks
What Is the Master Research Dataset?
The master dataset is the authoritative data resource maintained by a research project. However, the term does not have one universally fixed meaning.
In some projects, it refers to the original exported observations. In others, it refers to a curated, validated dataset maintained as the official working version. A longitudinal project may maintain several authoritative releases.
Researchers should therefore define which files constitute the original source records, which files are approved analytical versions, and which version is considered authoritative for a particular purpose.
Data Carpentry's guidance on organizing spreadsheet data recommends preserving raw data and performing transformations on copies. This principle helps maintain a reliable reference against which later processing can be evaluated.
Original or raw dataset
The preserved source observations before cleaning or analytical transformations.
Working or derived dataset
A separate version produced through documented processing, correction, recoding, or analytical preparation.
The essential safeguard is not a particular filename. It is the ability to identify the authoritative source, reconstruct the transformations, and recover the data if a processing operation fails.
What Does Direct AI Modification Actually Involve?
An AI system may interact with research data at different permission levels. These should not be treated as equivalent.
| Access Level |
What AI Can Do |
Principal Risk |
|
Read-only access
|
Inspect authorized data and generate reports without changing the source. |
Confidentiality exposure and inaccurate interpretations remain possible. |
|
Recommendation-only access
|
Propose corrections, mappings, or exclusions for researcher review. |
Incorrect suggestions may be accepted without sufficient verification. |
|
Write access to a working copy
|
Execute approved transformations on a separate dataset. |
Incorrect transformations may affect the derived version. |
|
Controlled write access to an authoritative dataset
|
Apply restricted, validated updates through an approved workflow. |
Failures may affect the authoritative version unless controls work as intended. |
|
Unrestricted master-data access
|
Modify, overwrite, or delete records without defined approval boundaries. |
Undocumented or unintended changes may compromise the research record. |
Read-only access is not automatically privacy-safe, because the AI may still receive sensitive information. Nevertheless, restricting write permissions can prevent the system from directly altering source records.
The appropriate access level should follow the principle of granting only the permissions needed for the approved task.
What Can Go Wrong When AI Edits the Master Dataset?
Direct modification can introduce several distinct risks.
Incorrect recoding: An AI system may interpret an abbreviation incorrectly and combine two distinct academic programs into one category.
Unjustified deletion: It may remove identical questionnaire responses under the assumption that they are duplicates, even when they belong to different participants.
Unsupported replacement: It may fill missing values with plausible estimates and overwrite the original missingness.
Unintended propagation: A faulty rule may change every record meeting an overly broad condition rather than the intended subset.
Loss of provenance: If changes are not recorded, the research team may be unable to reconstruct what participants originally reported.
These risks are not unique to generative AI. Conventional scripts and manual spreadsheet editing can also damage datasets. AI adds particular concerns when instructions are ambiguous, generated code is not inspected, or autonomous tools execute operations beyond the researcher's intended scope.
Why Is Preserving the Original Dataset So Important?
Preserving the original data makes it possible to distinguish collected observations from later transformations.
For example, suppose an AI agent changes every value of 99 to a missing-value marker. If 99 represents missingness for one variable but is a valid age for another, a dataset-wide replacement could destroy legitimate observations.
Without the original file, the researcher may struggle to reconstruct the affected values.
Data Carpentry explicitly recommends retaining raw data and recording cleaning steps. The UK Data Service likewise emphasizes documenting processing, transformations, and quality assurance so that research data remain understandable and reusable.
These recommendations support a practical principle: transformations should be reproducible from preserved source data, rather than relying on an edited file whose history is unknown.
Can AI Modify a Working Copy Safely?
It can, provided the workflow is appropriately controlled and validated.
For example, a researcher might approve a mapping table that standardizes verified academic program abbreviations. A reviewed script can then apply the mapping to a working copy while preserving the original values.
The process should include checks that confirm the expected number of records, the intended variables, and the exact values changed.
Where feasible, the script should fail rather than continue when unexpected conditions arise. For instance, an unfamiliar category should be flagged instead of automatically assigned to the closest known category.
AI may generate the code, but its correctness must be evaluated before execution.
What Is a Safer AI-Assisted Modification Workflow?
A practical workflow separates proposal, approval, execution, and verification.
1. Preserve the source
Maintain an access-controlled original dataset and a verified backup. Restrict modification permissions according to project responsibilities.
2. Generate a change proposal
Allow AI to identify potential problems and produce a proposed change table without altering the authoritative data.
3. Approve explicit rules
The researcher reviews the evidence and authorizes the exact operations, variables, and records that may be changed.
4. Execute on a working copy
A tested procedure applies the approved transformations to a separate version of the dataset.
5. Verify the results
Compare source and derived data, inspect changed values, and confirm that unrelated observations remain unchanged.
6. Release the approved version
After verification, designate the cleaned dataset as an approved analytical version while preserving the source and transformation history.
This workflow allows automation without giving an AI agent unrestricted authority over the research record.
Can Version Control and Undo Functions Make Direct Editing Safe?
Versioning and rollback mechanisms reduce risk, but they do not independently establish that a modification is correct.
OpenRefine, for example, maintains an operation history that allows users to review and undo many transformations. Its documentation also describes how operation histories can be extracted and reapplied to other projects.
However, an undo history is not necessarily equivalent to a complete research audit trail. It may record what operation was performed without establishing why the researcher considered the change justified.
Version control should therefore be combined with documented approval, source verification, and explicit change records.
For particularly consequential operations, such as deleting records or replacing missing observations, a separate reviewed change report may be necessary.
Could AI Be Given Controlled Write Access in a Research Data System?
Yes, under sufficiently restrictive conditions.
For example, a research institution might operate a validated data-processing pipeline in which an AI system can propose transformations but can only execute predefined operations after approval.
The system could enforce permitted variable ranges, restrict access to specific tables, create immutable version snapshots, and reject operations that violate data-integrity checks.
In such a design, the AI does not possess unrestricted authority to decide what the research data should contain. It operates within a controlled procedure established by the research team.
NIST's AI Risk Management Framework emphasizes defining human roles and responsibilities, evaluating AI-related risks, and establishing appropriate oversight. Its generative AI profile also addresses information integrity and the importance of validating AI-generated content.
These principles support controlled automation, although NIST does not prescribe one universal architecture for research dataset modification.
What About Autonomous AI Agents?
Autonomous agents may be able to open files, execute scripts, save datasets, and initiate subsequent operations with limited human interaction.
This creates additional concerns because a single broad instruction, such as "clean the dataset and prepare it for analysis," may trigger several transformations whose consequences are difficult to anticipate.
Researchers should define the agent's allowed operations, prohibited actions, access permissions, approval requirements, and stopping conditions.
Destructive operations, including deleting records or overwriting source files, should require explicit authorization and reliable recovery mechanisms.
Watch Out
Do not assume that an AI agent will preserve the original data simply because the instruction says "be careful." Protection should be enforced through file permissions, separate working environments, versioned backups, and validation controls rather than relying only on natural-language instructions.
Who Is Responsible When AI Makes an Incorrect Change?
The research team remains responsible for the integrity of the dataset and the procedures used to produce analytical results.
Responsibility may be distributed among investigators, data managers, institutions, and technology providers according to their roles and applicable agreements. However, using AI does not make an incorrect transformation methodologically defensible.
Researchers should establish which cleaning decisions require explicit researcher approval and ensure that those decisions are recorded.
Maintaining an audit trail of AI-assisted modifications is essential when multiple people or automated systems participate in data processing.