Every strong prompt combines four ingredients. You don't need all four every time, but knowing them lets you instantly diagnose why a weak prompt is weak.
Role — who the AI is acting as. Task — what it should do (use an action verb). Context — background it needs to do the job. Format — how the output should look.
You are a senior technical recruiter who has placed 80+ engineers at Series A startups.
Task: Write a job description for a Senior Backend Engineer at Vitae — a resume analytics SaaS, 10-person team, recently closed Series A.
Context:
Format:
You are a staff-level Go engineer. This code ships to production next Friday.
Review this function for:
For each issue:
func GetUserOrders(w http.ResponseWriter, r *http.Request) {
userID := r.URL.Query().Get("user_id")
rows, _ := db.Query("SELECT * FROM orders WHERE user_id = " + userID)
var orders []Order
for rows.Next() {
var o Order
rows.Scan(&o.ID, &o.Total, &o.Status)
orders = append(orders, o)
}
json.NewEncoder(w).Encode(orders)
}
Claude responds well to XML tags for multi-part prompts: , , , . Produces more consistent output on complex structured tasks.