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

Should AI Prompts Be Prespecified in a Research Study?

Prespecifying AI prompts can reduce selective optimization and strengthen confirmatory research, but it does not prohibit pilot testing or exploratory prompt development. Learn when prompts should be finalized, how to document amendments, and why independent evaluation data matter more than simply declaring a prompt fixed.

923
Prespecifying AI Prompts in Research Guide 923 of 1196
01 · The Question

Should Researchers Finalize Their AI Prompts Before Collecting Research Results?

You are evaluating whether a generative AI model can identify methodological weaknesses in research proposals. You develop an initial prompt, test it on several proposals, and discover that its recommendations are inconsistent.

You revise the wording, add methodological definitions, and introduce examples. Performance improves.

After examining the formal evaluation results, however, you notice that the model performs poorly on mixed-methods proposals. You modify the prompt again, rerun the evaluation, and obtain a higher accuracy score.

Which result should be reported? Is the final prompt a legitimate improvement, or has the evaluation become influenced by the results it was supposed to measure independently?

This problem resembles a familiar methodological concern: analytical decisions made after observing outcomes can introduce selection bias when presented as though they were determined in advance.

Prespecifying prompts may help distinguish legitimate development from confirmatory evaluation, but researchers need to understand when such prespecification is necessary and what flexibility remains appropriate.

02 · The Short Answer

Prespecification Is Particularly Important for Confirmatory AI Research

In Brief

Researchers should generally prespecify the prompts, prompt-selection procedures, or prompting strategies used in confirmatory AI evaluations before examining the final test outcomes. Prespecification can reduce selective prompt optimization, clarify the intended experimental conditions, and strengthen the credibility of performance estimates.

Prespecification does not mean that prompts must be written without pilot testing or that exploratory research cannot modify them. Researchers may develop and refine prompts using separate development data. The essential distinction is whether changes occur before independent confirmatory evaluation or after researchers have inspected the outcomes used to support their final claims.

03 · What You Need to Know

Prespecifying Prompts Without Preventing Legitimate Methodological Development

What does it mean to prespecify an AI prompt?

Prompt prespecification means establishing and documenting the prompt or prompt-selection procedure before the relevant confirmatory evaluation outcomes are examined.

For example, a researcher may finalize a prompt instructing AI to classify research abstracts according to predefined methodological categories.

The researcher then applies that prompt to a held-out evaluation dataset without modifying it in response to the observed test results.

Prespecification may concern the exact prompt text, a reusable template, a predefined set of prompt variants, or a documented optimization algorithm.

The appropriate form depends on the research design.

The central requirement is that the confirmatory procedure is established independently of the outcomes used to evaluate it.

Why is prompt prespecification important?

Generative AI performance can vary across prompt formulations.

Researchers who test numerous prompts and report only the most successful one may obtain an optimistic estimate of performance.

This concern is particularly important when the same evaluation dataset is used repeatedly to guide prompt revisions.

Prespecification can reduce opportunities for such selective optimization.

It also helps readers distinguish the originally intended procedure from decisions made after observing results.

However, prespecification does not guarantee that a prompt is valid, unbiased, or scientifically appropriate. It improves transparency about the procedure rather than automatically establishing its quality.

What is the difference between prespecification and preregistration?

Prespecification Establishing research decisions before the relevant outcomes are examined, whether documented internally or through a formal protocol.
Preregistration Creating a time-stamped research plan in an appropriate registry or repository before the specified research stage, often including hypotheses, methods, and analysis decisions.

A prompt may be prespecified in a dated institutional protocol without being publicly preregistered.

Conversely, a preregistered AI study may include its exact prompts, prompt-selection procedures, or links to version-controlled supplementary materials.

Preregistration provides a stronger external record of timing when the registration is appropriately preserved.

However, a public registration alone does not establish that the selected procedure is methodologically sound.

Which AI studies benefit most from prompt prespecification?

Research design Role of prespecification Recommended approach
Confirmatory AI performance evaluation Limits outcome-informed prompt selection Finalize prompts or selection rules before held-out testing
Human-versus-AI comparison Prevents preferential optimization of AI conditions Document prompt development and freeze the evaluation configuration
Prompt sensitivity experiment Defines planned prompt comparisons Specify variants and primary contrasts in advance
Exploratory prompt development Clarifies what was planned versus discovered Maintain development records and label findings exploratory
AI-assisted data extraction Supports consistent analytical processing Finalize extraction instructions before formal processing when feasible
Adaptive prompting study Defines how prompts may change Prespecify adaptation rules rather than necessarily fixing one prompt

Prespecification should be proportionate to the role prompting plays in the study.

It is particularly valuable when prompt choices could affect the primary outcome or the interpretation of a confirmatory hypothesis.

Must the exact prompt be finalized before any testing?

No. Pilot testing is often necessary to develop a usable research procedure.

Researchers may discover that an initial prompt contains ambiguous instructions, produces invalid output formats, or fails to distinguish important methodological categories.

Revising the prompt during development is not inherently problematic.

The important distinction is between development data and the independent data used for final evaluation.

Researchers should avoid presenting performance measured on repeatedly consulted development data as though it were an unbiased estimate from a held-out test.

The principles of pilot-testing AI prompts are therefore compatible with appropriate prespecification.

What is the difference between exploratory and confirmatory prompting?

Exploratory prompting investigates possible instructions, strategies, and model behaviors without necessarily testing a fixed hypothesis.

Confirmatory prompting applies a predefined procedure to evaluate a specified research question or hypothesis.

Both approaches can make legitimate scientific contributions.

However, exploratory findings should not be presented as though the prompt conditions and hypotheses were fixed independently of the observed outcomes.

Researchers should distinguish the two stages in their methodology and reporting.

This distinction is particularly important when many prompt variants have been examined.

How can researchers separate prompt development from final evaluation?

One approach uses separate development and evaluation datasets.

Researchers develop and refine prompts using the development data, then finalize the procedure before applying it to the held-out evaluation set.

For example, 50 research abstracts may be reserved for prompt development, while a separate set of 200 abstracts is used for confirmatory testing.

However, simply dividing a dataset does not guarantee independence if near-duplicate items, related documents, or shared information appear across the two partitions.

Researchers should consider contamination, representativeness, and appropriate data separation.

When the available dataset is small, alternative designs such as nested resampling may be appropriate, provided the complete selection procedure is respected.

What happens when researchers optimize prompts on the final test set?

Repeatedly inspecting final test results and modifying prompts accordingly can introduce evaluation overfitting.

For example, a researcher may test 20 prompts on the same 100 abstracts and select the one achieving the highest accuracy.

The selected score may partly reflect favorable variation specific to those abstracts.

Reporting that score as an independent estimate of general performance may therefore be misleading.

The problem becomes more pronounced when researchers continue modifying prompts until a desired threshold is reached.

Researchers should document such development and obtain fresh independent evaluation evidence when making confirmatory performance claims.

Can selecting the best prompt create statistical optimism?

Yes. Even if several prompts have similar underlying performance, their observed scores may differ because of evaluation noise.

Selecting the highest observed score can produce an upwardly biased estimate of the selected prompt's generalization performance.

Observed Prompt Selection
p* = arg maxp ∈ P Adevelopment(p)
P is the set of candidate prompts, Adevelopment(p) is the development-set performance of prompt p, and p* is the selected prompt. Selection performance is not necessarily an unbiased estimate of performance on new data.
Suppose five prompts achieve development accuracies of 82%, 84%, 86%, 83%, and 88%. Selecting the fifth prompt because it achieved 88% is a legitimate development decision, but the 88% should not automatically be treated as independent confirmatory performance.

The selected prompt should be evaluated on data not used to make the selection decision when the study seeks an independent estimate.

Researchers should also avoid treating the selected prompt as universally optimal across tasks or model versions.

Should researchers prespecify one prompt or several prompts?

Either approach may be appropriate.

A study evaluating one deployed AI workflow may use a single finalized prompt.

A study investigating prompt sensitivity may prespecify several prompt variants and compare their outcomes.

Another study may define a prompt-selection procedure that chooses among candidates using development data.

The relevant requirement is that the primary evaluation procedure and comparisons are defined before the confirmatory outcomes are examined.

Researchers should avoid selecting which prompt comparisons to report solely because they produce favorable findings.

Can adaptive prompting be prespecified?

Yes. Prespecification does not necessarily require one immutable prompt.

An adaptive procedure may modify prompts according to predefined rules.

For example, a system may request additional information when an initial classification is uncertain or use a second prompt when the first response fails a validation check.

Researchers can prespecify the conditions triggering these actions, the permitted prompt variants, and the rules for selecting final outputs.

The complete procedure then becomes the object of evaluation.

However, researchers should distinguish predefined adaptation from discretionary changes introduced after examining confirmatory outcomes.

What should a prespecified prompt protocol contain?

A prompt protocol should provide enough information to establish how the AI-assisted procedure will operate.

Protocol element What should be specified
Research objective The task and hypothesis being evaluated
Prompt text or template The instructions used during testing
Prompt variants Any planned alternative formulations
Selection procedure How the final prompt is chosen
Development data Materials permitted for prompt optimization
Evaluation data Materials reserved for confirmatory testing
Model configuration Model identifier, accessible settings, and relevant tools
Execution procedure Conversation context, repetitions, and response handling
Primary outcome The metric used to evaluate performance
Analysis plan Statistical comparisons and uncertainty procedures
Amendment procedure How justified changes will be recorded and reported

The level of detail should reflect the complexity of the study and the extent to which prompt decisions influence its conclusions.

Should the AI model version also be prespecified?

When feasible, researchers should identify the intended model and configuration before confirmatory testing.

However, commercial AI providers may update systems or retire model versions without advance notice.

Researchers should document the model actually used, the testing period, and any material changes.

If a model update occurs during the study, the researchers should assess whether the evaluation conditions remain comparable.

Prespecification cannot guarantee that an external service will remain unchanged.

It can, however, establish how the study intends to handle such changes.

What if a prespecified prompt contains an error?

Prespecification does not require researchers to continue using a demonstrably defective procedure.

For example, a prompt may contain an incorrect operational definition or a formatting instruction that prevents valid data collection.

Researchers may need to correct the problem.

However, the amendment should be documented, including when the error was discovered, what changed, and which evaluation outcomes had already been examined.

If the change was informed by final test performance, a fresh confirmatory evaluation may be necessary.

The original procedure should not be silently replaced in the research record.

How should prompt amendments be documented?

Researchers should preserve the original prompt and each material revision.

A change log may record the date, reason, affected instruction, and implications for previously collected results.

Version Change Reason Evaluation status
1.0 Initial classification prompt Original protocol Development
1.1 Clarified mixed-methods definition Ambiguity identified during pilot testing Development
1.2 Added explicit unclear category Improved handling of insufficient information Finalized before held-out testing
1.3 Proposed change after test inspection Unexpected errors in final evaluation Exploratory amendment requiring separate validation

This hypothetical record illustrates how version history can distinguish development decisions from post-evaluation changes.

Researchers should avoid describing an amended prompt as originally prespecified when it was not.

Does preregistration prevent prompt cherry-picking?

Preregistration can reduce opportunities for undisclosed selective reporting by establishing a time-stamped plan.

However, it does not automatically prevent deviations, hidden exploratory analyses, or inappropriate interpretation.

Researchers may still conduct additional prompt experiments after registration.

The important requirement is to disclose those analyses and distinguish them from the original confirmatory plan.

The methodological concerns associated with prompt cherry-picking remain relevant even in preregistered studies.

Can researchers preregister a prompt-selection algorithm?

Yes. Rather than specifying one fixed prompt, researchers may preregister a reproducible selection procedure.

For example, the protocol may define a set of candidate prompts, a development dataset, an accuracy metric, and a rule for selecting the highest-performing candidate.

The procedure can then be applied without consulting the final evaluation outcomes.

However, the candidate-generation process and any manual intervention should also be described.

A supposedly automated selection procedure may still contain discretionary decisions that influence the result.

The study should preserve enough information to reconstruct the selection process where feasible.

Should researchers prespecify prompt sensitivity analysis?

When robustness to prompt wording is central to the research question, prespecifying sensitivity analyses can strengthen the study.

For example, researchers may define five semantically comparable prompt variants and examine how classification accuracy changes.

However, semantically comparable wording should be distinguished from prompts that supply different examples or substantive instructions.

Researchers should identify which variations are intended to test robustness and which represent different experimental conditions.

Unplanned sensitivity analyses may still be useful, but they should be reported as exploratory.

Should all prompt variants be archived?

Preserving relevant prompt variants supports transparency about the development and evaluation process.

Researchers may maintain version-controlled records containing prompt text, selection decisions, and associated development results.

However, not every informal brainstorming exchange needs to appear in the main manuscript.

The appropriate level of archival detail depends on whether a prompt variant materially influenced the procedure or conclusions.

Confidential or sensitive information should be protected.

Researchers should distinguish the archival record from the smaller set of materials necessary for public reporting.

How does prespecification relate to research integrity?

Prespecification can help make analytical decisions more transparent and reduce undisclosed outcome-driven changes.

However, failing to prespecify a prompt is not automatically research misconduct.

Exploratory studies may legitimately develop prompts iteratively.

The research-integrity concern becomes more serious when researchers conceal material changes, selectively report favorable results, or falsely describe exploratory decisions as prespecified.

Researchers should distinguish methodological limitations from deliberate misrepresentation.

Transparency about the sequence of decisions is essential.

How should prespecified prompting be reported?

The methods section should identify when the prompt was finalized, how it was developed, whether the study was preregistered, and whether deviations occurred.

For example:

Illustrative Methods Description

"The research prompt was developed using a separate pilot dataset and finalized before evaluation on the held-out test set. The protocol specified the classification categories, prompt template, model configuration, and primary accuracy measure. No prompt revisions were made after the confirmatory test outcomes were examined. The final prompt and development history are provided in the supplementary materials."

If deviations occurred, the manuscript should describe them and distinguish the original analysis from subsequent exploratory work.

Such reporting allows readers to understand whether the reported performance reflects an independently evaluated procedure or one selected using the evaluation outcomes.

04 · A Practical Example

Prespecifying a Prompt Before Evaluating Research Classification Accuracy

Hypothetical Example

Developing and validating an AI methodology classifier

A researcher evaluates whether generative AI can classify educational research abstracts as qualitative, quantitative, or mixed methods.

The study contains 50 development abstracts and 200 held-out evaluation abstracts.

Several prompt formulations are examined during development, but the final prompt is selected before the confirmatory evaluation begins.

Stage Procedure Purpose
Development Test three prompt variants on 50 abstracts Identify a suitable prompt
Selection Choose the prompt using predefined criteria Finalize the procedure
Prespecification Record prompt, model, settings, and analysis plan Establish the confirmatory protocol
Evaluation Apply the frozen procedure to 200 held-out abstracts Estimate independent test performance
Reporting Report held-out results and relevant development history Support transparent interpretation
Step 1: Define the research questionThe study examines classification accuracy under a predefined AI-assisted procedure.
Step 2: Develop candidate promptsThree formulations are tested using the development abstracts. The researcher records their instructions and performance.
Step 3: Select and finalizeThe final prompt is selected according to the documented development criteria and preserved with the model configuration.
Step 4: Conduct independent evaluationThe frozen prompt is applied to the 200 held-out abstracts without revisions based on the observed test outcomes.
Step 5: Analyze the resultsClassifications are compared with independently adjudicated labels, and appropriate uncertainty estimates are calculated.
Step 6: Report transparentlyThe researcher distinguishes development performance from confirmatory performance and discloses any material protocol deviations.

The example illustrates that prespecification does not prohibit prompt development.

Instead, it establishes a boundary between the process used to select a procedure and the independent evidence used to evaluate that procedure.

05 · What Researchers Often Get Wrong

Common Misconceptions About Prespecified AI Prompts

Misconception

Prompts Must Be Finalized Before Any Pilot Testing

Pilot testing can be a legitimate development activity. The important distinction is between development data and independent confirmatory evaluation.

Misconception

Prespecification Guarantees Valid AI Performance Results

A prespecified prompt may still contain flawed instructions or produce unreliable outputs. Prespecification supports transparency but does not establish validity by itself.

Misconception

Exploratory Prompt Changes Are Scientifically Unacceptable

Exploratory development is legitimate when documented and reported as exploratory rather than disguised as confirmatory testing.

Misconception

Only One Fixed Prompt Can Be Prespecified

Researchers may prespecify multiple variants, adaptive rules, or a prompt-selection algorithm, depending on the study design.

Misconception

The Best Test-Set Prompt Provides an Unbiased Performance Estimate

Selecting prompts using final test results can produce optimistic estimates. Independent evaluation is necessary for defensible generalization claims.

Misconception

A Prespecified Prompt Can Never Be Amended

Justified amendments may be necessary, but their timing, rationale, and consequences should be documented transparently.

Misconception

Failure to Preregister a Prompt Automatically Constitutes Misconduct

Preregistration is not universally mandatory. The concern is whether research decisions and findings are reported accurately and transparently.

06 · What This Means for You

Deciding When and How to Prespecify AI Prompts

Researchers should determine whether their study makes confirmatory claims and whether prompt selection could influence the reported outcomes.

A simple decision framework

If the study evaluates a confirmatory hypothesis
Prespecify prompts or selection rules before examining final evaluation outcomes.
If prompts require development
Use separate pilot or development data and document the selection process.
If the study compares prompting strategies
Define the planned variants, primary comparisons, and statistical analysis in advance.
If prompting adapts during execution
Prespecify the adaptation rules and conditions under which prompts may change.
If a prompt must change after test inspection
Document the amendment, distinguish exploratory findings, and consider fresh independent evaluation.

Prespecification should not become an exercise in administrative rigidity.

Its scientific value lies in establishing which decisions preceded the evidence and which were informed by it.

Watch Out

Do not revise a prompt repeatedly using the final evaluation results and then describe the selected prompt as though it had been established before testing. This can conceal outcome-driven optimization and exaggerate the apparent generalizability of AI performance.

07 · A Quick Checklist

Before Finalizing a Prespecified Prompt Protocol

Before confirmatory evaluation, check:
Define the research question and whether the study is exploratory or confirmatory.
Establish the exact prompts, templates, or selection procedures to be evaluated.
Separate prompt development data from final evaluation data where appropriate.
Document candidate prompts and development decisions.
Specify the model configuration and relevant execution settings.
Prespecify primary outcomes and planned statistical comparisons.
Define any adaptive prompting or retry rules.
Preserve a dated record of the finalized procedure before confirmatory testing.
Establish how protocol amendments will be documented.
Distinguish development performance from held-out test performance.
Report deviations and exploratory analyses transparently.
08 · Frequently Asked Questions

Frequently Asked Questions About Prespecifying AI Prompts

Should AI prompts be prespecified in research?

Prespecification is particularly important for confirmatory studies where prompt selection could influence performance estimates or hypothesis testing. Exploratory research may legitimately use iterative development.

What does prompt prespecification mean?

It means establishing and documenting the prompt or prompt-selection procedure before examining the outcomes used for confirmatory evaluation.

Is prompt prespecification the same as preregistration?

No. Prespecification concerns the timing of research decisions, while preregistration creates a time-stamped record of the planned study in an appropriate registry or repository.

Can researchers pilot prompts before prespecifying them?

Yes. Pilot testing and development are legitimate, particularly when conducted using data separate from the final confirmatory evaluation.

Can researchers change a prespecified prompt?

Yes, when justified. Material amendments should be documented, and changes informed by final test outcomes may require fresh independent validation.

Can multiple prompts be prespecified?

Yes. Researchers may define several prompt conditions, a selection procedure, or adaptive prompting rules before evaluation.

What is prompt overfitting?

Prompt overfitting occurs when optimization favors performance on particular evaluation data without necessarily improving generalization to new cases.

Does preregistration eliminate prompt cherry-picking?

No. It can improve transparency and reduce undisclosed flexibility, but researchers must still report deviations and relevant exploratory analyses.

Is it research misconduct to change a prompt after testing?

Not automatically. The concern depends on how the change is made and reported. Concealing outcome-driven revisions or falsely describing them as prespecified may raise research-integrity concerns.

09 · The Bottom Line

Prespecification Separates Prompt Development From Independent Evaluation

The Bottom Line

Researchers should prespecify AI prompts or prompt-selection procedures when conducting confirmatory evaluations in which prompt choices can influence the reported findings. Pilot development remains legitimate, but the final evaluation should be sufficiently independent of the decisions used to optimize the prompt.

Prespecification is not a guarantee of validity and should not prevent transparent methodological refinement. Its value lies in preserving the distinction between what researchers planned before observing the evidence and what they decided afterward. That distinction is central to interpreting AI performance claims responsibly.

10 · Sources and Further Reading

Research on Preregistration, Prompt Selection, and Evaluation Overfitting

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