Overview
This prompt aims to create structured instructions for AI agents in programming tasks. Programmers and developers will benefit by receiving clear, actionable guidance for code implementation.
Prompt Overview
Purpose: The AI will generate a Python function to calculate Fibonacci numbers efficiently.
Audience: This instruction is intended for AI developers and programmers seeking optimized code solutions.
Distinctive Feature: The focus is on achieving optimal time complexity while adhering to Python coding standards.
Outcome: The AI will produce a function that handles edge cases and meets specified constraints effectively.
Quick Specs
- Media: Text
- Use case: Generation
- Industry: Development Tools & DevOps
- Techniques: Decomposition, Role/Persona Prompting, Structured Output
- Models: GPT-4o
- Estimated time: 5-10 minutes
- Skill level: Beginner
Variables to Fill
No inputs required — just copy and use the prompt.
Example Variables Block
No example values needed for this prompt.
The Prompt
Generate programming-related instructions for an artificial intelligence agent specializing in code implementation.
To design effective AI-driven programming instructions, consider these key components:
– Task Description:
Clearly specify the programming task or function you want the AI to execute.
Ensure it encompasses the problem domain (e.g., code generation, debugging, optimization).
– Constraints & Objectives:
Outline any limitations or goals, such as performance requirements or coding conventions.
Examples include “minimize runtime” or “use Python 3”.
– Inputs & Context:
Provide any information, data, or prior knowledge necessary for the AI to understand the task context.
This may include code snippets, documentation, or specific scenarios.
– Edge Cases & Considerations:
Mention potential edge cases or additional factors to watch for that could affect the outcome.
Examples include handling null values, scalability concerns, or platform-specific issues.
# Example Task
**Domain**: Code Generation
**Objective**:
Develop a function to efficiently calculate Fibonacci numbers up to a given integer `n`.
**Constraints**:
– The solution must be implemented in Python.
– Aim for optimal time complexity.
**Inputs**:
– A single integer `n` where `n >= 0`.
**Edge Cases**:
– Check for cases where `n` is 0 or 1 to return 0 or 1, respectively.
# Output Format
– The output should be a detailed AI prompt for programming, guiding the model to complete a specific task within the programming domain.
By following these guidelines, you can tailor AI-driven programming instructions to suit specific code implementation contexts and requirements.
Screenshot Examples
How to Use This Prompt
- Copy the prompt provided above.
- Identify the programming task you want to address.
- Define constraints and objectives for the task.
- Gather necessary inputs and context for the AI.
- Consider edge cases and additional factors to include.
- Use the structured format to create your AI prompt.
Tips for Best Results
- Task Description: Clearly define the programming task, such as creating a sorting algorithm or implementing a REST API.
- Constraints & Objectives: Specify limitations like language requirements or performance goals, e.g., “must run in O(n log n) time complexity.”
- Inputs & Context: Provide necessary data or examples, including input formats, expected outputs, and any relevant documentation.
- Edge Cases & Considerations: Identify potential issues like handling empty inputs or ensuring compatibility across different platforms.
FAQ
- What is the task for the AI agent?
The task is to develop a function to calculate Fibonacci numbers up to a given integer. - What are the constraints for the implementation?
The solution must be implemented in Python and aim for optimal time complexity. - What inputs does the AI need to consider?
The AI needs to consider a single integer `n` where `n >= 0`. - What edge cases should the AI handle?
The AI should handle cases where `n` is 0 or 1, returning 0 or 1 respectively.
Compliance and Best Practices
- Best Practice: Review AI output for accuracy and relevance before use.
- Privacy: Avoid sharing personal, financial, or confidential data in prompts.
- Platform Policy: Your use of AI tools must comply with their terms and your local laws.
Revision History
- Version 1.0 (February 2026): Initial release.


