top of page

Prompting 101: How to Talk to AI

  • ShiftQuality Contributor
  • Oct 12, 2025
  • 6 min read

There's a growing industry around "prompt engineering" that makes it sound like a dark art. Secret formulas. Magic words. Ten-thousand-dollar courses on how to whisper the right incantations at a language model.

It's not that complicated. Prompting is communication. The same principles that make you effective at writing a clear email, a useful bug report, or a precise question to a colleague apply directly to working with AI. If you can explain what you want to a reasonably intelligent person who has no context about your situation, you can prompt effectively.

The problem isn't that prompting is hard. The problem is that most people are bad at being specific about what they actually want.

The Core Principle

Every good prompt answers three questions:

  1. What do you want? The actual task. Not a vague gesture at a topic — the specific output you need.

  2. What context does the model need? Background information it can't infer. Who's the audience? What's the domain? What constraints exist?

  3. What format should the output take? A list? A paragraph? Code? JSON? A table? If you don't specify, the model guesses. It guesses wrong a lot.

That's the whole framework. Everything else — every technique, every trick, every pattern — is a specific application of these three questions.

Bad Prompts vs. Good Prompts

Theory is cheap. Here's what this looks like in practice.

Example 1: Research

Bad: "Tell me about Python."

Good: "Explain the key differences between Python and JavaScript for someone who knows JavaScript but has never used Python. Focus on syntax differences, type systems, and common use cases. Keep it under 500 words."

The bad prompt could produce a history of the language, a tutorial, a comparison, a list of libraries — anything. The good prompt specifies the audience, the comparison point, the focus areas, and the length. The model doesn't have to guess.

Example 2: Writing

Bad: "Write a product description."

Good: "Write a product description for a 15-inch laptop aimed at software developers. Highlight the 32GB RAM, the mechanical keyboard, and the matte display. Tone should be direct and technical, not marketing fluff. Two paragraphs, 100 words max."

The bad prompt doesn't tell the model what product, who it's for, what to emphasize, or how long it should be. You'll get generic output and wonder why "AI can't write."

Example 3: Code

Bad: "Write a function to process data."

Good: "Write a Python function that takes a list of dictionaries, each with 'name' (string) and 'score' (integer) keys, and returns the top 5 entries sorted by score descending. Include type hints and a docstring. Handle the case where the list has fewer than 5 items."

"Process data" could mean literally anything. The good prompt specifies the language, input format, expected behavior, edge cases, and code style expectations.

Example 4: Analysis

Bad: "Is this a good business idea?"

Good: "Evaluate this business idea as a skeptical venture analyst: a subscription service that delivers curated office supplies to remote workers monthly, priced at $30/month. Identify the three biggest risks and the one strongest competitive advantage. Be blunt."

The bad prompt invites cheerleading. The good prompt sets a role, provides specifics, defines what "evaluate" means, and sets the tone. The model knows you want critical analysis, not encouragement.

Key Techniques

These are the patterns that show up again and again in effective prompting.

Role Setting

Tell the model who to be. "You are a senior backend engineer reviewing this code." "You are an editor checking this article for logical consistency." "You are a skeptical analyst."

This works because the model's training includes text written from different perspectives. Setting a role activates the patterns associated with that perspective. A "senior engineer" response will catch different issues than a "junior developer" response.

Chain of Thought

Add "Think through this step by step" or "Show your reasoning." For anything involving logic, math, or multi-step analysis, this produces dramatically better results. It forces the model to generate intermediate reasoning tokens instead of jumping straight to an answer — and those intermediate steps improve the final output.

Few-Shot Examples

Show the model what you want by giving it examples of the input-output pattern.

"Convert these sentences to bullet points:

Input: 'The server crashed at 3 AM because the disk was full. Nobody noticed until morning because alerting was broken.' Output:

  • Server crash at 3 AM — root cause: full disk

  • Detection delayed until morning — root cause: alerting failure

Now do the same for: 'The deployment failed because the config file was pointing at the staging database. The rollback took two hours because the previous version had been deleted from the artifact store.'"

This is one of the most reliable techniques available. Instead of trying to describe the format you want, you demonstrate it.

Constraints

Set boundaries. "Answer in three sentences or fewer." "Use only information from the text I provide." "If you're not confident, say so instead of guessing." "Do not include any code examples."

Constraints prevent the model's default behavior — which is to be verbose, agreeable, and comprehensive — from overriding what you actually need.

Common Mistakes

Being too vague. The number one failure mode. "Help me with my project" gives the model nothing to work with. It'll produce generic advice that helps no one. Get specific or get noise.

Asking too many things at once. "Explain quantum computing, compare five frameworks for it, and write me a project plan" in a single prompt will get you shallow coverage of everything and depth on nothing. Break complex requests into steps.

Not providing context. The model doesn't know your codebase, your company, your audience, or your constraints unless you tell it. "Fix this bug" without the code, the error message, and what you expected to happen is a waste of everyone's time.

Accepting the first response. Prompting is iterative. The first output is a draft. If it's 70% right, refine the prompt. If the format is wrong, specify the format. If the tone is off, describe the tone you want. Treating the first response as final is like sending the first draft of every email.

When Prompting Fails

Sometimes the problem isn't your prompt. It's the tool.

The model doesn't know. Its training data has a cutoff date. It doesn't know about your internal systems, recent events, or niche domains with minimal online documentation. No amount of prompt refinement fixes a knowledge gap.

The task exceeds its capability. LLMs are bad at precise math, complex multi-step reasoning over large datasets, and anything requiring real-world verification. If you need to calculate compound interest across 30 years with variable rates, use a spreadsheet.

You need a different tool entirely. If you need real-time data, use an API. If you need to search your documents, build a RAG pipeline. If you need guaranteed accuracy, use deterministic software. LLMs are powerful, but they're not the right tool for every job. The best prompt engineers know when to stop prompting.

If you want structured practice with prompt techniques across different models and use cases, a dedicated course will build the muscle memory faster than trial and error alone.

The Meta-Skill: Debugging Your Prompts

Here's the skill that separates people who get inconsistent results from people who get reliable ones: when the output is wrong, assume the prompt is the problem first.

The model did exactly what you asked — you just didn't ask what you thought you asked. Read your prompt as if you had no context about your situation. Is the task actually clear? Did you provide enough information? Did you specify the format? Did you set the right constraints?

Most "AI failures" are prompt failures. The model can't read your mind. It can only read your prompt. Make the prompt say what you mean.

For a deeper reference on prompt patterns and their applications across different model families, a technical library with current AI content is worth having in your toolkit.

The Takeaway

Prompting isn't a mystical skill. It's clear, specific communication with a system that takes your words literally. Be precise about what you want, provide the context the model needs, specify the format you expect, and iterate when the output isn't right.

The gap between "AI gives me useless answers" and "AI is the most productive tool I've ever used" is almost always a gap in prompt quality. That's good news. It means the fix is in your hands.

Next in this series: How LLMs Are Trained — what pre-training, fine-tuning, and RLHF actually do, and why the training process determines what a model can and can't do.

Comments


bottom of page