Home / Prompt Engineering
// Path 05 — 7 prompt categories

Prompt
Engineering.

Writers, analysts, researchers, and PMs. A prompt is an instruction set. Engineers who write precise, testable, structured prompts get dramatically better results than those who treat AI as a magic box.

// The core definition

"Prompt engineering is the practice of giving clear instructions, useful context, examples, constraints, and output formats so an AI model can produce more reliable results."

— virat-lab / prompts


// Start here

The template
that scales.

Everything else in this path builds on this one structure. Learn it, use it for a week, then move to the advanced patterns.

Role:
Who the AI should be. Sets the knowledge base, tone, and decision-making lens. Be specific: "security researcher specializing in LLM vulnerabilities" beats "security expert".
Goal:
What you want it to do. One clear sentence. If you need more than one sentence, you probably have more than one goal — split them.
Context:
What the AI needs to know to do this well. Audience, constraints, background, what not to do. Context is the most commonly under-specified part of any prompt.
Format:
Exactly how you want the output structured. Bullet points, numbered list, JSON, table, word count, sections. If you do not specify, you will get inconsistent formatting.
// The RGCF template in use
Role: You are a senior UX researcher.

Goal: Help me write 5 user interview questions about
[product feature or workflow].

Context: The interviewees are [user type]. We are
trying to understand [specific thing you want to
learn]. Avoid leading questions. Do not ask about
hypothetical future behavior.

Format: Numbered list. Each question followed by
a one-sentence note on what insight it is designed
to surface. Max 20 words per question.
Why this works

The Role limits the AI to relevant domain knowledge. The Goal is unambiguous. The Context prevents common failure modes (leading questions). The Format makes the output immediately usable.


// 7 prompt categories

Every prompt type.
One pattern each.

The curriculum covers 7 categories. Each has a pattern, a failure mode to watch for, and a copy-paste example you can use immediately.

01
Beginner / Foundation

Role-Goal-Context-Format. Zero-shot prompting. Defining clear, unambiguous objectives. Getting consistent outputs on repeatable tasks.

Common failure: vague roles and no format specification
02
Research & Analysis

Structured summarization, comparative analysis, literature review, identifying gaps. Designed for deep, multi-document research tasks.

Common failure: hallucinated citations — always verify
03
Automation & Workflow

Prompts that produce structured, machine-readable outputs for downstream processing. JSON, CSV, tagged lists — for building AI into automated pipelines.

Common failure: inconsistent output format — add schema
04
Security & Safety

Prompts designed to resist injection, limit scope, and return safe outputs. Essential for production deployments and systems that process untrusted input.

Common failure: no input validation — what gets in shapes what comes out
05
Healthcare & Clinical

Privacy-safe prompts for clinical contexts: research summaries, patient education, administrative support. Always designed around PHI protection and human review requirements.

Common failure: including PHI in prompts sent to commercial AI tools
06
Coding & Technical

Code generation, debugging, documentation, code review. Prompts that constrain language, version, style guide, and output format for reliable, usable code outputs.

Common failure: no version or language constraints — output is generic
07
Workflow & System Design

Prompts for designing processes, mapping workflows, analyzing systems, and creating documentation. For operations, engineering, and business professionals.

Common failure: no scope constraints — AI designs the ideal, not the feasible

// Advanced techniques

Beyond the template.
When to use each.

Chain-of-thought
Add "think step by step"

Use when the task requires multi-step reasoning, math, logical analysis, or deduction. The model externalizes its reasoning, which also makes errors easier to spot.

Few-shot examples
Show, do not just tell

Provide 2-3 input/output examples before the actual request. Use when the task has a specific style, tone, or structure that is hard to describe but easy to demonstrate.

Structured output
Constrain the format precisely

Define the exact output schema in the prompt. For JSON: include field names and types. For tables: name every column. For lists: specify count, order, and what each item must contain.


// Use these right now

Three meta-prompts.
For improving other prompts.

These prompts help you build and improve other prompts. The most valuable skill in prompt engineering.

// Prompt improvement
Role: You are a prompt engineer who specializes in making prompts more reliable.
Goal: Improve this prompt so it produces more consistent, high-quality outputs.
Context: I use this prompt for [task]. Current problems I experience: [describe issues: inconsistent format, wrong tone, too verbose, hallucinations, etc.].
Format: (1) Diagnose what is wrong with the current prompt in 3 bullets, (2) Provide an improved version, (3) List 2 variations to A/B test against it.

Current prompt:
[paste your existing prompt here]
// Output format designer
Role: You are a prompt engineer specializing in structured outputs.
Goal: Design a prompt that reliably produces [desired output format: JSON / table / structured list / report].
Context: I need this output for [use case]. The output will be [processed by code / read by humans / inserted into a template]. Failure mode I want to avoid: [describe what goes wrong now].
Format: Give me a complete prompt template with explicit output format constraints. Include a validation checklist I can use to check if an output is compliant.
// Few-shot example builder
Role: You are a prompt engineer.
Goal: Help me create 3 high-quality few-shot examples for this task: [describe the task].
Context: The model currently [describe the failure mode: wrong tone / wrong format / misses the point]. I want outputs that [describe ideal characteristics].
Format: For each example: INPUT: [what the user provides] / OUTPUT: [the ideal response]. After the 3 examples, explain in 2 sentences what makes them effective as training examples.

// What to build for your portfolio
  • Domain-specific prompt library — 20+ tested prompts with documented expected outputs and failure modes
  • Evaluation rubric — a scoring system for rating prompt quality across reliability, format adherence, and output quality
  • Before/after case studies — 5+ examples showing a bad prompt, what went wrong, the improved version, and measurable difference
  • Multi-step reasoning chain — a prompt sequence that solves a complex analysis task step by step
// Career track
Prompt Engineer

Designs, tests, and maintains structured prompts for production AI systems. Builds reusable libraries, runs A/B evaluations, and ensures reliable output quality at scale.

Target roles

Prompt Engineer · AI Content Strategist · AI Product Manager · LLM QA Specialist · AI-Enabled Analyst

All 8 career tracks →