Prompt engineering
Words made simple
A few useful meanings before you read the explanation.
- Schema
- A description of the fields and value types that data should contain. It helps check that an answer has the expected shape.
- Deterministic
- Following steps or rules defined by code. The model does not decide which step should run next in a deterministic workflow.
- Evaluation
- Checking results against examples and clear criteria to find whether the system works well and where it fails.
More words from this lesson
- Trace
- A linked record of the steps in one request, including model calls, retrieval and tools. It helps locate delays or failures.
- Latency
- How long a request takes to return a result. Lower latency usually means a shorter wait for the user.
Beginner — What makes a good prompt?
- A clear task, trusted constraints, explicitly separated input, expected output, and a defined response when information is missing.
- For policy answers, I require supporting evidence and forbid inventing unsupported policy conditions.
Intermediate — Zero-shot or few-shot?
- I begin with clear zero-shot instructions.
- If errors concern category boundaries or formatting, I add a few representative reviewed examples and evaluate them on separate cases.
- Examples should cover ambiguity, not just easy successes.
Senior — How do you maintain prompts?
- I treat prompts as versioned configuration with an owner, evaluation dataset, release gate, and trace tag.
- I investigate patterns in failures instead of accumulating conflicting instructions for individual anecdotes.
- Provider/model upgrades rerun the same contract tests.
Scenario — Adding many examples improved a demo but slowed production. What next?
- I measure which examples actually help and remove redundancy.
- I test a smaller prompt, provider-supported schemas, deterministic preprocessing, or a better model.
- I optimize latency and cost while preserving held-out quality.
Can you explain it without the notes?
Prompt engineering
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
Beginner — What makes a good prompt?
Turn this concept into a clear answer.
Practice this conceptAdapted from 13_AI.MD · “29.2 Prompt engineering”. Examples are study fragments; framework behavior can depend on your version.