TodayTools

Prompt engineering flashcards

Ask AI models clearly and get reliable results.

Donate
Beginner friendly, starts from zero
Section
How to study
0
Prompt engineeringStart from zero · 1 of 12

What is engineering, in one plain sentence?

The skill of asking an AI chat assistant clearly, so it gives you a useful answer the first time and every time.

Clear asks, clear answers.

All topics

Prompt engineering at a glance

Prompt engineering is the skill of asking an AI assistant clearly so it gives useful answers every time.

Like giving clear directions to a smart new delivery driver who has never been to your street.

Words you will meet

Model
The AI program that writes the replies
Prompt
Everything you send the model: request, rules and pasted text
Context
The background facts the model needs to answer well
Output
The reply the model gives back
Format
The shape you want back, like bullet points or a table
Example
A sample answer you show so the model copies the pattern
Token
A small piece of text that models count for length and cost

The steps

  1. 1. Start from zero (12 cards): What prompting is, the key words in plain English, and your first better ask.
  2. 2. Core basics (16 cards): Clear asks, context, examples, format and testing on real inputs.
  3. 3. Next steps (16 cards): System prompts, reasoning, JSON, chaining, grounding and comparing versions.
  4. 4. Go deeper (16 cards): Injection, context engineering, caching, agents, judges and prompt ops.
All 12 cards in Start from zero
What is prompt engineering, in one plain sentence?
The skill of asking an AI chat assistant clearly, so it gives you a useful answer the first time and every time.
What goes wrong without it?
You type a vague request, get a vague or wrong answer, and spend ten tries fixing it. The AI is not lazy; it simply had to guess what you meant.
Where do you already meet AI assistants?
Chat assistants on your phone or computer, writing help inside email and documents, the help chat on shopping sites and voice assistants that answer questions.
What is an everyday picture for prompting?
Giving directions to a new delivery driver who has never been to your area. 'Near the temple' fails; 'second lane after the temple, blue gate, house 14' works.
What do model and prompt mean?
A model is the AI program that writes the replies; it learned from huge amounts of text. A prompt is everything you send it: your request, rules and pasted text.
What are context and output?
Context is the background the model needs, like who the reader is or the document itself. Output is the reply the model gives back.
What do format and example mean in a prompt?
Format is the shape you want back, like 3 bullet points or a table. An example is a sample answer you show, so the model copies its style and pattern.
What is a token?
A small piece of text, often part of a word, that models count. Long prompts and long replies use more tokens, which costs more time and money in apps.
What is a role or persona?
A line like 'You are a friendly travel guide' that sets the voice and style of the reply. It changes how the model sounds, not what it knows.
What do you need before starting?
Any AI chat assistant in a web browser and a few real tasks of your own. Nothing to install and no coding needed for the first levels.
What is a first tiny win?
Compare two asks. The second names the task, the reader and the format, so the reply fits on the first try.
What will you be able to do after this topic?
Write prompts that work on the first try, get answers in the exact format you need, test a prompt on many inputs and build reliable prompts for apps.
Prompt engineering cheatsheet

Prompt skeleton

  • Role Who the model is and who it serves
  • Task One clear verb: classify, extract, draft, review
  • Context <docs>, <ticket>, facts the model cannot know
  • Rules Limits with reasons, in priority order
  • Examples 2 to 5 varied input and output pairs
  • Format Exact schema, length, language
  • Fallback What to say when it cannot answer

Techniques by problem

  • Wrong format Structured output, schema, one example
  • Inconsistent labels Few-shot with borderline cases
  • Made-up facts Answer only from <docs>, quote first
  • Shallow long output Chain: outline, sections, review
  • Logic errors Reasoning model, or <thinking> then <answer>
  • Misused tools Rewrite tool descriptions, when not to use

Phrases that work

  • Reply exactly: Not in the documents. Fixed fallback you can detect in code
  • Before you start, ask me up to 3 questions. Fill missing details first
  • Use the language of the user's message. Multilingual replies
  • No text before or after the JSON. Clean machine output
  • If unsure, choose the label other. Honest uncertainty
  • List what you assumed. Surfaces hidden guesses

Settings

  • temperature 0 to 0.3 Extraction, classification, code
  • temperature 0.7 to 1.0 Ideas and creative drafts
  • reasoning effort low, medium or high on reasoning models
  • max output tokens Cost cap, not a length instruction
  • JSON Schema, strict Guaranteed parseable output
  • Pinned snapshot No silent behaviour changes

Safety checklist

  • Delimit untrusted text <email>, <page>, <tool_result>
  • Least-privilege tools Read-only unless writing is needed
  • Human approval Before send, pay, delete, publish
  • No secrets in context Keys and tokens stay in code
  • Validate outputs Schema, allow-lists, URL filters
  • Log prompt versions Trace every answer to its prompt
Donate