hotai.news
← Back to AI WikiAI Wiki / Core concepts

What is prompt engineering? Iterating task design with representative examples

Understand organizing instructions, context, and examples through invoice extraction, including evaluation, version records, and distinctions from training and tools.

HotAI.news · Sources checked with CodexPublished on 2026-10-20Sources checked on 2026-10-20
Our take

Understand the concept

Prompt engineering designs and revises model inputs through instructions, context, examples, and evaluation. It is not a universal magic phrase and does not directly change parameters. Missing data or tool permissions cannot necessarily be fixed by more wording; first locate the input, model, or system problem.

01

Define completion as a checkable outcome

For invoice extraction, define number and amount fields and leave absent ones empty. Specify how multiple invoices map to records. These conditions distinguish improved formatting from fewer extraction errors.

Use varied layouts and unclear inputs, reserving fixed evaluation material. Avoid showing only successes or leaking evaluation answers into prompts. This is a task-design plan without real invoice data or measured results; build examples for actual conditions.

02

Change one major factor at a time for clearer attribution

Try clearer field definitions and an example separately and inspect error changes. Changing model and prompt together obscures attribution. When output varies, examine repeated behavior rather than declaring a prompt universally better from one result.

Anthropic’s guidance emphasizes success criteria and evaluation and notes that prompting cannot solve every issue. Runtime constraints or missing evidence may require model or information changes. Length is not quality; useful constraints are easier to verify than piles of role adjectives.

03

Keep effective versions in a traceable workflow

Record model version, full prompt, and relevant errors for each revision. Recovery needs original settings rather than one success screenshot. Separate dynamic data from stable instructions so customer text cannot alter the task rules by being inserted as instructions.

Persistent failures may warrant structured output, retrieval, or training, chosen from error evidence. This page explains reproducible iteration without fixed percentage gains or treating prompting as a substitute for fact-checking.

Checked sources

These sources support the concepts and methods described here. Examples and test scope are labeled separately; check the version of the tools you use.

Back to AI Wiki ↗