/
Gen ed 1188 course management

Gen ed 1188 course management


higher-level institutional engagement team:
Bridgit Long, HSGE, bridget_long@gse.harvard.edu 
Rakesh Khurana, Harvard College rkhurana@fas.harvard.edu 
Bharat Anand, VPAL banand@hbs.edu 
Rebecca Neeson, SEAS nesson@g.harvard.edu 
Stu Feldman, Schmidt Futures sif@schmidtfutures.com 

course execution team

Chris Stubbs
Logan McCarty
Greg Kestin
Eske Pedersen

some questions (Sept 8 2023)

actions: 
Logan- section times and movie access
Chris- gradescope. read Frankenstein. 
All- make sure Canvas description is up to date and OK. By end of Sept. 
Greg: nanoGPT. 

topicresolution
course structure lectures Tues, 'lab-like' Thursdays. Do panels on Tuesdays. 
HW due Thrus midnight. 
Google forms for in-class
when will first sections meet? Help desk week 1? sections MTW, we know in Nov about sections. 
can Google forms capture HUID? Alternatives? Gradescope does catch HUID. PDFs, word, code...
pre-test and post-test? Yes. 
projects at the end? Yes
mandatory attendance? Yes, sections too.
Course-wide access to HUIT sandbox? TBD
panels every other week? 
Higher Ed
Ethics
Workforce implications
Writing process
IP, patents, and copyrights
Long-term future
Yes
sections - vary between under-the-hood and discussion sections. 
movie night or not? Is there a way to get the students streaming access? Screen twice and otherwise they pay. 
Need to request room for that. 

Technical student implementation: HUIT sandbox via browser

                                                   Jupyter notebook or Jupyterhub

                                                    nanoGPT


guidance for faculty: https://gened.fas.harvard.edu/guidance-faculty 



teaching assistants:

from May 19: 

Dear Professors Stubbs and McCarty,

I write to share the preliminary section allocation for your course, GENED 1188: Catching the Tsunami: Riding the GPT Wave, scheduled to be offered in Spring 2024:

Estimated undergraduate enrollment: 150
Estimated sections: 10
Average section size: 15

 I will confirm your final allocation after the Wednesday, November 15th Course Registration Deadline.  

As a reminder, Gen Ed sections may include only Harvard College students; if you allow graduate enrollees in your course, you are responsible for teaching their sections and completing their grading.

Because you are offering this course for the first time in the renewed Gen Ed program, we are happy to provide you with a Head TF at a rate equivalent to teaching one section. In future terms, your course will be assigned a Head TF only if your course has five or more sections. This role, which provides logistical and administrative assistance and/or course development support, may be assigned to the TF or TA of your choosing. You will find a full position description on theResources for Teaching Staff page of the Gen Ed website.

We hope to process the hires for your teaching staff by the end of October and will reach out again in September to ask you for their names and contact information.

We ask that all Gen Ed faculty give priority to GSAS students who are obligated to teach as part of their financial aid package. If you are in a department that assigns TFs centrally, we ask that you work with your departmental administrator and/or graduate coordinator to identify potential teaching staff members. We are happy to provide recruitment assistance as needed, so please reach out to us at genedcourses@fas.harvard.edu for help finding the best candidates for your course.  

Thank you for your generous commitment to Gen Ed. We are eager to do all we can to support you and your teaching staff. Please don’t hesitate to let us know how we can best be of assistance.   


Best, 

Laura

-------------------

fall term RA: 
You have been approved for up to $2,400 in funds, which will cover the work of an RA for up to 10 hours per week at $30 per hour for 8 weeks of work to take place by no later than December 31, 2023. Please share their name and email address with the Course Coordinators at genedcourses@fas.harvard.edu as soon as possible so they can set up the appointment before your RA begins work.   

 We are excited to see what you and your RA are able to create for the course! I encourage you to reach out to Bok Center Director of Pedagogy Adam Beaver, who stands by ready to assist with Gen Ed course development.  

 ------------------



Catching the Tsunami- Riding the GPT Wave  

Description:

Generative artificial intelligence (GAI) systems such as Chat-GPT have caught the entire world off-guard. They are evolving at a pace that is overwhelming the ability of individuals, organizations, and societies to understand, adjust to, and regulate them. Current-generation GAI tools can write narrative and music, can generate original art, and can write computer programs, all from natural language requests. This class will help you understand the basics of how these generative AI systems work under the hood, and will teach you how to (guardedly) bring them to bear on problems that interest you. We will explore a range of AI applications across the domain of liberal arts and science, and will illustrate ways in which we can harness GAI to enhance learning. We will pay particular attention to the limitations and pitfalls of these tools, both technical and ethical.  We will also explore the likely impact this disruptive technology will have on the economy and the challenges it poses to sustaining a participatory democracy. 

One-sentence summary:

We will take stock of how we are all living through the early stages of the adoption of a highly disruptive technology that promises to impact virtually all aspects of our lives.  

Learning goals. 

Students will:

  1. Be able to describe the basic technology that underpins large language model (LLM) generative artificial intelligence, and how they digest, regurgitate, and fabricate information. 
  2. Be adept with the operation of Chat-GPT4, including the construction of appropriate prompts and be able to guide an iterative progression towards a desired result. 
  3. Appreciate and be able to describe the ethical considerations that surround the use of generative AI tools, including academic and personal integrity, appropriate attribution, and demonstrate a keen awareness of biases that reflect the training set, and have an appreciation of privacy issues. 
  4. Be able to use generative AI tools for a diverse range of applications, including support for text generation, programming, comparative literature, sociology.
  5. Be able to describe, on the basis of personal experience, the strengths and weaknesses of generative-AI-produced human-like text.
  6. Be able to describe the evolution of AI tools in the historical context of comparable disruptive technologies, and make educated conjectures about the likely progression of AI capabilities.  
  7. Gain experience in assessing the validity and provenance of results produced by generative AI tools. 
  8. Critically assess the output of AI-tools in terms of biases, ethical considerations, and equity. 
  9. Be able to use generative-AI tools in team-based projects, and incorporate the output into a final work product. 
  10. Be able to describe the likely impact of generative AI tools across the scope of human endeavor. 


Course Structure: 

The course will comprise a combination of participatory lectures (Tuesdays and Thursdays), weekly small-group discussion sections, as well as assignments, and projects.  We will provide registered students with licenses for the AI tools we use in the course, for the duration of the semester. The course will culminate in a capstone project where students will work in teams to advance their skills in real-world applications of these methods. We’ll also host movie-and-pizza evenings every few weeks  to explore how AI is treated in cinema. 

Prerequisites:

We expect students to be proficient with the operation and use of personal computers, including simple spreadsheets, word processing, and web browsing. No programming experience is necessary. Bring an open mind, a healthy skepticism, and a willingness to explore. You’ll need a laptop or smartphone to participate in class exercises. 

Assessments:

This is an active-participation learning experience. Attendance in lectures and discussion sections is mandatory, with the exception of two unexcused missed class sessions (in any combination of lecture and/or sections). Missing class will result in a substantial reduction of your grade. The course paper will be submitted in two iterations. Students will undertake final projects in groups of 2-3, on topics of shared interest. A cumulative in-class final will be an integral part of the course. 

Assessment Weighting

Class participation and attendance:   20%

Homework:             20%

Papers  (one short and one long)       20%

Final Project                                        20%

Final Exam             20%

AI policy:

Unless otherwise noted, the use of AI tools (with appropriate attribution) is encouraged. For many of our assignments it’s essential. 

Alignment with the goals of the General Education program

We propose that this course be designated as fulfilling the STS criteria.  The topic of generative artificial intelligence (GAI) is an outstanding framework for meeting the goals of the “Science, Technology, and Society” component of the general education program. The rapid evolution of the capabilities of GAI has caught the entire world off-guard, with a pace that is overwhelming the ability of organizations and societies to understand it, adjust to it, and regulate it. The ability of these systems to generate fake information (either intentionally or unintentionally!) has led to calls for the high-tech sector to suspend development until society can catch up. It has also shaken the foundations of our educational system, calling into question the ways we select, teach, assess, and communicate with students. 

We are unaware of any other gen ed course that is centered on generative AI, with the breadth that we envision for this class.

Resources needed: 

Instructional participation across the divisions

Experienced TFs

Laptops for students who don’t have one? 

Licenses for Chat-GPT4, at $20 per student per month. 

Classroom with projection capability, as well as smaller classrooms for sections of 15 students. 

(We could run this course in the SEC building in Allston). 

Draft Syllabus


Spring 2024 week

Lecture topics

Discussion section

Assignments (HW) and Readings ( R) 

Readings to be done before Tues of each respective week. HW due on Friday afternoons.

Jan 22

Action items to prepare for this week: 

Google form and QR code for day 1. Might as well pre-assign some tinyURs and QR codes?
Good in-class demos for day 1
API key access to get token listing.  

Tues:
Course intro: structure and learning goals, expectations, grading, syllabus review.

Quick assessment of who's here: Google poll with questions:

  1. what brings you to this class? What is your interest in GAI? 
  2. what's your level of familiarity? Do you have an account? Tried it out? Super-user? 
  3. What do you hope to come away having learned?

some definitions, and explanation of course scope: 
GAI
LLM
not machine learning
not a CS course, but rather a liberal arts course. 
Institutional learning goals as well. 

Issues we'll consider: 
basics of how LLMs work: training set and word completion. concept of temperature. 
Texting analogy, email auto-completion. "to hear of your passing" 
limitations: training data end date, hallucinations, 
Examples of amusing shortcomings. 
Demo of GAI capabilities- narrative, reference librarian,  code assistant, text 
Key aspect is storing history and interactive nature. 

Three big things: 1) Natural language interface, 2) lack of determinism, 3) untrue outputs.

star trek keyboard and Scotty

demo non-determinism

demo untruth.  

variation Sophistication and scope of interaction, from browser to APIs.

Issues this provokes: 
- how do we use these tools to learn, and how do we learn to use these tools? 
- level of reliance, field mastery, melding with a liberal arts education. 
- becoming informed, ethical, responsible users
- does company own your uploaded queries, privacy issues, ownership
- academic integrity, copyrights, plagiarism, licensing, credit, patents, authorship
- integration with other tools- email, editors, slide generation, ...
- impact on the arts, and the creative process- Hollywood writer's strike example. Credit and ownership. 
- ethical aspects- equity of access, rights and responsibilities, deceit, 
- impact on the writing process => impact on the thinking process. 
- economic impacts, jobs, nature of work
- policy issues- who sets limits and how are they enforced? 
- validation, verification, and truth assessment
- bias
- general artificial intelligence- are they sentient? Do they have rights? Who decides? 

Active learning question- bias, using doctor-son example. Ask class. Then ask GPT. Then ask for other resolutions. Who has the bias here? 

Training sets and the introduction of bias. Biased prompts. 

Active session- Discuss as groups of 3 then answer Google form with two questions: 1. What are you most hoping to get out of this class? 2. What benefits do you see to GAI, 3. What are your largest concerns? 

Example - summarizing uploaded questions from the class, as a basis for large-lecture discussion. Active learning session that invokes Chat-GPT4 


Thurs: delve more deeply into how these work. 
Demo- API-access generation of next-token probability distribution. 

import openai
import numpy as np

# Initialize the OpenAI API
openai.api_key = 'YOUR_API_KEY'

# Make the API call
response = openai.Completion.create(
  model="gpt-3.5-turbo",
  prompt="the lazy brown fox jumped over the",
  max_tokens=1,
  return_prompt=True,
  n=1,
  stop=None,
  temperature=0.0,
  log_level="info"
)

# Extract logits from the response
logits = response['choices'][0]['logits']

# Convert logits to probabilities using softmax
probabilities = np.exp(logits) / np.sum(np.exp(logits))

# Get the top 10 tokens and their probabilities
top_tokens = np.argsort(probabilities)[-10:]
top_probabilities = probabilities[top_tokens]

# Print the results
for token, prob in zip(top_tokens, top_probabilities):
    print(f"Token: {token}, Probability: {prob}")


Establishing an account, introduction to course framework and collaborative tools. 

Initial in-section active learning exercise. Make predictions and then compare to what it does. 

Play around in sandbox with guided iterative prompts. 


reading- 

For Thursday Jan 25
WhatIsChatGPTWolfram.pdf first few sections
Age of AI chap 1 and chap 2 (54 pgs)

HW1: due Friday Feb 3: 
show that their account works and that they can use it. 
Use it to generate outline for a paper
consider bias aspects. 
Performance comparisons of GPT 3.5 and 4, of their choosing. 


video clips: 

https://blogs.reed.edu/ed-tech/recording-your-macs-video-screen-with-audio/

to record video in Quicktime with sounds:

1) set audio output to loopback in Preferences → Sound
2) in options for Quicktime pick loopback as input. 

Use quicktime screen recording.
Stop recording in task bar. 
 
McGurk effect: 

https://www.youtube.com/shorts/TDSHivyPUq0 


Scotty and Star Trek:


video+clip+of+scotty+using+mouse+as+microphone+in+star+trek&rlz=1C5CHFA_enUS1001US1001&oq=video+clip+of+scotty+using+mouse+as+microphone+in+star+trek&aqs=chrome..69i57.10489j0j7&sourceid=chrome&ie=UTF-8#fpstate=ive&vld=cid:4cc51808,vid:hShY6xZWVGE

Dogs and cats: 
https://www.kaggle.com/datasets/chetankv/dogs-cats-images

pip install pillow

cd to 

/Users/cstubbs/Desktop/OldDesktop/har/classes/GenEd2023/images/dataset/training_set

----------

import os
import random
import cv2

def get_image_files(subdir, pattern):
    """Get all files in the specified subdirectory that match the given pattern."""
    return [os.path.join(subdir, f) for f in os.listdir(subdir) if f.endswith('.jpg') and f.startswith(pattern)]

def display_image_randomly(images, window_name):
    """Randomly select an image from the list and display it."""
    random_image = random.choice(images)
    img = cv2.imread(random_image)
    img_resized = cv2.resize(img, (1000, 1000))
    cv2.imshow(window_name, img_resized)

def main():
    dog_images = get_image_files("dogs", "dog.")
    cat_images = get_image_files("cats", "cat.")
    all_images = dog_images + cat_images

    if not all_images:
        print("No dog or cat images found in the respective subdirectories!")
        return

    window_name = 'Image Viewer'
    cv2.namedWindow(window_name, cv2.WINDOW_NORMAL)
    cv2.resizeWindow(window_name, 1000, 1000)

    display_image_randomly(all_images, window_name)  # Display the first image

    while True:
        key = cv2.waitKey(0)
        if key == 32:  # Space bar
            display_image_randomly(all_images, window_name)
        elif key in [ord('q'), ord('Q')]:  # 'q' or 'Q'
            break

    cv2.destroyAllWindows()

if __name__ == "__main__":
    main()


----

jupyter notebook 

copy and run it from 

/Users/cstubbs/desktop/OldDesktop/har/classes/GenEd2023/images


Jan 29

Tues: Training, performance evolution, and projection into the future. Kick-off of a nano-GPT module with a limited training set.

Thurs: Identifying biases, inaccuracies, and exploring limitations 


R: Age of AI chap 3 (~40 pages) 

NYT article on training methods. 

HW: Experiments and evaluations on explicit and implicit bias in NLP results. 

Midway interrogation of nano-GPT system 

Feb 5

Tues: Introduction to simple quantitative data analysis- lab results. 

Thurs: dealing with ill-structured data. 

Analysis and extraction of summary statistics- median, mean, sigma

R: TBD


HW exercise on data interpretation

Final analysis of our GAI-trained model. 

Feb 12 

Tues: Extraction of information from a stack of reference papers

Thurs: Extraction of information from qualitative survey data

Initial look at truth-assessment methods. 

R: TBD

HW:Comparing human and AI-generated text material

Feb 19

Tues: Application to creative writing and assessing AI generated text

Thurs: Analyzing historical texts and data

GAI-assisted writing exercise, in section.

R: TBD

HW: assessing the validity of AI-generated summaries. 

Feb 26
Midpoint assessment of both students and of the course

Tues: in-class written assessment, blue books. 

Thurs: GAI and Harvard College- challenges and opportunities for enhancing student learning. 

Roundtable discussion of academic integrity and AI tools. 

R: TBD

HW; paper 1 on predictions of impact on a sector of human society and suggestions on how to contend with it. 

Mar 4

Tues: Philosophical and ethical aspects of AI in general and GAI in particular.

Thurs: The Turing test, intellectual property, and the rights of AI systems. 

Debate in section about good vs. evil aspect of AI. 

R: Age of Ai chap 6

HW: short paper on ethical aspects 

Mar 11

Spring break

Spring break

none

Mar 18

Papers returned to students Monday Mar 18

Tues: GAI-assisted language learning and translation

Thurs: GAI-assisted generation and debugging of computer code

Break each section into 2 groups, based on interest. Exercises on

R: TBD

HW: project proposals, online grouping into teams

Mar 25

Tues: AI and the nature of work. How might things be different, and how can you best prepare? 

Thurs: guest lecture- GAI and the law

Discussion of project selections, ruberic

R: Age of Ai chap 4 and 7. 



HW: work on revision of paper 1

Apr 1

Tues: guest lecture- GAI and medicine

Thurs: GAI and higher education


R: readings on professional impacts

HW: revisions of paper 1 due

Apr 8

Tues: guest lecture- GAI and democracy 

Thurs: AI misuse and intentional abuse. Implications for regulation, national security, warfare. 

Final project work and assistance

R: Danielle Allen writings on democracy. Also some pessimistic narratives TBD. 


HW: Project outline submitted

Apr 15

Tues: Guarding against GAI hallucination and falsehoods: tools and methods

Thurs:

Final project work and assistance

R: Trustworthy AI references TBD

HW: 

Apr 22

Partial week, classes end. 

Final projects due Monday April 22

Tues: guest lecture from US gov’t on regulatory aspects. 

NA

Final projects due, GAI poster session/fair, and live demos. 

Final exam

In-person, blue books. 



Potential Readings

Title & AuthorLinkNotes
Wolfram, What is GPT Doing? WhatIsChatGPTWolfram.pdfgood accessible overview on neural nets and generative AI under the hood.  Also avail in book form but illustrations there are B&W.
























Films to consider: 

https://en.wikipedia.org/wiki/List_of_artificial_intelligence_films 

2001, a Space Odyssey (“Open the pod bay doors Hal”, “I can’t do that, Dave”) (1968)

Ex Machina (2014)

A.I., Artificial Intelligence (2001)

Coded Bias (2020 documentary) 

Terminator (1984) 

The Matrix (1999)

Eagle Eye (2008)

Megan (2022) 

References and reading materials: 

Required text: 

Schmit, Kissenger and Huffelnacher (sp?) book on AI

$14 in paperback. 



Other potential readings:
Do Robots Dream of Electric Sheep, Philip K. Dick 

I, Robot, Issac Asimov

Diaspora, Greg Egan

Potential faculty

Christopher Stubbs

Logan McCarty

Karim Lakhani (HBS)

Gary King

Xiao-Li Meng

Matthew Schwartz, Carlos Argueles

Martin Wattenberg, Jim Waldo, Scot Martin

Other helpful resources:

HUIT access to the GPT-4 API, with a custom environment that will allow us to establish the background instructions for various GPT instances, as well as saving and documenting students’ entire chat history. For instance:

  • With the API you can set GPT to adopt a personality such as “Answer questions from the perspective of a teacher who wants to provide helpful hints but won’t give complete answers to any question.”
  • For assignments, we could ask students to document their entire chat, not just the final answer. At the moment it isn’t easy to copy an entire chat from the web interface—we need the API.




Copyright © 2024 The President and Fellows of Harvard College * Accessibility * Support * Request Access * Terms of Use