Prompt 101
The 6 Core Prompting Techniques
These 6 techniques will transform your AI interactions from “meh” to “how did you do that?” Master them, and you will get better results from any AI tool — ChatGPT, Claude, Gemini, or any LLM.
Why Prompt Engineering Matters for Your Interview
GenAI knowledge is no longer a “nice to have” — it is a core competency tested at FAANG+ companies, top startups, and enterprise tech firms. Interviewers are increasingly evaluating how you work with AI tools, not just whether you can code from scratch.
“How do you use AI tools in your workflow?”
Interviewers want to see that you use AI strategically — not just copy-pasting outputs, but crafting prompts that produce production-quality results.
Prompt engineering for specific tasks
You may be asked to write a prompt on the spot — for code review, data analysis, writing docs, or debugging. Knowing the 6 techniques puts you ahead.
Understanding LLM limitations
Can you articulate when AI outputs are unreliable? Hallucinations, recency gaps, reasoning failures on novel problems — interviewers test this.
Responsible AI practices
Companies want engineers who think about bias, data privacy, and when NOT to use AI. Showing awareness here is a strong differentiator.
Role Prompting— Give the AI an Expert Identity
When you assign a role, the AI activates knowledge patterns associated with that expertise. A prompt that says "You are a senior tax accountant" produces fundamentally different output than one that says "Help me with taxes." The role anchors the model's tone, vocabulary, depth, and perspective — all in a single sentence.
Role Prompting
Technical reviews, specialized knowledge tasks, professional writing
You are a [role with specific expertise]. Your task is to [specific action] for [target audience/context].You are a senior data engineer with 10 years of experience building ETL pipelines. Review the following Python script and identify any performance bottlenecks, missing error handling, or anti-patterns. Explain each issue and suggest a fix.Marketing Manager: Competitive Analysis
You are a senior marketing manager at a SaaS company with 8 years of experience in B2B competitive intelligence. Analyze the following three competitor landing pages and create a competitive analysis matrix. For each competitor, identify: their primary value proposition, target persona, pricing strategy, key differentiators, and any messaging weaknesses we could exploit. Present your findings in a table followed by 3 actionable recommendations for our own positioning.Product Manager: Writing User Stories
You are a principal product manager at a fintech company with deep experience writing user stories for agile teams. I'm building a peer-to-peer payment feature for our mobile banking app. Write 8 user stories in the standard format (As a [user], I want [feature], so that [benefit]). Include acceptance criteria for each story. Prioritize them using MoSCoW (Must/Should/Could/Won't) and add story point estimates (1, 2, 3, 5, 8, 13). Flag any dependencies between stories.LLMs encode knowledge in contextual clusters. Specifying a role primes the model to access the right knowledge cluster. A "senior data engineer" role pulls in pipeline architecture, error handling best practices, and performance optimization patterns that a generic prompt would never surface.
Chain-of-Thought (CoT)— Make the AI Show Its Work
Instead of asking for a direct answer, ask the AI to reason through the problem step by step. This dramatically improves accuracy on complex tasks — math, logic, multi-step analysis, and debugging all benefit. The key insight: when a model writes out intermediate reasoning, each step conditions the next, reducing compounding errors.
Chain-of-Thought (CoT)
Math problems, estimation, logical reasoning, debugging, complex analysis
Think through this step by step before giving your final answer. Show your reasoning at each step.I need to estimate the number of piano tuners in Chicago. Think through this step by step, showing your reasoning: start with the population, estimate the number of households, the percentage that own pianos, how often they need tuning, and how many tunings a tuner can do per day.Debugging a Production Issue
Our Node.js API server is returning 502 errors intermittently — roughly 5% of requests fail, but only during peak hours (2-4 PM EST). The service runs on Kubernetes with 3 replicas, sits behind an Nginx ingress controller, and talks to a PostgreSQL database with a connection pool of 20. CPU and memory metrics look normal. Think through this step by step: What are the most likely causes? For each hypothesis, what specific metrics or logs would you check to confirm or rule it out? Walk through your debugging process in order of likelihood, and explain why you'd check each thing before moving to the next.Analyzing a Business Metrics Decline
Our SaaS product's monthly active users (MAU) dropped 12% last quarter, but revenue only dropped 3%. New user signups are flat. Think through this step by step: 1) What does the MAU-to-revenue discrepancy tell us about which user segments we're losing? 2) List all possible root causes in order of likelihood. 3) For each cause, what specific data would you look at to validate or rule it out? 4) What's the most likely explanation given the pattern, and what would you recommend as the first three actions?Few-Shot Learning— Teach by Example
Instead of describing the format you want, show it. Provide 2-3 examples of input-to-output pairs, and the AI will pattern-match your desired format, tone, and structure. This is especially powerful when the output format is nuanced or hard to describe in words — the model infers implicit rules from your examples that would take paragraphs to articulate.
Few-Shot Learning
Classification, formatting, tone matching, data transformation
Here are examples of the format I want:
Input: [example 1 input]
Output: [example 1 output]
Input: [example 2 input]
Output: [example 2 output]
Now do the same for:
Input: [your actual input]Classify these support tickets by urgency:
Ticket: "Login page returns 500 error for all users"
Urgency: P0-Critical
Reason: Complete service outage affecting all users
Ticket: "Dark mode toggle doesn't save preference"
Urgency: P3-Low
Reason: Cosmetic issue, workaround exists
Now classify:
Ticket: "Payment processing fails for international credit cards"
Urgency:Writing Release Notes from Commit Messages
Convert git commit messages into user-friendly release notes. Here are examples:
Commit: "fix(auth): handle expired JWT refresh token race condition #1247"
Release Note: Fixed an issue where users were occasionally logged out during active sessions due to a token refresh timing conflict.
Commit: "feat(dashboard): add CSV export for custom date range reports"
Release Note: You can now export your dashboard reports as CSV files for any custom date range, making it easier to share data with stakeholders.
Commit: "perf(search): add Redis caching layer to search index queries"
Release Note: Search results now load up to 3x faster thanks to improved caching under the hood.
Now convert these commits:
Commit: "fix(billing): prorate subscription changes mid-cycle correctly"
Commit: "feat(api): add webhook retry with exponential backoff"
Commit: "refactor(notifications): migrate from polling to SSE for real-time updates"Converting Natural Language to SQL Queries
Convert natural language questions into SQL queries. The database has these tables: users (id, name, email, created_at, plan_type), orders (id, user_id, amount, status, created_at), products (id, name, category, price).
Question: "How many users signed up last month?"
SQL: SELECT COUNT(*) FROM users WHERE created_at >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '1 month') AND created_at < DATE_TRUNC('month', CURRENT_DATE);
Question: "What's the total revenue from completed orders by product category?"
SQL: SELECT p.category, SUM(o.amount) AS total_revenue FROM orders o JOIN products p ON o.product_id = p.id WHERE o.status = 'completed' GROUP BY p.category ORDER BY total_revenue DESC;
Now convert:
Question: "Which users on the 'pro' plan haven't placed an order in the last 90 days?"Few-shot examples create an implicit "function" in the model's context window. The model identifies the transformation pattern between inputs and outputs, then applies that same transformation to new inputs. More examples generally increase consistency, but 2-3 is usually the sweet spot for cost vs. quality.
Constraint Setting— Define the Boundaries
Unconstrained prompts get wandering, verbose responses. Constraints focus the AI's output. The more specific your constraints, the more useful the output. Think of constraints as guardrails: they don't limit creativity — they channel it. Length, tone, format, inclusions, exclusions — each constraint eliminates an axis of ambiguity.
Constraint Setting
Any output where you need a specific format, length, or style
Generate [output type] with these constraints:
- Length: [word count or format]
- Tone: [formal/casual/technical]
- Must include: [required elements]
- Must NOT include: [things to avoid]
- Format: [bullet points/table/JSON/etc.]Write a Slack message announcing our team's migration from REST to GraphQL API.
Constraints:
- Length: 3-4 paragraphs max
- Tone: casual but informative (we're a startup)
- Must include: timeline, what developers need to do, where to find docs
- Must NOT include: technical jargon that non-engineers won't understand
- Format: Slack-friendly with emoji headersWriting Technical Documentation
Write API documentation for our user authentication endpoint.
Constraints:
- Length: 1 page max per endpoint (POST /auth/login and POST /auth/refresh)
- Tone: technical and precise, suitable for a public API docs site
- Must include: endpoint URL, HTTP method, request headers, request body (with types), response body (success + error), status codes, rate limits, and a curl example for each endpoint
- Must NOT include: internal implementation details, database schema, or references to our internal tools
- Format: Use markdown with code blocks. Follow the pattern: Description > Authentication > Request > Response > Errors > ExampleCreating a Project Brief
Write a project brief for migrating our monolithic Django application to microservices.
Constraints:
- Length: 2 pages max (approximately 800-1000 words)
- Tone: executive-friendly — technical enough for an engineering VP, clear enough for a CFO
- Must include: problem statement with business impact, proposed architecture (high-level), migration phases with timeline estimates, team resource requirements, risk assessment (top 3 risks with mitigations), and success metrics
- Must NOT include: specific code or implementation details, vendor comparisons, or technology evangelism
- Format: Use clear section headers, bullet points for key data, and a summary table for the phase timelineWithout constraints, the model picks the most statistically likely response style — which is usually generic and verbose. Constraints narrow the probability distribution, forcing the model into a specific, useful output space. This is why experienced prompt engineers always over-specify rather than under-specify.
Persona + Format— The Power Combo
Combine a specific persona with a specific output format for the most targeted results. This is the workhorse technique for professionals. You're not just telling the AI what to say — you're telling it who to be and how to deliver. This compound technique is what separates casual users from power users.
Persona + Format Combination
Professional document creation, business communication, technical writing
You are a [persona]. Create a [specific format] for [audience]. Include [required sections]. Tone should be [tone].You are a senior product manager at a B2B SaaS company. Create a one-page PRD (Product Requirements Document) for adding a "bulk export" feature to our analytics dashboard.
Include: Problem statement, User stories (3-5), Success metrics, Scope (in/out), Technical considerations.
Tone: Clear and concise, suitable for engineering handoff.Creating a Technical Design Doc
You are a staff software engineer at a company that processes 50M events/day. Create a technical design document for adding a real-time notification system.
Format: Google-style design doc with these sections:
1. Context & Problem Statement
2. Goals and Non-Goals
3. Proposed Solution (with architecture diagram described in text)
4. Data Model
5. API Design (REST endpoints with request/response schemas)
6. Scalability Considerations (throughput, latency targets, failure modes)
7. Alternatives Considered (at least 2, with pros/cons)
8. Open Questions
Tone: Technical and precise, written for a peer review audience of senior engineers. Include back-of-the-envelope capacity calculations.Writing a Performance Review
You are an experienced engineering manager who writes thoughtful, growth-oriented performance reviews. Write a mid-year review for a senior software engineer who has been strong technically but needs to improve cross-team communication and mentorship.
Format: Standard performance review structure:
1. Summary (2-3 sentences)
2. Key Accomplishments (3-4 bullet points with specific, measurable impact)
3. Strengths (2-3 with concrete examples)
4. Areas for Growth (2-3 with specific, actionable suggestions)
5. Goals for Next Half (3 SMART goals)
6. Overall Rating: Meets Expectations / Exceeds Expectations / etc.
Tone: Supportive and constructive. Use specific behavioral examples, not vague praise. Frame growth areas as opportunities, not criticisms.Persona sets the knowledge domain and communication style. Format sets the structure. Together, they eliminate the two biggest sources of off-target responses: wrong expertise level and wrong deliverable shape. A "senior PM writing a PRD" yields a dramatically different artifact than "help me plan a feature."
Iterative Refinement— The Follow-Up Loop
The first response is rarely the final answer. The best AI users treat prompting as a conversation, not a one-shot query. Refine, narrow, and sharpen. Each round of feedback gives the model more signal about what you actually need — the conversation history becomes part of the prompt itself.
Iterative Refinement
Everything — iterative refinement improves any output
Start: Generate initial response
Refine: Identify what's missing or wrong
Narrow: Give specific feedback on what to change
Repeat: Continue until the output meets your standardsRound 1: "Write a cold email to a VP of Engineering about our developer tools product."
Round 2: "Good start, but it's too generic. Make it more specific — we're selling an API monitoring tool. Reference a pain point: their team is probably spending 20+ hours/week debugging production issues."
Round 3: "Better. Now make the subject line more compelling — something that would make a VP stop scrolling. And cut the email to under 150 words."Refining a Resume Bullet Point
Round 1: "Write a resume bullet point for my work on improving the checkout flow at an e-commerce company."
Round 2: "Too vague. I specifically redesigned the 5-step checkout into a single-page flow, and it improved conversion rate. Include metrics."
Round 3: "Good but the numbers need to be stronger. The conversion rate went from 2.1% to 3.4% (a 62% relative increase), which generated an estimated $2.3M in additional annual revenue. The project took 3 months with a team of 4. Make it punchy — one bullet point, under 30 words, using the XYZ formula (Accomplished X, as measured by Y, by doing Z)."Improving an API Error Message
Round 1: "Write an error message for when a user's API rate limit is exceeded."
Round 2: "Too generic. Our API has tiered rate limits: Free (100 req/min), Pro (1000 req/min), Enterprise (10000 req/min). The error should tell the user their current tier, the limit they hit, when the limit resets, and how to upgrade. Return it as a JSON error response."
Round 3: "Almost perfect, but add a 'Retry-After' header value in the response, include a direct link to our pricing page (https://api.example.com/pricing), and make the 'message' field human-readable while keeping a machine-readable 'code' field. Also add a 'docs_url' field pointing to our rate limiting documentation."Each refinement adds context to the conversation that a single prompt could never capture. The model adjusts based on your feedback, effectively learning your preferences within the session. This is why multi-turn interactions consistently outperform single-shot prompts for complex tasks.
Combining Techniques
The real power emerges when you stack techniques together. A production-grade prompt often uses 3-4 of these at once:
// Role + Constraints + Chain-of-Thought + Format
You are a senior backend engineer reviewing a pull request.
Review the following Go code for a rate limiter middleware.
Think through each issue step by step before suggesting a fix.
Constraints:
- Focus on concurrency safety, memory leaks, and edge cases
- Ignore style/formatting issues
- Severity rating for each issue: Critical / Warning / Nit
Format your response as:
1. Issue title (severity)
Description of the problem
Suggested fix with code snippet
This single prompt uses Role Prompting (senior backend engineer), Chain-of-Thought (think step by step), Constraint Setting (focus areas + exclusions), and Persona + Format (structured output). Four techniques, one prompt.
The RTCROS Framework
A Structured Formula for Prompt Engineering
RTCROS is a structured prompting framework that transforms generic AI outputs into specialized, actionable answers. Instead of improvising every prompt, RTCROS gives you a repeatable formula that reduces hallucinations, ensures consistency, and produces higher-quality results every time.
The RTCROS Pipeline
Role
Define the AI's expertise and perspective. “Act as a senior copywriter with 15 years in B2B SaaS.” The role anchors the model's vocabulary, depth, and professional standards.
Task
State exactly what the AI must do. “Write a 500-word blog post about customer retention strategies.” Be specific about the deliverable — vague tasks produce vague outputs.
Context
Provide background, target audience, and constraints. “The audience is mid-market CTOs evaluating their first AI tooling investment.” Context prevents generic, one-size-fits-all responses.
Reasoning
Guide the AI's thought process. “Compare option A vs B on cost, scalability, and implementation time.” Tell the model how to think, not just what to produce.
Output
Specify the format of the response. “Present as a comparison table with columns for each option and rows for each criterion.” Tables, bullet points, markdown, email, code — tell the model exactly what shape to produce.
Stop Conditions
Set boundaries and guardrails. “Keep it under 3 sentences. End with a clear call to action. Do not include pricing.” Stop conditions prevent the model from going off-track or producing too much.
RTCROS in Action — Full Example
[R] You are a senior revenue operations analyst with expertise in SaaS metrics and pipeline forecasting.
[T] Analyze our Q4 pipeline data and create a forecast accuracy report.
[C] We are a Series B SaaS company with $12M ARR, 45-day average sales cycle, and a 3-stage pipeline (Qualified → Demo → Negotiation). Our historical win rates are: Qualified 15%, Demo 35%, Negotiation 65%.
[R] Compare our weighted pipeline forecast against a stage-adjusted model and a historical conversion model. Identify which deals are most at risk of slipping based on time-in-stage anomalies.
[O] Present as: (1) Executive summary (3 bullet points), (2) Forecast comparison table, (3) Top 5 at-risk deals with recommended actions.
[S] Keep the executive summary under 100 words. Do not include individual rep performance data. End with a confidence rating (High/Medium/Low) for the overall forecast.
Reduced Hallucinations
Clear context and constraints keep the AI grounded. Specificity leaves less room for the model to invent facts or go off-topic.
Consistency
A repeatable framework means you get reliable results across different tasks, teams, and sessions — not hit-or-miss quality.
Higher Quality
The framework forces you to think through the prompt before sending it. Better inputs always produce better outputs — garbage in, garbage out applies to AI too.
RTCROS is widely used in Revenue Operations (RevOps), marketing content generation, sales enablement, and business analysis. It makes AI a more reliable assistant by turning prompt writing from an art into a systematic process.
Prompt Quality Checklist
Prompt Quality Checklist
0/6Before you send your next prompt, run through this checklist. You do not need every item for every prompt — but the more boxes you tick, the better your results will be.
Tools to Practice With
The best way to internalize these techniques is to practice them. Here are the top AI tools you can use right now — each has different strengths.
ChatGPT
General purpose, plugins, custom GPTs
Claude
Long context, nuanced writing, coding
Claude Code
CLI tool for developers — agentic coding in your terminal
Google NotebookLM
Document analysis, AI-generated audio summaries
Gemini
Google ecosystem integration, multimodal
Perplexity
Research with citations, real-time web search
Learn More
Go deeper with official prompt engineering guides from the companies building the models.
Prompt Engineering Guide
AnthropicOfficial best practices for prompting Claude, including techniques, examples, and advanced strategies.
Prompt Engineering Guide
OpenAISix strategies for getting better results from GPT models, with detailed tactics and examples.
Prompt Design Strategies
GoogleGoogle's guide to effective prompt design for the Gemini API, covering system instructions and multimodal prompting.
Learn Prompting
LearnPrompting.orgFree, open-source course on communicating with AI. Covers basic to advanced techniques with interactive exercises.
What’s Next?
Now that you know the fundamentals, pick your persona for role-specific prompts and deeper techniques.