AI quiz
Fifteen multiple-choice questions take you from prompts and tokens to the EU AI Act and GPU memory, each with a reason and a page to check. Weekly scores and a leaderboard open later, when members can sign in.
Beginner
Prompts, tokens, and made-up facts
A round is a short list of multiple-choice questions with one best answer, and a short explanation you can check.
The fifteen questions below are ready to use now. A weekly round, a saved score, and a leaderboard open later, when members can sign in.
A prompt is the message you give the model. A clear prompt names the task, the reader, the length, and the facts that must appear. "Write an 80-word note for the neighbor feeding my dog. Meals at 08:00 and 18:00, one cup of kibble, no chocolate" states those choices. "Write something nice about dogs" leaves the reader, the length, and the facts unspecified.
A token is the unit the model counts. Google's machine learning glossary calls a token the atomic unit a language model trains on and predicts: a word, a character, or a subword. Context limits and API bills use tokens, so a long pasted article spends more of the allowance than a short question.
A hallucination, in the generative-AI glossary, is plausible-seeming but factually incorrect output that asserts something about the real world. Their example is a model claiming Barack Obama died in 1865. Smooth grammar only shows that the sentences are well formed, not that they are true. The writer can be a person or a model, and a date in the text can still be wrong. For a number, a date, or a quotation, ask for the page it came from and open that page.
The free Swedish course Elements of AI covers this ground. The site credits MinnaLearn and the University of Helsinki, with Linköping University among the Swedish partners.
Quiz me on the first terms
Quiz me with 5 multiple-choice questions for someone new to AI. Use 4 options and one best answer each. Cover: what a prompt is, which of two prompts is more specific, what a token is (Google's glossary: a word, a character, or a subword), what a hallucination is (plausible-seeming but factually wrong output about the real world), and why tidy grammar leaves the writer unknown. After I answer all five, mark them. For each item, explain in plain English and name a page I can open. Skip invented statistics and invented quotes.
Intermediate
Bills, labels, agents, and the AI Act
Middle rounds ask you to judge a bill, a label, a tool, and a rule.
Contractions, tidy grammar, and a confident date appear in human writing and in model writing. The model name sits on the product screen or in the API field. With that label missing, the paragraph is unsigned.
Hosted chat APIs meter tokens. OpenAI's Chat Completions object reports prompt_tokens for the input and completion_tokens for the output. A long pasted document raises the input count. A long answer raises the output count.
Temperature controls sampling. In the OpenAI API reference, a higher value such as 0.8 makes the output more random, and a lower value such as 0.2 makes it more focused. Google's glossary states the same relationship between temperature and randomness. A low setting keeps a requested format steadier from one run to the next. The setting leaves sources and training weights alone.
An agent is a loop that plans steps and calls tools. That fits a job of several lookups: find the official article, note the paragraph, save the link. The sum of a column in a CSV you already have is a closed calculation. A spreadsheet or a short program does that sum on the file.
Regulation (EU) 2024/1689, the AI Act, sorts duties by risk. Article 5 prohibits some practices, including AI systems that create or expand facial-recognition databases by untargeted scraping of facial images from the internet or CCTV footage. High-risk uses carry heavier duties in the same regulation. The Act has been amended, so read the current consolidated text on EUR-Lex.
Bill, label, agent, AI Act
Quiz me with 5 multiple-choice questions, 4 options each. Topics: why prose alone leaves the model unnamed, how a chat API reports input tokens and output tokens, what temperature changes in sampling, when a spreadsheet fits better than an agent, and one practice prohibited by Article 5 of Regulation (EU) 2024/1689. After I answer, explain each item. For the legal item, paraphrase the article in one or two sentences and tell me to read the current consolidated text on EUR-Lex, because the Act has been amended. For billing and temperature, point at the OpenAI Chat Completions reference.
Expert
Cache math, attention, and small weights
Expert rounds use a formula you can recompute, or a mechanism from a paper.
A key-value cache (KV cache) stores keys and values already computed for earlier tokens, so the next token can reuse them. Hugging Face's cache guide describes that reuse. For multi-head attention, cache bytes equal 2 × layers × hidden size × tokens × bytes per number. The leading 2 is keys and values.
For 32 layers, hidden size 4096, 16-bit numbers (2 bytes), and 8192 tokens: 2 × 32 × 4096 × 8192 × 2 = 4,294,967,296 bytes = 4 GiB. Weights are a separate store from this cache.
FlashAttention (Dao, Fu, Ermon, Rudra, and Ré, 2022) matches the standard attention result. The paper's gain is data movement: tiling cuts traffic between GPU high-bandwidth memory and on-chip SRAM, and the full score matrix stays unwritten. The block-sparse extension in that paper is the approximate form.
RoPE, from the RoFormer paper, rotates pairs of dimensions in the query and the key. The query-key product then depends on the distance between positions.
A mixture-of-experts block holds several feed-forward experts and sends each token through a few of them. Compute for that token follows the experts that ran. With the whole model on one GPU, weight memory still includes the idle experts, because another token can take another route.
Weights stored in 4-bit integers instead of 16-bit floats take about a quarter of the weight memory. Measure a task score or perplexity after the change. A 16-bit KV cache still grows with context on the formula above.
Mark my KV-cache sum
Give me one problem and wait for my answer. Setup: 32 layers, multi-head attention, hidden size 4096, keys and values in 16-bit floats (2 bytes), context 8192 tokens. Ask for the KV-cache size in bytes and in GiB. Formula: 2 × layers × hidden size × tokens × bytes. The correct product is 4294967296 bytes, equal to 4 GiB. If I miss the leading 2, point at keys and values and show that one correction. Then ask what happens to weight memory if weights move from 16-bit to 4-bit while the cache stays 16-bit. If I mix this up with FlashAttention, point me to arXiv:2205.14135 and say that paper is about data movement for exact attention, while this problem is only the cache size.
How a round is scored
Until sign-in exists, mark the bank yourself. A weekly set, a stored score, and a leaderboard open with member accounts.
- Answer every item in a level, then open the key.
- One best option per question.
- Keep three scores, each as correct answers over the questions in that level: beginner, intermediate, expert.
- On a memory question, write the product. A total without the formula counts as unfinished.
- On a legal question, open the consolidated AI Act and read the article named in the key. A later amendment overrides this page.
- Read the explanation when your choice was right. The reason, and the page that holds it, is the point of the round.
| Piece | Now | When sign-in opens |
|---|---|---|
| Question bank and written key | The 15 items on this page | Those items, plus a new set on a weekly rhythm |
| Your score | You mark it | Stored on the account |
| Leaderboard | No board yet | Opens with member sign-in |
Cache formula card
Cache bytes for multi-head attention, 16-bit keys and values:
2 × layers × hidden size × tokens × 2
The first 2 is keys and values. The last 2 is bytes in a 16-bit number. Hidden size here means key-value heads times head size, which equals the model width in ordinary multi-head attention.
Worked example on this page: 32 layers, width 4096, 8192 tokens → 4,294,967,296 bytes → 4 GiB of cache, with weights counted separately. Moving weights from 16-bit to 4-bit scales the weight store by about 1/4 and leaves this cache line unchanged.
A shared community DGX Station would let a later expert round time one long context, a 4-bit weight load, and a mixture-of-experts model on the same machine, so the cache and weight totals in the key can be checked against a real run. About the shared station
Sources
- Machine Learning GlossaryGoogle's definition of a token: the atomic unit a language model trains on and predicts, as a word, a character, or a subword.
- Machine Learning Glossary: Generative AIDefinitions of hallucination (plausible but factually wrong output about the real world) and temperature (the control on how random the output is).
- OpenAI Chat Completions API referenceTemperature (higher is more random, lower is more focused) and the usage fields prompt_tokens and completion_tokens. Check the current price page for the rate.
- Regulation (EU) 2024/1689, the Artificial Intelligence ActOfficial text. Article 5 prohibits untargeted scraping of facial images to build or expand facial-recognition databases. The act page links the current consolidated version. European Union law; quote the journal, do not paste long extracts here.
- Rules for trustworthy AI in the EU (EUR-Lex summary)Plain-language summary of the risk-based Act, including prohibited practices such as untargeted facial-recognition database scraping. Follow it with the consolidated regulation when you need the rule itself.
- FlashAttention (Dao et al., 2022)The paper on IO-aware exact attention: tiling cuts GPU memory traffic, and the full score matrix need not be stored. Block-sparse attention is the approximate extension. Paraphrase only.
- RoFormer: Rotary Position Embedding (Su et al.)RoPE encodes position by rotation so attention depends on relative distance. The arXiv record shows license CC BY-NC-ND 4.0. This page paraphrases the idea and does not reproduce the paper.
- Hugging Face cache explanationHow a KV cache stores past keys and values so generation reuses them, with memory growing in step with length. For the beginner course, see the Swedish Elements of AI site: https://www.elementsofai.se (MinnaLearn, University of Helsinki, Swedish partners including Linköping University). Course text stays on their site.
