Language models & chatbots

Prompt engineering

Prompt engineering is the practice of writing and refining prompts so that an AI model gives more accurate, useful, and consistent results.

The same model can produce a weak answer or a great one depending on how you ask. Prompt engineering is the craft of asking well. It includes giving clear instructions, supplying context, showing examples, asking the model to think step by step, and telling it exactly what format to reply in.

Some techniques have names. Few-shot prompting means including a few solved examples first. Role prompting means telling the model to act as an expert of some kind. Chain-of-thought means asking it to reason before answering. Developers test variations and measure which prompts work best on real tasks.

It is less mysterious than it sounds. Most of it is the same skill as briefing a new colleague clearly. As models improve, elaborate tricks matter less, but clear context and precise requests still make a big difference.

Example

Instead of 'packing list,' you write 'I am camping for three nights in Scotland in October with two kids; list essentials by category, no more than 25 items,' and get a far better list.

Guide: Prompting →