Skip to main content
ModelTerms

Prompting · beginner

Prompt Engineering

Prompt engineering is the craft of writing prompts that reliably produce the behavior you want from an LLM. It blends formatting, examples, tone, and constraints.

Explanation

Prompt engineering matters because LLMs are sensitive to wording, position, and structure. Putting the most important instruction last, using clear headings, demonstrating output format, and giving the model a role can each change quality dramatically.

The discipline ranges from quick tactical tweaks ("respond in JSON") to systematic evaluation (A/B testing prompts, measuring win rates, using LLM-as-judge to score outputs). For production systems, treat prompts as code: version them, test them, monitor regressions.

Examples

  • Adding "Respond in valid JSON only" + a schema example.
  • Putting examples in (input, output) pairs rather than prose.

Frequently asked

What is Prompt Engineering?

Prompt engineering is the craft of writing prompts that reliably produce the behavior you want from an LLM. It blends formatting, examples, tone, and constraints.

What is an example of prompt engineering?

Adding "Respond in valid JSON only" + a schema example.

How is Prompt Engineering related to Prompt?

Prompt Engineering and Prompt are both prompting concepts. A prompt is the text you send to an LLM to elicit a response. It typically includes a system message, optional examples, and the user's query.

Is Prompt Engineering considered beginner?

Prompt Engineering is generally considered beginner-level material in the AI and LLM space.

PromptPrompting

A prompt is the text you send to an LLM to elicit a response. It typically includes a system message, optional examples, and the user's query.

System PromptPrompting

The system prompt is the first message in a chat that sets the model's persona, rules, and overall behavior. It is treated by most providers as higher-trust than user input.

Few-ShotPrompting

Few-shot prompting includes a small number of input-output examples directly in the prompt so the model can pattern-match without any fine-tuning.

Chain-of-ThoughtPrompting

Chain-of-thought prompting asks the model to show its reasoning step by step before giving a final answer. It dramatically improves performance on multi-step problems.

LLM-as-JudgeEvaluation

LLM-as-judge uses a strong LLM to score or compare outputs from other LLMs. It is how most production teams evaluate quality at scale when human review is too slow.

Structured OutputInference

Structured output constrains an LLM to emit text matching a schema — usually JSON. The model can be guaranteed to produce valid output that your code can parse without retries.

Side-by-side comparisons

Sources