Prompt EngineeringPromptFoo Editorial10 minUpdated Jun 1, 2025

Prompt Engineering Fundamentals That Still Matter in 2025

Models got smarter but prompt structure still moves outcomes. Here are the fundamentals that survived every model release.

Role and goal

Every strong prompt names a role and a goal in the first two lines. 'You are an editor. Your goal is to shorten this brief to under 400 words without losing any citations.' That framing beats a paragraph of vague context.

Constraints

Constraints do more work than instructions. 'Never mention the competitor by name' is worth ten adjectives about tone.

Examples

Two or three examples of good and bad output outperform a page of description. Include a rejected example and label it clearly.

Output format

Specify format before content. Ask for JSON with a schema, or a specific markdown skeleton, and the model plans the content around it.

Refusals and safety valves

Tell the model when to refuse. 'If a required field is missing, return exactly REFUSE: <reason> and nothing else.' This is more reliable than hoping it will notice.

FAQs

Related resources