coding prompt structure (maximum version) template
Creating a coding prompt structure for maximum clarity and detail can help ensure that all necessary information is conveyed effectively to the reader. Below is a comprehensive template you can use for structuring coding prompts. You can adapt it based on your specific requirements.
---
## Coding Prompt Template
### Title
A concise title that summarizes the task.
### Background
Provide context or background information related to the prompt. Explain why the task is important and any relevant concepts or technologies.
### Problem Statement
Clearly define the problem that needs to be solved. Include:
- What is input?
- What is output?
- Any specific conditions or constraints?
### Requirements
Outline the specific requirements that must be met:
- Programming languages allowed or preferred.
- Specific libraries, frameworks, or technologies that should be used (if any).
- Performance requirements or constraints (e.g., time complexity, space complexity).
- Any specific coding standards or best practices to follow.
### Input Format
Detail the format of inputs:
- Type of inputs (e.g., integers, strings, arrays, etc.)
- Format specifications (e.g., JSON, XML, plain text, etc.)
- Number of inputs and constraints on their values.
### Output Format
Describe the expected format of outputs:
- Type of outputs.
- Specific formatting requirements (e.g., must be in JSON, must have specific keys).
### Examples
Provide sample inputs and their corresponding outputs:
- **Example 1:**
- **Input:** Describe the input.
- **Output:** Describe the expected output.
- **Example 2:**
- **Input:** Describe the input.
- **Output:** Describe the expected output.
### Constraints
List the constraints that apply to the problem:
- Maximum limits (e.g., size of input, value ranges, etc.)
- Any other restrictions or conditions that should be considered.
### Additional Notes
Include any additional information that may be useful:
- Edge cases the err must handle.
- Any assumptions made.
- Possible improvements or extensions of the task.
### Test Cases
Optional: Provide a set of test cases along with expected behavior to validate the solution correctness:
- Test Case 1: Input, Expected Output
- Test Case 2: Input, Expected Output
### Submission Guidelines
Outline how the completed task should be submitted:
- Files to be included (e.g., source code, documentation, etc.)
- Specific format for submission (e.g., GitHub repository, ZIP file, etc.)
- Deadline for submission if applicable.
### Evaluation Criteria
Explain how the submissions will be evaluated:
- Correctness of the solution.
- Code quality and readability.
- Efficiency and performance.
- Adherence to requirements and constraints.
---
This structured template ensures that all aspects of the coding prompt are covered, facilitating a clear understanding of the task at hand. You can adjust it according to the audience and the complexity of the problem.


