---
Title: "What Is Prompt Engineering? Techniques and Examples"
Url: "https://computer.io/glossary/prompt-engineering"
Topic: "AI foundations"
Description: "Prompt engineering is writing and refining instructions to get better results from AI models. Techniques, examples and best practices."
---

# What is prompt engineering?

Prompt engineering is the practice of writing and refining the instructions given to an AI model, including the task, context, examples, format and constraints, to get accurate, useful and consistent outputs.

## Techniques

| Technique | Example |
| --- | --- |
| Clear role and task | "You are a support agent. Answer billing questions." |
| Examples (few-shot) | Show good answers |
| Format | "Reply in under 100 words" |
| Constraints | "Only use the provided articles" |
| Step-by-step | Ask the model to reason through steps |

## Best practices

Be specific, give context, test against real cases and version your prompts.

## FAQ

### Is prompt engineering a real job?

Some roles exist, but it's more often a skill within AI and product roles.

### What is few-shot prompting?

Including examples in the prompt to guide the output.

### How do you test prompts?

Run them against a set of real cases and score the outputs.

## Related terms

- [Context engineering](https://computer.io/glossary/context-engineering)
- [Large language model (LLM)](https://computer.io/glossary/large-language-model)
- [AI evals](https://computer.io/glossary/ai-evals)

## How Computer helps

- [Agent studio](https://devrev.ai/agent-studio)

## Further reading

- [Build enterprise ai agents](https://devrev.ai/blog/build-enterprise-ai-agents)
