Module 1 · Chapter 5 Prompt Engineering Foundations › Anatomy of an Effective Prompt

Success Criteria

A prompt can define the task, the audience, the format, and every constraint, and still leave one question unanswered: how will anyone know the response actually succeeded? Success criteria close that gap by converting a general request into a verifiable objective - specific, measurable conditions a reviewer can check the output against instead of judging it on a feeling.

Quick takeaway: requirements describe what the model should do; success criteria describe how to determine whether it did it successfully. Strong criteria are specific, measurable, relevant, achievable, unambiguous, and observable - "make it good" tells the model nothing, while "every recommendation must include its benefit, effort, and risk" can actually be checked against the finished output.

Introduction

Success criteria define the conditions that an AI-generated response must satisfy to be considered correct, useful, complete, and acceptable.

A prompt may contain a clear task, detailed context, input data, constraints, and output requirements. However, without success criteria, the language model may not know how the final response will be evaluated.

Success criteria answer an important question:

What must be true for the generated response to be considered successful?

They convert a general request into a verifiable objective. Instead of merely asking the model to generate an output, success criteria specify the expected quality, correctness, coverage, format, and practical value of that output.

What Are Success Criteria?

Success criteria are measurable or observable conditions used to evaluate whether an AI response has fulfilled the prompt correctly.

They may define:

  • What information must be included
  • What information must be excluded
  • How accurate the response must be
  • What structure the response must follow
  • How detailed the explanation should be
  • Which audience the response should serve
  • What practical outcome the response should achieve
  • Which constraints must be respected
  • How uncertainty should be handled
  • What would make the output unacceptable

A success criterion should be specific enough that a reviewer can inspect the output and determine whether the condition has been satisfied.

Why Success Criteria Are Important

Success criteria improve prompt quality by making expectations explicit.

Without success criteria, a prompt may produce an answer that is technically related to the task but still unusable.

For example:

Prompt
Explain Java exception handling.

This prompt identifies the topic but does not define what a successful explanation should contain.

A stronger prompt includes evaluation conditions:

Prompt
Explain Java exception handling to a beginner.
Define checked and unchecked exceptions.
Include one code example for each type.
Explain try, catch, finally, throw, and throws.
Include common interview questions.
Keep the explanation under 1,500 words.
The response is successful only if a beginner can understand when and how to handle exceptions.

The second prompt provides the model with a clearer target.

Success Criteria as Part of Prompt Anatomy

In an effective prompt, success criteria usually appear after the following components:

  1. Role or persona
  2. Task or instruction
  3. Background context
  4. Input data
  5. Target audience
  6. Constraints and rules
  7. Output requirements
  8. Examples
  9. Success criteria

Success criteria are often placed near the end because they summarize how all other instructions should be evaluated.

A common structure is:

Prompt
Role: Act as a senior Java technical interviewer.
Task: Create interview questions about Java multithreading.
Audience: Java developers with three years of experience.
Output: Provide 20 questions with concise answers.
Constraints: Avoid duplicate questions and outdated APIs.
Success criteria: Every answer must be technically accurate, interview-ready, and understandable without external references.

Difference Between Requirements and Success Criteria

Requirements describe what the model should do.

Success criteria describe how to determine whether the model did it successfully.

Example requirement:

Prompt
Include five REST API security practices.

Corresponding success criterion:

Prompt
The response is successful only if all five practices include a clear explanation, implementation guidance, and the security risk they address.

Another example:

Requirement

Prompt
Generate a product description.

Success criteria

  • The description must identify the target customer.
  • It must explain at least three customer benefits.
  • It must avoid unsupported claims.
  • It must contain a clear call to action.
  • It must remain between 150 and 200 words.

Requirements guide generation. Success criteria guide evaluation.

Characteristics of Effective Success Criteria

Specific

A success criterion should describe an exact expectation.

Weak criterion:

Prompt
The answer should be good.

Strong criterion:

Prompt
The answer must explain each concept in plain language and include one practical example for every major section.

The word good is subjective. The stronger criterion identifies observable qualities.

Measurable

A measurable criterion contains a quantity, limit, count, range, or identifiable condition.

Examples:

  • Include exactly 10 questions.
  • Keep the response between 800 and 1,000 words.
  • Provide at least three examples.
  • Use no more than five main sections.
  • Include all required input fields.
  • Return valid JSON containing the specified properties.

Not every criterion must contain a number, but it should be testable.

Relevant

Success criteria must be connected to the actual objective.

For a beginner-level tutorial, relevant criteria may include:

  • Simple language
  • Definitions of technical terms
  • Step-by-step examples
  • Minimal assumed knowledge

For an API response, relevant criteria may include:

  • Valid JSON
  • Correct property names
  • Defined data types
  • Error-handling information

Irrelevant criteria distract the model and reduce prompt efficiency.

Achievable

Criteria should be realistic for the available model, context, input, and output limits.

Unrealistic criterion:

Prompt
Guarantee that every statement is permanently accurate.

Better criterion:

Prompt
Use the supplied documentation as the primary source and clearly mark any assumption that cannot be verified from the input.

A model cannot guarantee permanent accuracy, but it can follow a defined evidence policy.

Unambiguous

A criterion should have only one reasonable interpretation.

Ambiguous criterion:

Prompt
Make the answer short.

Clear criterion:

Prompt
Keep the answer under 300 words while preserving the definition, key steps, and one example.

Observable

A reviewer should be able to examine the final output and determine whether the condition is satisfied.

Observable criterion:

Prompt
Each recommendation must include its benefit, implementation effort, and potential risk.

Non-observable criterion:

Prompt
Think carefully before answering.

Thinking carefully is an instruction, but it cannot be verified directly from the final output.

Prioritized

When several criteria exist, their priority should be clear.

Example:

Prompt
Priority order:
1. Technical accuracy
2. Compliance with the supplied data
3. Completeness
4. Conciseness
5. Writing style

This helps the model resolve conflicts. For example, if conciseness conflicts with technical accuracy, accuracy should take priority.

Types of Success Criteria

Content Coverage Criteria

Content coverage criteria specify the information that must appear in the response.

Examples:

  • Define the main concept.
  • Explain all required components.
  • Include benefits and limitations.
  • Cover both basic and advanced use cases.
  • Include common mistakes.
  • Add a practical implementation example.
  • Mention relevant edge cases.

Prompt example:

Prompt
Explain dependency injection in Spring.
Define dependency injection and inversion of control.
Explain constructor, setter, and field injection.
Compare the three approaches.
Include one Spring Boot example.
The response is successful only if it explains why constructor injection is generally preferred.

Accuracy Criteria

Accuracy criteria define how correctness should be maintained.

Examples:

  • Use technically accurate terminology.
  • Do not invent unsupported facts.
  • Do not contradict the supplied source material.
  • Distinguish facts from assumptions.
  • Clearly state when information is uncertain.
  • Use the specified software version.
  • Avoid deprecated syntax or APIs.

Prompt example:

Prompt
Explain Java records using Java 21.
Use only features available in Java 21.
Do not describe records as fully mutable classes.
Clearly distinguish records from ordinary classes.
The response is successful only if all code examples compile conceptually under Java 21.

Completeness Criteria

Completeness criteria ensure that important parts of the task are not omitted.

Examples:

  • Address every question in the input.
  • Process every data item.
  • Include all requested sections.
  • Explain both positive and negative cases.
  • Cover normal behavior and error behavior.
  • Include prerequisites and final verification steps.

Prompt example:

Prompt
Review the supplied API specification.
Identify authentication, validation, performance, and error-handling issues.
Do not skip any endpoint.
The review is successful only if every endpoint receives at least one explicit evaluation result.

Format Compliance Criteria

Format criteria define how the output must be organized.

Examples:

  • Use Markdown headings.
  • Return valid JSON.
  • Use a table with specified columns.
  • Place each instruction on a separate line.
  • Avoid code fences.
  • Use numbered steps.
  • Do not include introductory text.
  • Follow the supplied schema exactly.

Prompt example:

Prompt
Return the result as JSON.
Use the properties name, category, difficulty, answer, and explanation.
Do not include Markdown.
Do not include properties outside the schema.
The response is successful only if it can be parsed as valid JSON without modification.

Audience Suitability Criteria

Audience criteria evaluate whether the response matches the intended reader.

Examples:

  • Use beginner-friendly explanations.
  • Define unfamiliar terms.
  • Avoid unnecessary academic language.
  • Assume the reader understands basic Java.
  • Use examples relevant to software developers.
  • Avoid explanations that require advanced mathematics.

Prompt example:

Prompt
Explain REST APIs to a first-year computer science student.
Define every major technical term.
Use a real-world analogy.
Include one simple HTTP request and response example.
The response is successful only if it can be understood without previous API development experience.

Actionability Criteria

Actionability criteria ensure that the response can be applied in practice.

Examples:

  • Include concrete implementation steps.
  • Provide commands that can be executed.
  • Explain expected results.
  • Include verification instructions.
  • Identify prerequisites.
  • Mention possible failure conditions.
  • Recommend the next action.

Prompt example:

Prompt
Explain how to configure HTTPS in a Spring Boot application.
Include the certificate-generation command.
Include the application configuration.
Explain how to start the application.
Include a browser-based verification step.
The response is successful only if the reader can follow the instructions without searching for missing steps.

Quality Criteria

Quality criteria define the desired communication standard.

Examples:

  • Avoid unnecessary repetition.
  • Use concise sentences.
  • Maintain logical flow.
  • Use consistent terminology.
  • Explain complex ideas before introducing advanced details.
  • Avoid robotic or generic language.
  • Support important recommendations with reasoning.

Prompt example:

Prompt
Write a technical article about Java virtual threads.
Organize the explanation from basic concepts to advanced usage.
Avoid repeating the same definition.
Use consistent terminology throughout.
The response is successful only if every section introduces new and relevant information.

Constraint Compliance Criteria

These criteria confirm that the model has respected limitations.

Examples:

  • Do not exceed the word limit.
  • Do not include personal information.
  • Do not use external assumptions.
  • Do not mention competitors.
  • Do not provide legal conclusions.
  • Do not change input values.
  • Do not use prohibited libraries.

Prompt example:

Prompt
Refactor the supplied Java code.
Use only the Java standard library.
Do not change public method signatures.
Preserve the existing behavior.
Do not introduce third-party dependencies.
The response is successful only if the refactored code satisfies all original test cases without interface changes.

Consistency Criteria

Consistency criteria require the output to remain internally aligned.

Examples:

  • Terminology must remain consistent.
  • Recommendations must not contradict earlier sections.
  • Code must match the explanation.
  • Numbers in the summary must match the source data.
  • Field names must remain unchanged.
  • Examples must follow the specified format.

Prompt example:

Prompt
Create a database design and corresponding SQL schema.
Use identical table and column names in the explanation and SQL.
Ensure every foreign key mentioned in the design exists in the schema.
The response is successful only if the written design and SQL implementation are fully consistent.

Safety and Risk Criteria

Safety criteria define boundaries for sensitive or high-impact outputs.

Examples:

  • Avoid presenting uncertain information as fact.
  • Include appropriate warnings.
  • Do not expose credentials or secrets.
  • Do not recommend unsafe implementation patterns.
  • Identify security risks.
  • Avoid making decisions that require professional authorization.

Prompt example:

Prompt
Review the authentication code for security issues.
Do not reproduce passwords, tokens, or private keys.
Explain the impact of every identified vulnerability.
Recommend secure remediation steps.
The response is successful only if sensitive values remain undisclosed and each critical issue includes a mitigation.

Evidence and Traceability Criteria

These criteria specify how conclusions must be supported.

Examples:

  • Base conclusions only on supplied data.
  • Cite the relevant source section.
  • Connect every recommendation to an identified issue.
  • Label assumptions explicitly.
  • Separate observed facts from inferred conclusions.

Prompt example:

Prompt
Analyze the supplied incident report.
Use only information available in the report.
For every root-cause statement, mention the supporting evidence.
Label any unsupported possibility as a hypothesis.
The analysis is successful only if facts, evidence, and hypotheses are clearly separated.

Functional Success Criteria

Functional criteria define whether the output performs the intended operation.

These are common in code-generation prompts.

Examples:

  • The function must return the expected value.
  • Invalid input must be handled safely.
  • The implementation must preserve the required interface.
  • The algorithm must meet performance limits.
  • The output must pass defined test cases.
  • The code must compile with the specified language version.

Prompt example:

Prompt
Write a Java method that removes duplicate integers while preserving insertion order.
Accept a List<Integer> as input.
Return a new list.
Do not modify the original list.
Handle null input by returning an empty list.
The solution is successful only if it preserves order, removes all duplicates, and passes the provided test cases.

Non-Functional Success Criteria

Non-functional criteria describe quality attributes rather than direct behavior.

Examples:

  • Performance
  • Security
  • Maintainability
  • Readability
  • Scalability
  • Accessibility
  • Reliability
  • Portability
  • Testability

Prompt example:

Prompt
Design a caching strategy for a high-traffic product API.
The design must reduce repeated database queries.
It must include cache expiration and invalidation.
It must explain failure behavior.
It must remain maintainable across multiple services.
The response is successful only if it addresses performance, consistency, reliability, and operational monitoring.

Quantitative and Qualitative Criteria

Quantitative Criteria

Quantitative criteria can be measured numerically.

Examples:

  • Exactly 20 questions
  • Between 1,000 and 1,500 words
  • Maximum response time of 200 milliseconds
  • At least 80 percent test coverage
  • No more than three levels of nested headings
  • Five recommendations ranked by priority

Quantitative criteria are easy to validate automatically.

Qualitative Criteria

Qualitative criteria describe expected qualities that may require human judgment.

Examples:

  • Clear
  • Persuasive
  • Beginner-friendly
  • Professional
  • Technically rigorous
  • Actionable
  • Logically organized
  • Neutral in tone

Qualitative criteria should be supported by observable indicators.

Weak qualitative criterion:

Prompt
Make the article beginner-friendly.

Improved qualitative criterion:

Prompt
Define technical terms before using them, avoid unexplained jargon, and include one simple example for every major concept.

Binary and Scored Success Criteria

Binary Criteria

Binary criteria produce a yes-or-no evaluation.

Examples:

  • Does the response contain exactly five recommendations?
  • Is the output valid JSON?
  • Are all required sections present?
  • Does the code avoid third-party libraries?
  • Is every input record processed?

Binary criteria are useful for automated validation.

Scored Criteria

Scored criteria evaluate quality across a scale.

Example evaluation rubric:

CriterionWeightEvaluation
Technical accuracy30%1 to 5
Completeness25%1 to 5
Practical usefulness20%1 to 5
Clarity15%1 to 5
Format compliance10%Pass or fail

A response may be considered successful when:

  • No critical criterion fails
  • The total score is at least 80 percent
  • Technical accuracy receives at least 4 out of 5
  • Format compliance passes

Hard Criteria and Soft Criteria

Hard Criteria

Hard criteria are mandatory. Failure to satisfy even one may make the entire response unacceptable.

Examples:

  • Return valid JSON.
  • Do not expose personal data.
  • Use Java 21 syntax.
  • Include all required fields.
  • Do not exceed 500 words.

Soft Criteria

Soft criteria improve output quality but may allow limited flexibility.

Examples:

  • Prefer concise sentences.
  • Use practical examples where possible.
  • Maintain a conversational tone.
  • Minimize repetition.
  • Prefer active voice.

Prompt example:

Prompt
Hard criteria:
Return valid JSON.
Include id, question, options, correctAnswer, and explanation.
Provide exactly four options.
Do not include Markdown.
Soft criteria:
Keep explanations concise.
Use realistic interview questions.
Avoid overly obvious distractors.

Separating hard and soft criteria helps the model prioritize correctly.

Positive and Negative Success Criteria

Positive Criteria

Positive criteria state what the output must contain or achieve.

Examples:

  • Include three examples.
  • Explain the reasoning.
  • Provide a summary.
  • Add validation steps.
  • Use a professional tone.

Negative Criteria

Negative criteria state what the output must avoid.

Examples:

  • Do not repeat the same recommendation.
  • Do not invent missing data.
  • Do not use deprecated methods.
  • Do not include irrelevant history.
  • Do not expose confidential information.

A balanced prompt often includes both types.

Example:

Prompt
Include one practical example for each concept.
Explain every technical term.
Do not use deprecated Java APIs.
Do not repeat definitions across sections.
Do not assume knowledge beyond basic Java syntax.

Outcome-Based Success Criteria

Outcome-based criteria focus on what the user should be able to do after reading the response.

Examples:

  • The reader should be able to implement the solution.
  • The student should be able to distinguish two related concepts.
  • The developer should be able to reproduce the configuration.
  • The interviewer should be able to evaluate the candidate.
  • The customer should understand the product’s primary benefit.

Prompt example:

Prompt
Create a tutorial on Java Stream API filtering.
Explain the filter operation.
Include examples with numbers and custom objects.
Explain predicate composition.
Include common mistakes.
The tutorial is successful only if the reader can write and debug a basic filtering pipeline independently.

Outcome-based criteria are particularly useful for educational, procedural, and decision-support prompts.

Process-Based Success Criteria

Process-based criteria define the method the response should follow.

Examples:

  • Analyze the problem before recommending a solution.
  • Compare available alternatives.
  • State assumptions.
  • Evaluate risks.
  • Rank recommendations.
  • Provide implementation steps.
  • End with a verification checklist.

Prompt example:

Prompt
Evaluate three database options for a Java application.
First identify the application requirements.
Then compare the databases using the same criteria.
State assumptions before making a recommendation.
Explain the trade-offs of the selected option.
The response is successful only if the final recommendation follows logically from the comparison.

How to Write Effective Success Criteria

Step 1: Identify the Real Objective

Determine what the user ultimately wants to achieve.

A task may ask for an article, but the real objective may be:

  • Teaching a beginner
  • Preparing for an interview
  • Producing publishable content
  • Generating executable code
  • Supporting a business decision
  • Fixing a technical issue

The success criteria should evaluate the real objective, not only the surface-level output.

Step 2: Identify Mandatory Content

List the information that cannot be omitted.

Example:

Prompt
The answer must define caching.
It must explain cache hits and misses.
It must cover expiration and invalidation.
It must include one implementation example.

Step 3: Define Quality Expectations

Specify how the content should be communicated.

Example:

Prompt
Use clear technical language.
Explain unfamiliar terminology.
Avoid unnecessary repetition.
Organize the response from foundational concepts to advanced details.

Step 4: Add Measurable Limits

Define relevant quantities.

Example:

Prompt
Use between 1,000 and 1,500 words.
Include exactly five best practices.
Provide at least two code examples.
Use no more than six main sections.

Step 5: Define Failure Conditions

State what would make the output unacceptable.

Example:

Prompt
The response is unsuccessful if it uses deprecated APIs, omits error handling, or provides code that contradicts the explanation.

Failure conditions are useful when common model errors are predictable.

Step 6: Resolve Priority Conflicts

Explain which criterion takes priority when instructions compete.

Example:

Prompt
Prioritize technical accuracy over brevity.
Prioritize the supplied documentation over general knowledge.
Prioritize security over implementation convenience.

Step 7: Make the Criteria Testable

Convert subjective expectations into observable checks.

Instead of:

Prompt
Make it useful.

Use:

Prompt
Include implementation steps, expected results, common failure cases, and a final verification checklist.

Step 8: Keep the Criteria Relevant

Do not overload the prompt with unnecessary evaluation rules.

Each success criterion should directly improve:

  • Accuracy
  • Completeness
  • Usability
  • Safety
  • Format
  • Audience alignment
  • Task completion

Success Criteria Formula

A practical formula is:

Success Criteria = Required Content + Quality Standard + Format Compliance + Constraint Compliance + Intended Outcome

Example:

Prompt
Required content: Explain constructor injection, setter injection, and field injection.
Quality standard: Use technically accurate and beginner-friendly language.
Format compliance: Use Markdown headings and one comparison table.
Constraint compliance: Keep the response under 1,200 words and avoid deprecated practices.
Intended outcome: The reader must be able to select the appropriate injection type for a Spring Boot component.

General Success Criteria Template

Prompt
Success criteria:
The response must complete every requested task.
The response must include all mandatory sections.
The information must be technically accurate.
The explanation must match the knowledge level of the target audience.
Every major recommendation must include supporting reasoning.
All examples must be relevant to the topic.
The output must follow the required format exactly.
All stated constraints must be respected.
Unsupported assumptions must be clearly identified.
The response must enable the reader to perform the intended action.

Technical Article Success Criteria Template

Prompt
Success criteria:
The article must define the topic clearly.
The article must explain the core concepts in logical order.
The article must include practical examples.
The article must include important rules and best practices.
The article must explain common mistakes.
The article must avoid unnecessary repetition.
The article must use technically accurate terminology.
The article must be understandable to the specified audience.
The article must follow the requested Markdown structure.
The article must be complete enough to understand without external references.

Code Generation Success Criteria Template

Prompt
Success criteria:
The code must use the specified programming language and version.
The code must compile without syntax errors.
The implementation must satisfy all functional requirements.
The implementation must handle the defined edge cases.
The code must not change required public interfaces.
The code must avoid prohibited libraries.
The code must include meaningful names.
The code must include appropriate error handling.
The explanation must remain consistent with the implementation.
The solution must pass all supplied test cases.

Data Analysis Success Criteria Template

Prompt
Success criteria:
The analysis must use only the supplied data.
The analysis must process every required field.
Missing values must be identified and handled explicitly.
Calculations must be reproducible.
Findings must be separated from assumptions.
Every major conclusion must be supported by data.
The output must include the required metrics.
The summary must not contradict the detailed analysis.
Limitations must be clearly stated.
Recommendations must be connected to the findings.

Content Writing Success Criteria Template

Prompt
Success criteria:
The content must address the intended audience.
The primary message must be clear within the opening section.
The content must use the requested tone.
Important benefits must be explained using specific language.
Unsupported or misleading claims must be avoided.
The content must contain a clear call to action.
The content must remain within the specified length.
The final text must be ready to publish without structural editing.

Interview Preparation Success Criteria Template

Prompt
Success criteria:
Every question must be relevant to the selected role and experience level.
Every answer must be technically accurate.
Answers must be concise enough for an interview.
Important keywords must be included naturally.
Practical project-based examples must be provided where relevant.
Duplicate questions must be avoided.
Common follow-up questions must be included.
Outdated technologies and deprecated practices must be excluded.
The candidate must be able to use the content for direct interview revision.

Practical Example: Weak Prompt

Prompt
Write an article about prompt engineering.

Problems with this prompt:

  • The audience is unknown.
  • The expected length is unknown.
  • Required topics are not listed.
  • The output format is not defined.
  • The desired depth is unclear.
  • There is no evaluation method.
  • The intended outcome is unspecified.

Practical Example: Improved Prompt

Prompt
Act as a prompt engineering instructor.
Write a technical article about success criteria in prompt engineering.
Target beginner and intermediate AI users.
Define success criteria and explain why they are important.
Explain content, accuracy, format, audience, actionability, and safety criteria.
Include practical prompt examples.
Compare weak and strong criteria.
Include common mistakes and a final checklist.
Use Markdown headings and bullet points.
Avoid unnecessary repetition.
Keep the explanation technically accurate and easy to understand.
Success criteria:
The article must explain how to create measurable and testable evaluation conditions.
Every major concept must include at least one practical example.
The reader must be able to add success criteria to a prompt after reading the article.
The article must be complete enough to use without external references.

Practical Example: Software Debugging Prompt

Prompt
Act as a senior Java developer.
Analyze the supplied Spring Boot error.
Identify the most likely root cause.
Explain the evidence supporting the diagnosis.
Provide a step-by-step fix.
Include a corrected code example.
Explain how to verify the fix.
Do not invent configuration values that are not present in the input.
Success criteria:
The diagnosis must be consistent with the supplied stack trace.
The solution must address the root cause rather than only suppressing the error.
The corrected example must use valid Spring Boot syntax.
The verification steps must show how to confirm that the issue is resolved.
Any assumption must be clearly labeled.

Practical Example: JSON Generation Prompt

Prompt
Generate five Java interview questions.
Return valid JSON only.
Use the properties id, question, options, correctAnswer, difficulty, category, and explanation.
Provide exactly four options for each question.
Use A, B, C, and D as option identifiers.
Do not include Markdown.
Do not include comments.
Success criteria:
The output must be valid parseable JSON.
Every object must contain all required properties.
Every question must contain exactly one correct answer.
The correctAnswer value must match one available option.
No two questions may test the same concept.
Every explanation must justify why the selected answer is correct.

Practical Example: Business Recommendation Prompt

Prompt
Act as a business strategy consultant.
Compare three monetization models for a programming education website.
Evaluate advertising, affiliate marketing, and paid courses.
Compare revenue potential, implementation effort, scalability, risk, and time to profitability.
State all assumptions.
Rank the options.
Recommend a phased strategy.
Success criteria:
All three models must be evaluated using the same criteria.
The recommendation must follow from the comparison.
Risks must be included for every model.
Assumptions must be separated from known facts.
The final strategy must include immediate, medium-term, and long-term actions.

Practical Example: Summarization Prompt

Prompt
Summarize the supplied technical document.
Preserve the main argument.
Include key decisions, risks, dependencies, and action items.
Do not add information that is not present in the document.
Use no more than 500 words.
Success criteria:
Every major decision from the document must appear in the summary.
Every action item must include its owner when the owner is available.
Unresolved risks must not be omitted.
The summary must not introduce unsupported conclusions.
The output must remain within the word limit.

Practical Example: Educational Prompt

Prompt
Teach Java method overloading to a beginner.
Start with a simple definition.
Explain the compile-time method selection process.
Include three valid examples.
Include two invalid examples.
Compare overloading with overriding.
Add five interview questions.
Success criteria:
The learner must be able to identify whether two methods are valid overloads.
The examples must demonstrate changes in parameter count, parameter type, and parameter order.
The explanation must clarify that changing only the return type does not create valid overloading.
The comparison with overriding must be technically accurate.

Common Mistakes When Defining Success Criteria

Using Vague Words

Weak examples:

  • Make it excellent.
  • Make it engaging.
  • Provide a high-quality answer.
  • Make it professional.
  • Explain it properly.

These phrases do not explain how quality should be evaluated.

Improved version:

Prompt
Use a professional tone, avoid slang, support each recommendation with reasoning, and organize the response using clear headings.

Defining Too Many Criteria

An excessive number of criteria can make a prompt difficult to follow.

Problems may include:

  • Conflicting instructions
  • Reduced attention to critical requirements
  • Longer and less focused output
  • Difficulty identifying priorities
  • Higher risk of partial compliance

Use only criteria that materially affect the desired outcome.

Mixing Criteria with Background Information

Background information explains the situation. Success criteria evaluate the result.

Background:

Prompt
The company is preparing a Java course for final-year students.

Success criterion:

Prompt
The course outline must cover the Java topics commonly required for entry-level developer interviews.

Using Criteria That Cannot Be Verified

Weak criterion:

Prompt
The model must deeply understand the problem.

Improved criterion:

Prompt
The response must identify the root cause, explain the supporting evidence, evaluate alternative causes, and provide verification steps.

Ignoring Trade-Offs

Some criteria can conflict.

Examples:

  • Completeness versus conciseness
  • Creativity versus strict factual accuracy
  • Simplicity versus technical depth
  • Speed versus comprehensive analysis

Define the priority:

Prompt
Prioritize factual accuracy and completeness over brevity.

Focusing Only on Format

A response may follow the correct format while containing weak or inaccurate content.

Incomplete criteria:

Prompt
Return a table with five columns.

Better criteria:

Prompt
Return a table with five specified columns.
Each row must represent one unique recommendation.
Every recommendation must include evidence, expected benefit, implementation effort, and risk.

Failing to Define Error Handling

Prompts involving incomplete data should specify what the model should do when information is unavailable.

Example:

Prompt
Do not guess missing values.
Mark missing information as Not provided.
Clearly state which conclusions cannot be made because of incomplete data.

Creating Conflicting Success Criteria

Conflicting criteria create unpredictable results.

Example conflict:

Prompt
Explain every concept in complete detail.
Keep the entire answer under 100 words.

Resolve the conflict by changing the scope:

Prompt
Explain the three most important concepts in under 300 words.

Assuming the Model Understands Business Meaning

The model may not know what success means for a specific organization.

Weak criterion:

Prompt
Recommend the best solution for the business.

Improved criterion:

Prompt
Recommend the solution that minimizes implementation cost, can launch within four weeks, requires no additional full-time staff, and supports at least 10,000 monthly users.

Evaluation Checklist for Success Criteria

Use the following checklist before finalizing a prompt:

  • Is each criterion connected to the main objective?
  • Can the criterion be verified from the final response?
  • Are mandatory and optional criteria separated?
  • Are measurable limits included where appropriate?
  • Are technical accuracy expectations defined?
  • Is the required content coverage clear?
  • Is the output format testable?
  • Is the target audience reflected in the criteria?
  • Are unacceptable outcomes identified?
  • Are missing-data rules defined?
  • Are assumptions required to be labeled?
  • Are conflicting priorities resolved?
  • Are security or safety requirements included where necessary?
  • Is the intended practical outcome clear?
  • Can a reviewer determine whether the response passed or failed?

Success Criteria Review Table

AreaEvaluation Question
ObjectiveDoes the output achieve the actual user goal?
ContentAre all mandatory topics included?
AccuracyAre the statements technically correct?
CompletenessHas any required part been omitted?
AudienceIs the explanation appropriate for the intended reader?
FormatDoes the output follow the required structure?
ConstraintsWere all limitations respected?
ConsistencyDo the examples, explanations, and conclusions agree?
ActionabilityCan the user apply the response directly?
SafetyAre important risks and boundaries handled correctly?
EvidenceAre conclusions supported by the supplied information?
OutcomeCan the user perform the intended task after reading the response?

Best Practices

  • Define success before asking the model to generate the response.
  • Use observable conditions instead of subjective adjectives.
  • Combine quantitative and qualitative criteria.
  • Separate hard requirements from preferences.
  • Prioritize criteria when conflicts are possible.
  • Include failure conditions for predictable model errors.
  • Match the criteria to the target audience.
  • Define how missing or uncertain information should be handled.
  • Use the same terminology in requirements and evaluation criteria.
  • Keep the criteria focused on the desired business or learning outcome.
  • Review generated outputs against the criteria before accepting them.
  • Refine criteria when repeated output problems appear.
  • Convert important criteria into automated validations where possible.

Advanced Technique: Evaluation Rubric

For complex tasks, use a scoring rubric instead of a simple checklist.

Example:

Prompt
Evaluation rubric:
Technical accuracy: 30 points
Completeness: 25 points
Practical usefulness: 20 points
Clarity: 15 points
Format compliance: 10 points
Passing conditions:
The total score must be at least 80 points.
Technical accuracy must receive at least 24 points.
No mandatory section may be missing.
Format compliance must receive all 10 points.

A rubric is helpful for:

  • Comparing multiple AI responses
  • Evaluating content at scale
  • Reviewing generated articles
  • Selecting the best prompt version
  • Building automated evaluation systems
  • Creating quality assurance workflows

Advanced Technique: Acceptance Tests

Acceptance tests describe specific examples the output must satisfy.

Example for a classification prompt:

Prompt
Acceptance tests:
Input: The application crashes after login.
Expected category: Software defect
Input: Please add dark mode.
Expected category: Feature request
Input: How do I reset my password?
Expected category: Support question
The response is successful only if all acceptance tests are classified correctly.

Acceptance tests are especially useful for:

  • Data extraction
  • Classification
  • Code generation
  • Structured output
  • Transformation tasks
  • Workflow automation

Advanced Technique: Self-Validation Instructions

A prompt may ask the model to verify its response before finalizing it.

Example:

Prompt
Before producing the final answer, verify that:
Every required section is present.
All examples follow the specified format.
No prohibited content is included.
The final recommendation is supported by the analysis.
The response remains within the word limit.
Output only the final verified answer.

Self-validation does not guarantee correctness, but it can reduce omissions and formatting errors.

Advanced Technique: Multi-Level Success Criteria

Complex prompts can define criteria at multiple levels.

Task-level criteria

  • The overall objective must be achieved.

Section-level criteria

  • Each section must contain specified information.

Item-level criteria

  • Every generated item must satisfy the required schema.

Output-level criteria

  • The complete result must follow the requested format.

Example:

Prompt
Task-level criterion:
Create a complete Java interview preparation module.
Section-level criterion:
Each topic must include a definition, example, best practice, and interview question.
Item-level criterion:
Every question must include one correct answer and a technical explanation.
Output-level criterion:
Use Markdown headings and maintain consistent terminology throughout.

Advanced Technique: Automated Validation

Certain success criteria can be checked programmatically.

Examples include:

  • JSON schema validation
  • Required field validation
  • Word-count validation
  • Duplicate detection
  • Code compilation
  • Unit tests
  • Regular-expression checks
  • Link validation
  • Data type validation
  • Range validation

Example:

Prompt
Success criteria:
The response must be valid JSON.
The response must match the supplied JSON Schema.
The questions array must contain exactly 20 objects.
Each object must contain four options.
The id values must be unique.
The difficulty value must be easy, medium, or hard.

These conditions can be tested automatically after generation.

Relationship Between Success Criteria and Prompt Iteration

Success criteria support systematic prompt improvement.

The process is:

  1. Define the task.
  2. Define success criteria.
  3. Generate the response.
  4. Evaluate the response.
  5. Identify failed criteria.
  6. Modify the prompt.
  7. Generate a new response.
  8. Compare the results.

For example, suppose generated articles repeatedly omit practical examples.

Add a new criterion:

Prompt
Every major section must include at least one practical example.

If responses contain repeated explanations, add:

Prompt
Each concept must be explained once in its most relevant section.
Later sections may reference the concept but must not repeat the full explanation.

Success criteria therefore act as feedback signals during prompt optimization.

Final Reusable Prompt Template

Prompt
Role:
Act as a qualified expert in the relevant subject.
Task:
Complete the specified task using the supplied context and input.
Context:
Use the provided background information to understand the objective.
Target audience:
Write for the specified audience and knowledge level.
Content requirements:
Include every mandatory topic and required explanation.
Output requirements:
Follow the requested structure, format, length, and style.
Constraints:
Respect all technical, legal, safety, and formatting limitations.
Success criteria:
The response must complete the requested task fully.
The information must be accurate and internally consistent.
Every required section must be present.
The explanation must be appropriate for the target audience.
Examples must be relevant and technically correct.
All output-format rules must be followed exactly.
Unsupported assumptions must be clearly labeled.
Missing information must not be invented.
Important recommendations must include supporting reasoning.
The final output must enable the user to achieve the intended objective.

Quick Revision Notes

  • Success criteria define what a successful AI response looks like.
  • They convert general expectations into testable conditions.
  • Requirements describe what to produce.
  • Success criteria describe how the output will be evaluated.
  • Strong criteria are specific, measurable, relevant, achievable, unambiguous, and observable.
  • Criteria may evaluate content, accuracy, completeness, format, audience suitability, safety, consistency, and actionability.
  • Hard criteria are mandatory, while soft criteria express preferences.
  • Positive criteria define what to include.
  • Negative criteria define what to avoid.
  • Quantitative criteria use numbers or limits.
  • Qualitative criteria should include observable quality indicators.
  • Outcome-based criteria focus on what the user should be able to achieve.
  • Acceptance tests and evaluation rubrics are useful for complex tasks.
  • Success criteria improve prompt testing, iteration, consistency, and reliability.

Conclusion

Success criteria are a critical part of an effective prompt because they define the standard against which the generated response will be judged.

A task instruction tells the model what to do. Success criteria tell the model what successful completion means.

Well-designed success criteria improve technical accuracy, completeness, consistency, audience alignment, format compliance, and practical usefulness. They also make prompt evaluation more objective by replacing vague expectations with observable conditions.

The most effective success criteria focus not only on the appearance of the response but also on its real outcome. A response should not merely look complete. It should help the user understand, decide, implement, verify, or act successfully.

Frequently Asked Questions

What are success criteria in prompt engineering?

Success criteria are measurable or observable conditions used to evaluate whether an AI response has fulfilled the prompt correctly. They define what information must be included, how accurate the response must be, and what would make the output unacceptable.

What is the difference between requirements and success criteria?

Requirements describe what the model should do, such as "include five REST API security practices." Success criteria describe how to determine whether it did it successfully, such as "each practice must include a clear explanation, implementation guidance, and the security risk it addresses."

What makes a success criterion effective?

Effective criteria are specific, measurable, relevant, achievable, unambiguous, and observable. A weak criterion like "the answer should be good" should be replaced with an observable one, such as "the answer must include one practical example for every major section."

What is the difference between hard and soft success criteria?

Hard criteria are mandatory, and failing even one can make the entire response unacceptable, such as "return valid JSON." Soft criteria improve quality but allow flexibility, such as "prefer concise sentences." Separating the two helps the model prioritize correctly.

What is the difference between quantitative and qualitative success criteria?

Quantitative criteria can be measured numerically, such as "between 1,000 and 1,500 words." Qualitative criteria describe expected qualities that may require human judgment, such as "beginner-friendly," and should be supported by observable indicators to avoid being too subjective.

What is an evaluation rubric?

An evaluation rubric scores a response across weighted categories, such as technical accuracy, completeness, and clarity, with defined passing conditions like a minimum total score. It is useful for comparing multiple AI responses or building automated quality assurance workflows.

What are acceptance tests in prompt engineering?

Acceptance tests describe specific input-output examples the response must satisfy, such as confirming a classification prompt correctly categorizes a defined set of sample inputs. They are especially useful for classification, extraction, and structured-output tasks.

Why should success criteria include failure conditions?

Failure conditions state what would make the output unacceptable, such as "the response is unsuccessful if it uses deprecated APIs or omits error handling." Defining them explicitly is useful whenever common model errors are predictable.

How do success criteria support prompt iteration?

Success criteria act as feedback signals during prompt optimization: generate a response, evaluate it against the criteria, identify which criteria failed, and modify the prompt accordingly, such as adding a criterion requiring a practical example if generated articles keep omitting them.

What is a common mistake when writing success criteria?

Common mistakes include using vague, unverifiable words like "excellent" or "engaging," defining too many criteria at once, and creating conflicting criteria, such as requiring complete detail while also enforcing a very short word limit, without resolving which one takes priority.