Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


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 

...

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.   

...

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 

Widget Connector
urlhttps://www.youtube.com/watch?v=aFPtc8BVdJk&t=1s


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
from PIL import Imagecv2

def get_image_files(subdir, pattern):
    """Get all files in the current directory specified subdirectory that match the given pattern."""
    return [os.path.join(subdir, f) for f in os.listdir(subdir) if f.startswith(pattern) and 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)
    with Image.openimg = cv2.imread(random_image) as img:
    img_resized = cv2.resize(img, (1000, 1000))
    imgcv2.show(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 current directoryrespective subdirectories!")
        return

    print("Press space to view the next image or any other key to exit.")    while True:
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)
        next_step = input()  # Wait for user input
        if next_step != ' ':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: AImisuse 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. 



...