Français
Applied AI · Advanced 🔴 · Session 7
❓ Interactive quiz
← Return to program 📄 Source .md

Quiz — Advanced Level, Session 7

“Advanced prompt engineering”

Program : Applied AI — Yann Isola Format: 10 MCQs (MCQ = Multiple Choice Questionnaire), certification level Claude Certified Architect Duration : 20 minutes — only one correct answer per question unless otherwise stated Threshold : 7/10

⚠ The API behaviors described (prefilling, extended thinking, stop_sequences) reflect the documentation at the time of writing and are volatile: check the official Anthropic documentation.


Q1 — When the Chain of Thought harms

One team adds “Think step by step” to a prompt that verbatim copy an IBAN number (IBAN = International Bank Account Number) from a document. Accuracy drops. What is the most likely explanation?

Q2 — Design of a few-shot game

You have a budget of 6 few-shot examples for a classification. What composition maximizes reliability?

Q3 — Prefilling: exact API behavior

You send {"role": "assistant", "content": "<resultat>"} in last message with stop_sequences: ["</resultat>"]. The model generates 42</resultat>…. What does it contain response.content and what is worth stop_reason ?

Q4 — Prefill trap

Which of these prefills causes a API error ?

Q5 — Long context: placement of instructions

Prompt of 80,000 tokens: three contracts attached and a critical analysis instruction. What placement maximizes compliance with the instructions?

Q6 — Examples vs instructions

A system prompt requires "reply in JSON only", but two of the five few-shot examples contain an explanation sentence before the JSON. In production, the model often adds a phrase before its JSON. What diagnosis?

Q7 — Canonical production pattern

In the boss classification → routage → génération spécialisée → validation , which statement is correct?

Q8 — Negative prompting

Why is “If information is missing, use the value “unknown”” more reliable than “Never invent information” alone?

Q9 — Temperature and Chain of Thought

For an extraction pipeline with structured CoT, what temperature setting and why? And in what case would we voluntarily do the opposite?

Q10 — The “contract” prompt system

A prompt production system for a ticket sorting agent should, at a minimum, contain four clauses. Which ones?