
Prompt Engineering for AI-Assisted Coding
Inquiry Framework
Question Framework
Driving Question
The overarching question that guides the entire project.How can we ethically leverage prompt engineering to optimize AI code generation for efficient and responsible software development?Essential Questions
Supporting questions that break down major concepts.- How can prompt engineering enhance AI's ability to generate code?
- What are the key elements of an effective prompt for AI code generation?
- How does prompt engineering improve coding efficiency?
- What are the ethical considerations of using AI-generated code?
Standards & Learning Goals
Learning Goals
By the end of this project, students will be able to:- Students will be able to design effective prompts for AI code generation.
- Students will understand the ethical considerations of using AI-generated code.
- Students will be able to optimize AI code generation for efficiency through prompt engineering.
Entry Events
Events that will be used to introduce the project to students'AI Code Challenge: The Bot Battle'
Students participate in a head-to-head competition where they craft prompts to guide AI in solving coding challenges. The team whose AI generates the most efficient and accurate code wins, sparking immediate engagement with prompt engineering.Portfolio Activities
Portfolio Activities
These activities progressively build towards your learning goals, with each submission contributing to the student's final portfolio.The Ethical Algorithm Architect
Students explore the ethical implications of using AI-generated code, focusing on biases, security vulnerabilities, and responsible deployment. They will analyze case studies and develop guidelines for ethical prompt engineering and code review.Steps
Here is some basic scaffolding to help students complete the activity.Final Product
What students will submit as the final product of the activityA comprehensive ethical guideline document for AI-assisted coding, including a checklist for prompt engineering and code review to ensure responsible and unbiased AI deployment.Alignment
How this activity aligns with the learning objectives & standardsDirectly aligns with the learning goal: 'Students will understand the ethical considerations of using AI-generated code.'Efficiency Engineering Challenge
Students engage in a series of coding challenges where they optimize AI code generation through iterative prompt engineering. They measure coding efficiency based on speed, accuracy, and resource utilization, refining prompts to achieve optimal performance.Steps
Here is some basic scaffolding to help students complete the activity.Final Product
What students will submit as the final product of the activityA portfolio showcasing the iterative prompt engineering process, including the initial prompt, refined prompts, performance data, and a final optimized code solution demonstrating enhanced efficiency.Alignment
How this activity aligns with the learning objectives & standardsAddresses the learning goal: 'Students will be able to optimize AI code generation for efficiency through prompt engineering.'Rubric & Reflection
Portfolio Rubric
Grading criteria for assessing the overall project portfolioPrompt Engineering and Ethical AI Coding Rubric
Prompt Engineering for Efficiency
This category assesses the student's ability to design, refine, and optimize prompts for efficient AI code generation.Initial Prompt Design
Effectiveness of the initial prompt in guiding AI code generation for the given coding challenge.
Exemplary
4 PointsThe initial prompt is exceptionally clear, specific, and directly aligns with the coding challenge, resulting in a strong starting point for AI code generation.
Proficient
3 PointsThe initial prompt is clear, specific, and aligned with the coding challenge, providing a good starting point for AI code generation.
Developing
2 PointsThe initial prompt is somewhat vague or lacks specificity, leading to limited success in AI code generation for the challenge.
Beginning
1 PointsThe initial prompt is unclear, irrelevant, or fails to guide AI code generation effectively.
Iterative Prompt Refinement
Ability to iteratively refine prompts based on performance data to improve coding efficiency (speed, accuracy, resource utilization).
Exemplary
4 PointsDemonstrates exceptional ability to analyze performance data and make insightful prompt refinements, leading to significant improvements in coding efficiency and optimized resource utilization.
Proficient
3 PointsDemonstrates a strong ability to analyze performance data and make effective prompt refinements, leading to noticeable improvements in coding efficiency.
Developing
2 PointsShows some ability to analyze performance data and make prompt refinements, but the impact on coding efficiency is limited.
Beginning
1 PointsStruggles to analyze performance data or make meaningful prompt refinements, resulting in minimal improvement in coding efficiency.
Performance Data Analysis
Accuracy and thoroughness of performance data analysis to identify areas for prompt improvement.
Exemplary
4 PointsProvides a comprehensive and accurate analysis of performance data, identifying key areas for prompt improvement with insightful observations and justifications.
Proficient
3 PointsProvides an accurate analysis of performance data, identifying relevant areas for prompt improvement with clear explanations.
Developing
2 PointsProvides a basic analysis of performance data, but may miss key areas for prompt improvement or lack sufficient detail.
Beginning
1 PointsProvides an incomplete or inaccurate analysis of performance data, failing to identify important areas for prompt improvement.
Optimized Code Solution
Effectiveness and efficiency of the final optimized code solution achieved through prompt engineering.
Exemplary
4 PointsThe final code solution is exceptionally efficient, accurate, and well-optimized, demonstrating a mastery of prompt engineering techniques.
Proficient
3 PointsThe final code solution is efficient, accurate, and optimized, demonstrating a strong understanding of prompt engineering techniques.
Developing
2 PointsThe final code solution is functional but lacks efficiency or optimization, indicating a partial understanding of prompt engineering techniques.
Beginning
1 PointsThe final code solution is incomplete, inefficient, or inaccurate, demonstrating a limited understanding of prompt engineering techniques.
Ethical Considerations and Guidelines
This category assesses the student's understanding of the ethical implications of using AI-generated code and their ability to develop ethical guidelines for prompt engineering and code review.Case Study Analysis
Depth of analysis of case studies related to ethical issues in AI-generated code (biases, security vulnerabilities).
Exemplary
4 PointsDemonstrates an exceptionally thorough and insightful analysis of case studies, identifying complex ethical issues and providing nuanced perspectives on their implications.
Proficient
3 PointsDemonstrates a thorough analysis of case studies, identifying key ethical issues and providing clear explanations of their implications.
Developing
2 PointsShows some understanding of ethical issues in case studies, but the analysis may lack depth or completeness.
Beginning
1 PointsStruggles to understand or analyze the ethical issues presented in the case studies.
Ethical Guideline Development
Quality and comprehensiveness of the ethical guideline document for AI-assisted coding.
Exemplary
4 PointsDevelops a comprehensive and well-articulated ethical guideline document that addresses a wide range of potential ethical concerns with clarity, precision, and actionable recommendations.
Proficient
3 PointsDevelops a clear and well-organized ethical guideline document that addresses key ethical concerns and provides practical recommendations.
Developing
2 PointsDevelops a basic ethical guideline document, but it may lack comprehensiveness, clarity, or specific recommendations.
Beginning
1 PointsDevelops an incomplete or poorly articulated ethical guideline document that fails to address key ethical concerns.
Ethical Checklist for Prompt Engineering
Effectiveness of the checklist in mitigating biases and ensuring responsible code generation.
Exemplary
4 PointsThe checklist is exceptionally thorough, practical, and effectively addresses potential biases and ethical concerns in prompt engineering, promoting responsible code generation.
Proficient
3 PointsThe checklist is thorough, practical, and addresses key biases and ethical concerns in prompt engineering, promoting responsible code generation.
Developing
2 PointsThe checklist is basic and addresses some biases and ethical concerns, but may lack comprehensiveness or practical application.
Beginning
1 PointsThe checklist is incomplete, ineffective, or fails to address key biases and ethical concerns in prompt engineering.
Presentation and Feedback Integration
Effectiveness in presenting ethical considerations to the class and integrating feedback for refinement.
Exemplary
4 PointsPresents ethical considerations with exceptional clarity and confidence, actively solicits feedback, and skillfully integrates suggestions to significantly enhance the ethical guidelines.
Proficient
3 PointsPresents ethical considerations clearly and confidently, solicits feedback, and effectively integrates suggestions to improve the ethical guidelines.
Developing
2 PointsPresents ethical considerations adequately, but may struggle to effectively solicit or integrate feedback for improvement.
Beginning
1 PointsStruggles to present ethical considerations clearly or effectively integrate feedback.