CodeGrade’s AI Assistant is a powerful tool that can be configured to assist students with Python assignments, offering support tailored to your teaching objectives. This document provides a step-by-step guide on setting up the assistant, customizing its behavior, understanding the student experience, and gaining access as a current customer. Let's dive into a Python assignment set up.
Configuring the AI Assistant
Access the Assignment Settings.
Navigate to Manage Assignment > General > AI Assistants within your CodeGrade assignment settings.
Enable the Assistant
Select the AI Assistant(s) you wish to enable for the assignment.
Customize the Programming Language
Once an assistant is selected, ensure that the assistant’s settings are optimized for Python. You can modify or customize the system prompt that is given by default to better suit your needs.
Under System prompt, specify Python as the primary language for assistance.
For example: “You are a Python coding assistant. Help students debug their code, explain Python-specific concepts, and provide examples following Python best practices.”
Save and Enable
Set the assistant’s status to enabled to activate it for students.
Customizing System Prompts
Customizing the system prompts allows you to define the AI Assistant’s behavior, ensuring it aligns with your educational goals. Once you’ve selected an assistant in the settings, go to the System prompt editor to define its purpose. Be clear and specific in your instructions to ensure the assistant aligns with your teaching goals.
For example, for a debugging focus, you might use: "Provide step-by-step explanations for debugging Python code, prioritizing readability and efficiency." If your goal is to emphasize learning, you could specify: "Explain core Python concepts, such as loops, functions, and object-oriented programming, without solving the assignment outright." This customization ensures the assistant provides targeted support tailored to your course needs.
Creative Uses for System Prompts
By default, the AI Assistant uses the following prompt:
“You are a coding assistant.
You may only help users with questions related to programming, coding theory, and software development concepts.
You must inform users that you cannot with unrelated topics.
You must answer clear, accurate, and concise.
You may use markdown syntax.
You explain concepts and provide examples to help users understand coding principles.
You must prioritize clarity, educational value, and adherence to the coding scope.”
While the default prompt is broad and effective, you can customize it to your liking! Here are some additional prompts to add in.
Scenario-based learning
"Act as a mentor teaching Python to a beginner. Use analogies and relatable examples to explain concepts while adhering to Python best practices."
This prompt is ideal for teaching Python in an engaging and accessible way, using real-world comparisons to help beginners grasp complex concepts effortlessly.
Advanced Problem Solving
"Assist with Python performance optimization by suggesting best practices, efficient algorithms, and profiling techniques."
This prompt focuses on helping users optimize their Python code by exploring advanced strategies, making their programs faster and more resource-efficient.
Error Analysis
"Identify and explain common Python errors in the provided code. Include suggestions for correction and insights into how these errors can be avoided in the future."
This prompt is tailored to guide users in understanding and correcting common Python mistakes while offering preventive tips for future coding.
Debugging Assistance
"Help students debug Python code by breaking down the issues step-by-step and suggesting clear, logical solutions."
This prompt is designed to provide a structured approach to debugging, empowering users to identify and fix problems with confidence.
Algorithm Design
"Guide students through the process of designing and implementing algorithms in Python. Provide examples and tips for improving efficiency and readability."
This prompt supports users in creating well-structured algorithms, focusing on enhancing their problem-solving skills and code quality.