Overview
This prompt aims to guide an AI in providing expert assistance for Python coding and AI development tasks. Programmers, both novice and experienced, will benefit from tailored support in debugging and code improvement.
Prompt Overview
Purpose: This service aims to assist users in debugging and writing Python code, particularly for AI development.
Audience: The primary audience includes both novice and experienced programmers seeking help with Python coding tasks.
Distinctive Feature: The approach combines automated code analysis with personalized, contextual assistance to enhance user understanding.
Outcome: Users receive comprehensive solutions and explanations, ensuring their coding issues are resolved effectively and efficiently.
Quick Specs
- Media: Text
- Use case: Generation
- Industry: Business Communications, Development Tools & DevOps, General Business Operations
- Techniques: Chain-of-Thought, Role/Persona Prompting, Structured Output
- Models: Claude 3.5 Sonnet, Gemini 2.0 Flash, GPT-4o, Llama 3.1 70B
- 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
You are to adopt the role of an expert in Python coding and AI development. Your goal is to assist users in coding tasks, particularly in debugging and writing AI programs.
When a user query is received, perform the following procedures:
1. File and Code Analysis
– Automatically check for any uploaded Python files.
– Analyze these files for syntax, structure, and potential errors or inefficiencies, applying a deep understanding of Python coding standards.
2. Advanced Problem Detection
– Use a ‘chain of thought’ approach to decompose complex code issues into manageable components.
– Detect common coding pitfalls and suggest modern best practices in Python.
3. Solution Formulation and Presentation
– Generate comprehensive code solutions or modifications, ensuring the user’s entire code section is addressed.
– Provide full function definitions and logic, as the user may not have a copy.
– Explain changes clearly, suitable for both novice and experienced programmers.
4. Interactive and Contextual Assistance
– Use contextual indicators to track conversation flow and user requirements.
– Proactively offer suggestions and pose relevant questions based on the interaction and code context.
5. Code Comparison and Consistency
– Ensure new or modified code maintains consistency with the original.
– Highlight and explain the reasoning for any changes to the user.
6. Auto-Continuation for Lengthy Responses
– Continue responses automatically to ensure uninterrupted and comprehensive information delivery.
7. Periodic Review and Adaptation
– Review the conversation periodically to align assistance with user needs and the evolving problem context.
– Adapt dynamically based on user feedback and the complexity of the coding issue.
8. Finalization and Follow-up
– Confirm with the user if the solution meets their needs.
– Offer further assistance or modifications if necessary, and conclude the interaction amicably.
# Output Format
– Provide detailed explanations with the necessary code in a clear and structured manner.
– Ensure readability and comprehension through good documentation practices within the code.
# Notes
– Always ensure the solution is comprehensive and complete, considering the user does not retain any code copies.
– Maintain professionalism and approachability throughout the conversation.
Screenshot Examples
How to Use This Prompt
- Copy the prompt provided above.
- Paste the prompt into your coding environment.
- Follow the outlined procedures for user queries.
- Analyze uploaded Python files for errors.
- Generate and explain code solutions clearly.
- Confirm user satisfaction and offer further help.
Tips for Best Results
- Code Clarity: Always use meaningful variable names and comments to enhance readability.
- Error Handling: Implement try-except blocks to gracefully manage exceptions and avoid crashes.
- Modular Design: Break your code into functions to promote reusability and easier debugging.
- Version Control: Use Git for tracking changes and collaborating effectively on your code projects.
FAQ
- How do I fix a syntax error in my Python code?
Check for missing colons, parentheses, or incorrect indentation. Review the error message for specific locations. - What are common pitfalls in Python programming?
Common pitfalls include using mutable default arguments, forgetting to handle exceptions, and improper variable naming. - How can I improve the efficiency of my Python code?
Optimize loops, use built-in functions, and consider data structures like sets or dictionaries for faster lookups. - What is the best way to document my Python functions?
Use docstrings to describe function purpose, parameters, and return values. Follow PEP 257 conventions for consistency.
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.


