Prompt Engineering
Prompt engineering is the practice of changing the text given to a language model, rather than the model itself, to get answers that meet a defined standard. It is judged against test cases, and it stops where wording can no longer move the result.
How it is done
Anthropic’s prompt engineering overview assumes three things before it begins: a written definition of what a good answer is, a way to test answers against it, and a first draft prompt to improve. Without those, there is nothing to engineer against. The techniques it points to are clarity, worked examples, structure with tags, an assigned role, room for the model to think before it answers, and chaining, where one prompt’s output becomes the next prompt’s input. The overview also says that not every failing test is a prompt problem; latency and cost, for instance, are sometimes fixed faster by choosing a different model.
A common question
Can prompt engineering make an assistant recommend my business?
Only in prompts you write yourself. A customer’s prompt belongs to the customer, and the assistant answers it by searching and reading pages. What a business controls is what those pages say when fetched: whether a passage answers the question in one place, and whether the name, address and phone number match everywhere. That is generative engine optimization, and it works on the page rather than the prompt.
Related terms
Sources
Method and techniques: Anthropic, prompt engineering overview.