This page lists the conventions that the course’s readings, labs, and self-tests share. The course has no LaTeX documents, so its symbols have no LaTeX macros: every page writes them out in full.
Prompts, requests, and responses¶
Code, names, file names, and values are in code font:
max_tokens,stop_reason,"end_turn".A prompt or a model’s reply appears in a fenced block tagged
text, exactly as the model would read or write it.A request or a response is a Python dictionary in the shape of the Claude Messages API’s JSON. The SDKs wrap the same fields in objects, so
response["stop_reason"]in a lab isresponse.stop_reasonwith the Python SDK.A reply labeled illustrative was written for this course. It isn’t the output of any model, and the course never presents it as one.
The model, in a lab, is a stand-in from
promptlabthat answers from a script. The lab says so where one first appears.Exercise P3.4 is the fourth exercise in Module 3’s practice. Exercise L3.4 is the fourth in its lab. Practices in Modules 1 and 2 use numbers such as 1.4 without the P prefix.
Money and tokens¶
Prices are in US dollars per million tokens, as Anthropic’s pricing page gives them, and each table of prices says the date it was taken. Amounts of money are in code font, such as
$4per million input tokens, because a bare dollar sign starts mathematics in Markdown.“1M” means one million and “1K” one thousand, as the documentation writes context windows and output limits.
Symbols¶
| Symbol | Meaning | First used |
|---|---|---|
| The probability that the next token is , given the context before it | Module 1 | |
| Temperature: how much sampling flattens () or sharpens () the probabilities | Module 1 | |
| In top-p sampling, the share of probability that the kept tokens must reach | Module 1 | |
| The cost of a request or a batch, in US dollars | Module 2 | |
| Jaccard similarity of two word sets: the words they share over the words in either | Module 5 | |
| The number of independent test cases behind a measurement; repeated runs of one case don’t add to it | Module 7 | |
| A measured pass rate: the share of graded outputs that passed | Module 7 | |
| The number of standard errors that sets an interval’s confidence: 1.96 for 95% | Module 7 | |
| , | The shares of outputs that a person and a model-based grader pass, used for chance agreement | Module 7 |
| Cohen’s kappa: agreement between two graders, corrected for chance | Module 7 | |
| How many items are kept: examples chosen for a prompt (Module 5), or passages retrieved for each question (Module 10) | Module 5 | |
| In BM25, the number of documents in the collection | Module 10 | |
| Document frequency: how many documents contain a query term | Module 10 | |
| Term frequency: how many times a query term occurs in the document being scored | Module 10 | |
| , | A document’s length in terms, and the average length over the collection | Module 10 |
| , | BM25’s two settings: how fast repeated terms stop adding score, and how much document length counts | Module 10 |
The letter means two things, in two modules: the top-p threshold in Module 1, and a pass rate in Module 7, where it always wears a hat () when it is measured. Each module defines the symbols it uses when they first appear.