1 of 57

AI Tools to Support �a Global Online Learning Community

Rongxin Liu

rongxinliu@cs50.harvard.edu

David J. Malan

malan@harvard.edu

2 of 57

3 of 57

Before We Begin *

  • Sign up for a (free) GitHub account at github.com/signup
  • Sign up for an OpenAI account at platform.openai.com/signup

* Optional if you'd like to (try to!) follow along in real-time!

* If comfortable adding a credit card for OpenAI API access

4 of 57

Agenda

  • Pedagogical Goals
  • Works in Progress
  • Architectural Overview
  • Demonstrations
    • OpenAI APIs
    • OpenAI Assistants Playground
    • Ed, as a student
    • Ed, as a teacher
  • Q&A

5 of 57

ChatGPT et al. are too helpful

6 of 57

Approximate a 1:1 teacher-to-student ratio

7 of 57

Not Reasonable

Using AI-based software �(such as ChatGPT, GitHub Copilot, Bing Chat, et al.) �that suggests or completes answers �to questions or lines of code.

8 of 57

Reasonable

Using CS50's own AI-based software�including the CS50 Duck (ddb) in cs50.ai and cs50.dev.

9 of 57

10 of 57

11 of 57

12 of 57

13 of 57

14 of 57

49K users

20K prompts/day, 1.3M total so far

15 of 57

system prompt

16 of 57

You are a friendly and supportive teaching assistant for CS50. You are also a rubber duck. Answer student questions only about CS50 and the field of computer science; do not answer questions about unrelated topics… Do not provide full answers to problem sets, as this would violate academic honesty…

17 of 57

18 of 57

19 of 57

Visual Studio Code for CS50

20 of 57

Explain highlighted lines of code

21 of 57

22 of 57

23 of 57

24 of 57

25 of 57

26 of 57

Advise students on �how to improve their code's style

27 of 57

28 of 57

29 of 57

30 of 57

Answer (most of the) questions �asked online by students

31 of 57

32 of 57

33 of 57

34 of 57

35 of 57

36 of 57

37 of 57

38 of 57

Explain arcane error messages, �hints how to solve

39 of 57

40 of 57

Provide students with virtual office hours 24/7

41 of 57

CS50.ai

42 of 57

43 of 57

44 of 57

45 of 57

46 of 57

Chatbot + Context

47 of 57

Chatbot + Context

48 of 57

System

User

Assistant

49 of 57

System

User

Assistant

50 of 57

User

Prompt Engineering

Provide examples

Ask the model to adopt a persona

Specify the desired length of the output

Specify the steps required to complete a task

Include details in your query to get more relevant answers

Use delimiters to clearly indicate distinct parts of the input

Assistant

(GPT-4, LLaMA, etc.)

51 of 57

User

Prompt Engineering

Give me a prime number less than 10. For example, 3.

You are a CS50 rubber duck.

Keep your answer in no more than 2 sentences.

Sanitize the text in the following steps…

Use the following information to answer questions.

Explain the codes delimited by triple backticks.

Assistant

(GPT-4, LLaMA, etc.)

52 of 57

OpenAI APIs

Chat Completions

Assistants (beta)

53 of 57

Assistants Playground

54 of 57

Ed Bot Integration

55 of 57

56 of 57

... felt like having a personal tutor… i love how AI bots will answer questions without ego and without judgment, generally entertaining even the stupidest of questions without treating them like they're stupid. it has an, as one could expect, inhuman level of patience.

57 of 57

AI Tools to Support �a Global Online Learning Community

Rongxin Liu

rongxinliu@cs50.harvard.edu

David J. Malan

malan@harvard.edu