Lesson deck
Prompting fundamentals flashcards
Reviewing needs JavaScript. You can read every card in the list below.
Loading your cards...
Back to the lesson6 cards in this deck
Read all 6 cards as a list
- Front
- Few-shot prompting vs fine-tuning: what is the difference?
- Back
- Few-shot shows examples in the prompt at inference time: no weight changes, but you pay for the example tokens on every call. Fine-tuning updates weights on labelled examples: upfront cost, and shorter prompts afterward.
- Front
- Chain-of-thought: benefit and caveat?
- Back
- It helps multi-step reasoning on models that do not already reason on their own. It costs tokens and latency, and the written reasoning may not reflect what actually drove the answer.
- Front
- What is a solid prompt skeleton?
- Back
- Role, context, task, format and constraints, including what to do when information is missing (for example answer 'unknown'). Show the exact output shape with an example.
- Front
- How do you reduce prompt injection from a document you pass to the model?
- Back
- Delimit the untrusted text, tell the model it is data and not instructions, validate the output, and limit what the output can trigger. Delimiters lower the risk; they do not remove it.
- Front
- Self-consistency: how does it work and what does it cost?
- Back
- Sample several chain-of-thought answers and take the majority. It raises reliability on short, votable answers, at about N times the cost and latency.
- Front
- How do you tell whether a prompt change helped?
- Back
- Run old and new prompts on the same labelled set (with edge cases) and compare pass rate. Keep the set as a regression test for later prompt or model changes.