# Prompt engineering

> Writing instructions for an AI model so it gives you what you actually need.

- Level: Basic
- Topics: AI
- URL: https://tidbit.legios.com.ar/prompt-engineering/
- In Spanish: [Ingeniería de prompts](https://tidbit.legios.com.ar/es/prompt-engineering/)

**Prompt engineering** is the practice of writing the instructions you give an AI model (the prompt) so that it does the job well. The same model can give a bland, generic answer or a sharp, useful one depending on how it was asked. 'Engineering' sounds grand; most of it is clear writing plus some trial and error.

The techniques that work are a lot like briefing a smart new colleague who knows nothing about your situation. Say what the goal is and who the result is for. Give the context it cannot guess: the audience, the constraints, the document to work from. Show one or two examples of what good looks like. Say what form you want back: a table, three bullet points, under 100 words, in Spanish. For tricky problems, asking the model to work through the steps before answering often helps.

It matters at two levels. For everyday use, it is the difference between 'write a post about our product' and a request that gets something you can actually publish. For companies building products on top of models, the prompt is part of the software: a carefully tested set of instructions, often hidden from the user as a **system prompt**, decides how the assistant behaves. As models get better at understanding plain requests, fewer tricks are needed, but clear instructions and good context still make the biggest difference.

## An analogy

Like ordering at a tailor instead of a clothing rack: 'a suit' gets you something generic, but your measurements, the occasion and a photo of a cut you like get you something that fits.

## Keep in mind

- Clear goal, relevant context and an example beat clever wording.
- Saying the format you want back saves a lot of rewriting.
- In products, the system prompt sets how an assistant behaves.
- Good prompts reduce mistakes but do not make the model infallible.

## Go deeper

- [Prompt engineering overview (Claude docs)](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/overview)
- [Prompt engineering guide (OpenAI)](https://platform.openai.com/docs/guides/prompt-engineering)
- [Prompt engineering on Wikipedia](https://en.wikipedia.org/wiki/Prompt_engineering)

## Related terms

- [Artificial intelligence](https://tidbit.legios.com.ar/artificial-intelligence/): Getting computers to do things that, until recently, only people could do.
- [Prompt](https://tidbit.legios.com.ar/prompt/): Everything you send to an AI model: the question, the instructions, the context.
