Generative AI Use Case: Creating and Fixing Students' Computer Coding

Generative AI Use Case: Creating and Fixing Students' Computer Coding

Applicable Course/Department/Division

Computer Science/STEM

Specific AI Technology

ChatGPT/Microsoft Copilot


In 2023, Harvard professor David Malan and colleagues introduced a ChatGPT "bot" in Harvard's flagship Intro to Computer Science course. Students are encouraged to utilize the resource for help when they're stuck, or when they want to review their code for errors, missing tags, etc. "Harvard is using the technology to help students understand lines of code and advise them on why and how to improve their code's style. It is also used to answer frequently asked questions."
A screenshot example of the AI output response to a student's query:
A look at the AI Harvard uses for its CS50 course


  1. Decide on parameters of use - what types of questions or problems do you want your students to plug into the AI generator? You can be as narrowly prescriptive or as open as you see fit. Clearly communicate those parameters to your students.
  2. Idea: Incorporate the plugging in of a prompt and getting the output as a step in a coding assignment or project.
  3. For information and guidance on generative AI prompts, check out this Knowledge Base article.
  4. Idea: Utilize the AI generator as a go-to for students when they need help and you aren't available. Consider it as an AI teaching assistant.
  5. You will likely want to review the output or answers the AI generator produces for accuracy. And, it's a good idea to remind your students that AI is still known to produce occasional inaccurate information, and that they should be wary of that.

Potential Benefits to Students

  1. Exposure to and practice with real-world application of AI.
  2. Help with coding struggles when their instructor is not available, allowing them to quickly troubleshoot.
  3. Gaining experience with refining prompts to plug into an AI generator to achieve desired, optimal output.

Interested in trying?

    • Related Articles

    • The Prompt is Key: How to Ensure the Most Useful Generative AI Output

      Background A professor at the University of Iowa is teaching students how to get better results from an AI generator through an assignment centered around the prompts entered in to the generator. Instead of trying to prohibit her students from using ...
    • Artificial Intelligence (AI) Detection Tools

      Generative AI and AI Detection The use of generative artificial intelligence (AI) tools has proliferated quickly. ChatGPT, for example, is an application that produces written text at a desired length, format, and style, depending on the user’s ...
    • How do I use TurnItIn for AI detection in student writing assignments?

      What is TurnItIn? TurnItIn is an application used to gauge the authenticity of written text, and to flag plagiarism in student writing. It compares the text in question against a vast database of existing writing and delivers a % score (the higher ...
    • Creating a Discussion Forum and Topic in D2L

      Creating a Discussion Forum in D2L You can use forums to organize your discussion topics in categories. In addition, your course can have multiple forums. 1. To create a new forum, click on "Discussions" from the communications dropdown menu, as ...
    • Creating Awards in D2L BrightSpace

      Awards are way to give kudos to students for accomplishing certain tasks in D2L Brightspace.  Giving an Award 1. Log into D2L Brightspace and go to Assessments – Awards in one of your classes.  2. Click Course Awards.   3. D2L Brightspace includes ...