Skip to content

Prompt Engineering

The ability to formulate requests so that the model provides an accurate, useful, and predictable response.

What is it?

A prompt is not a "question", but an instruction. A good prompt describes:

  • who you are;
  • what needs to be done;
  • in what format;
  • what cannot be done.

Basic Formula

Role + Context + Task + Format + Constraints

Example:

You are a technical editor.
Write an explanation of the term "token".
Format: a short paragraph and one example.
Do not use complex formulas.

Main Principles

  1. Give a role — "You are an experienced Python developer".
  2. Add context — "I am writing for beginners".
  3. Specify the format — "In a list of 5 points".
  4. Show examples — few-shot.
  5. Limit unnecessary things — "Do not make up facts".

See Also

← All terms