Skip to main content
Prompt engineering improves the quality, relevance, and actionability of responses from a general-purpose language model. In this lesson we examine how an out-of-the-box model behaves and how small, structured prompts produce much richer results.

Out-of-the-box behavior

A general-purpose AI model trained on diverse public data will answer valid questions, but often with broad, surface-level responses. When prompts lack context and constraints, the model returns generic suggestions rather than prioritized, personalized guidance. Example user question:
what are some tips for saving money on groceries?
An uncustomized model typically replies with high-level suggestions such as:
  • Plan meals
  • Create a shopping list
  • Buy in bulk
  • Choose store-brand products
These are correct but not tailored, prioritized, or actionable. To get useful, expert-like responses we need to provide purpose and structure—this is prompt engineering.

What is prompt engineering?

Prompt engineering shapes a model’s output by defining role, intent, constraints, and expected format. The two primary components are:
  • System message (define role and expertise)
  • User prompt (specify the task, constraints, and desired format)
Example system message and a specific user prompt:
// System message
"You are a financial expert who specializes in household budgets and grocery savings. Provide practical, prioritized strategies and explain trade-offs."

// User prompt
"Provide a prioritized top-10 list of grocery-saving strategies for a family of four, including estimated monthly savings, implementation difficulty (1–5), and one example shopping tactic per item."
A clear system message gives the model purpose and focus. A specific user prompt supplies constraints and the expected format, which together produce more useful and actionable responses.
With this structure, the AI produces practical, prioritized suggestions—e.g., planning weekly menus around sale items, combining bulk buys with perishability considerations, and using coupons and cashbacks. The output becomes actionable because the model understands intent, scope, and the desired format.
An infographic titled "Using Prompt Engineering" that diagrams training data feeding a language model which powers an AI app. It also shows a sample system/user prompt and a completion response giving prioritized strategies to cut grocery expenses.

Practical prompt-engineering checklist

Use this checklist to convert a vague request into a high-quality prompt:
ComponentPurposeExample
System messageDefine role/expertise and tone”You are a personal finance advisor.”
ContextProvide background about the user or scenario”Family of four, two adults, two children, urban area.”
ConstraintsLimits on format, length, or assumptions”Top-10 list, 1–2 sentence explanation each.”
MetricsIf relevant, ask for estimates or comparisons”Include estimated monthly savings and difficulty level.”
Output formatSpecify JSON/table/bulleted list for easy parsing”Return a Markdown table with columns: strategy, savings, difficulty.”

Example: Before vs After

Before (vague prompt):
How can I save money on groceries?
After (engineered prompt):
System: "You are an experienced frugal-living advisor."
User: "Create a prioritized top-10 list of grocery-saving strategies for a family of four. For each strategy, include: estimated monthly savings (USD), implementation difficulty (1-5), one example shopping tactic, and any trade-offs. Present results as a Markdown table."
The “after” prompt yields a prioritized, comparable, and actionable result that the user can implement immediately.

Tips for more advanced prompts

  • Break complex requests into step-by-step subtasks (decomposition).
  • Provide examples of the desired output format (few-shot prompting).
  • Limit or require reasoning chains when needed, e.g., “Show calculations.”
  • Use role-play to shift tone or level of expertise (e.g., “Act as a nutritionist and cost analyst.”)
Prompt engineering is not just about finding the right words; it’s about setting intent, supplying structure, and guiding the model to act with purpose. In the next sections we will break down more strategies and demonstrate examples that show the measurable impact of good prompts.

Watch Video