CSC-105

LibraryWorking with Agents

Working with Agents

📆 Week 5

  • Today: Working with Agents
  • Thursday: Project 4 due by 2:30pm on Thursday
  • Thursday: Begin work on Project 5 (ongoing) using Codex
  • Thursday, October 8: midterm project due at 2:30pm; demos and a short exam review
  • Tuesday, October 13: fall break — no class
  • Thursday, October 15: midterm exam (on paper, in class, one hour)

Midterm project

  • A working project that does something useful.
  • Should be well-presented and documented.
  • Should show your personal thought, intent and creativity (no slop!).

Midterm exam

  • On paper, in class, 1 hour.
  • Testing for:
    • Prompt fluency
    • Vocabulary
    • Critical thinking

Midterm grade

  • Projects: 60% of grade
  • Exam: 20% of grade
  • Professionalism: 20% of grade

Sneha Revanur

Review

Say each term in your own words.

Files, folders, and text

File

A named piece of data. The extension hints at the type.

Folder

A container for files and other folders. Also called a directory.

Path

The address of a file or folder.

~/classes/csc-105/project-1

Extension

The suffix after the last dot: .md, .html, .txt.

Plain text

Human-readable characters, not a private app format.

Markdown

Plain text for headings, lists, links, and emphasis.

HTML

The plain-text format a browser turns into a page.

ASCII

An early map from numbers to English letters, digits, and symbols.

UTF-8

How computers encode text from many languages today.

Zip

One archive of a folder, so you can upload the project as a single file.

Prompting

Prompt engineering

Using words to shape the output of a machine.

Coding

The syntax and typing of code.

Programming

Solving a problem with code. The hard part, with or without AI.

Zero-shot

Instructions alone, with no examples.

One-shot

In this class, one prompt that produces the result in a single turn.

Few-shot

A few examples of the task, included in the prompt.

Chain-of-thought

Work through the steps before giving the final answer.

How a model reads and writes

LLM

A large language model. It writes text one token at a time.

Token

The chunks an LLM reads and writes. About 4 characters, or 0.75 words.

Embedding

Numbers that place an idea on a map of meaning. Nearby means similar.

Parameter

A weight the model learned in training. More parameters can store more patterns.

Next-token prediction

Given the tokens so far, guess the next one. Longer answers are this step repeated.

Temperature

How willing the model is to pick a less likely next token.

Context window

How much the model can hold for one prompt. Outside the window, it is invisible.

Transformer

The 2017 architecture behind modern LLMs. It looks at a whole sequence at once.

Self-attention

Every token weighs how much the other tokens matter to it.

Training, then the chat model

Pre-training

The first stage: guess the next token across a huge corpus.

Base model

What pre-training produces. Fluent, not yet helpful.

Fine-tuning

More training on a small, curated set. It changes the weights.

RLHF

Reinforcement Learning from Human Feedback. People rank answers, and the model is trained toward the ones they prefer.

Reward model

A model that scores answers from those human rankings.

Alignment

Getting a model to do what people want, not only what the training data made likely.

Two places it knows something

Weights

What the model learned in training. Frozen while you chat.

Context

What you give it this turn: prompt, files, tools, and the conversation.

Agents

Agent

An AI that can take actions, not just chat. An LLM plus tools, files, and a goal.

Harness

The context and tools wrapped around an agent so it can do the work.

Human agency

You choose the goal and gather the facts the model cannot know.

AGI

A hypothetical AI that can do any intellectual task a person can.

Slop

A project mostly handed to AI, with little of your own thinking left in it.

Brief and AGENTS.md

The brief says what to build. AGENTS.md says how to work and where you left off.

The field

Frontier model

One of the most capable models in the world right now.

SOTA

State of the art. The best known result on a task. It moves.

Open weights

The trained model file is published for anyone to download.

X-risk

The claim that a capable enough system could do serious harm.

Effective altruism

Slow down. A rushed system is the danger.

Effective altruism

Effective accelerationism

Delaying is the danger. Deploy it.

Effective accelerationism

Working with Agents

Stay in the loop!

  1. Evaluate the current state of the project
  2. Work with the agent to plan the next steps
  3. Execute the next steps
  4. Back to step 1

Have your agent present options

  • Create images for UI/style references (mood boards, etc.)
  • Create HTML mockups of ideas with multiple options
  • Refine then incorporate into the project

Demo