Prompting and context
How the prompt the model sees is built, and how to assemble an agent's context: message roles, the system prompt, examples, a stable prefix for the cache, compressing a long history. Separately — model behavior from the user's point of view: tokens, temperature, hallucinations, reasoning models.
Loading…
01The whole topic
Take the whole "Prompting and context" topic
Every question of the topic — one per fact, from easy to hard. An honest check of the whole topic rather than of a single section.
02
Topic sections
#QUIZQUESTIONSDIFFICULTYSTATUS
1.1Prompt structure and message rolesWhere information gets lost in a prompt, The anatomy of a prompt, The Little Red Riding Hood principle
1.2System prompt and instructionsTesting a system prompt, Business rules in the prompt, Capital letters in a prompt
1.3Examples and few-shotWhen to give examples, Examples and the prefix cache, An example changes the behavior
1.4Stable prefix and cachingA stable context prefix and the KV cache, What resets the prefix cache, The line that breaks the cache
1.5Context compression and isolationWhy compress the context, Context rot, Compression and the cache
1.6Model behavior: tokens, temperature, hallucinationsWhat temperature does, Top-k and top-p, Model inconsistency
1.7Output format and structured answersWays to get structured output, Early stopping and JSON, The output format in the prompt