Submit a Story

Glossary

Prompt Engineering

The practice of writing and structuring the instructions, examples and context given to an AI model so it produces reliable, useful output.

Prompt engineering is the craft of telling a model what you want clearly enough that it does it consistently. It covers the wording of the task, the format of the answer, examples of good output, constraints, and the context you supply.

Practical habits that help: state the goal and the audience, say what format you want (a list, a JSON object, a short paragraph), show one or two examples, name what to avoid, and give the model an explicit way out such as saying when it lacks enough information. Test prompts on many real inputs, not just one, and change one thing at a time.

Prompts often live in the system prompt, with task-specific details added per request. What you include also has to fit the context window.

Related: Large Language Model, LLM Hallucination, AI Agent Context.

← All terms