Prompt Challenges

🟡

Instruction Following

MediumPrompt Engineering Challenge

Ensure models strictly follow complex instructions

Challenge Description

In prompt engineering, ensuring that the AI accurately understands and follows complex instructions is crucial. Especially in multi-step tasks, scenarios with specific formatting requirements, or where precise control over the output is needed, the quality of instruction following directly impacts the result. This challenge requires you to design a prompt that enables the AI to strictly follow a series of complex instructions, even if they seem contradictory or have a special execution order.

Challenge Goals

Write a prompt that enables the AI to:

  1. Accurately understand multi-step, multi-conditional complex instructions
  2. Execute instructions in the specified priority and order
  3. Make reasonable judgments when instructions are unclear
  4. Fully comply with formatting requirements and output restrictions
  5. Handle seemingly contradictory instructions (e.g., conditional rule exceptions)

Requirements

  • The prompt must contain a clear hierarchy and priority of instructions
  • The output must strictly conform to the specified format
  • The instructions should include some special conditions or exceptions
  • The prompt should be able to guide the AI to make reasonable judgments in complex scenarios
  • There should be a clear verification mechanism after the task is completed

Prompt Template

[Your prompt here]

Task: {Task description}

Automated Testing Process

  1. For each test case, use your prompt with the specified task as input
  2. Analyze the output for:
    • Compliance with formatting requirements
    • Correct application of rules and exceptions
    • Accurate handling of edge cases and ambiguities
    • Appropriate prioritization of conflicting instructions
  3. Compare with the reference output for each test case
  4. Calculate a final score (out of 5)

Expected Output Example (for Case 1)

[
  {"name": "Wang Gang", "age": 60},
  {"name": "Li Na", "age": 42},
  {"name": "Li Qiang", "age": 35},
  {"name": "Zhang Wei", "age": 37},
  {"name": "Wang Xiaomei", "age": 30}
]

Submit your solution and share your ideas and techniques with the community!

Write Your Prompt

Write your AI prompt based on the requirements

0 / 2000

Tips for Better Prompts

  • Be specific and clear about what you want
  • Provide context and examples when helpful
  • Use appropriate tone and style for your audience
  • Test and iterate to improve your results

Need help? Join our community

View Discussions