Guides · Practical how-to for building with AI

Guides

Task-focused walkthroughs for real problems you hit when working with AI. Each guide explains the problem, gives concrete steps, and points you to the exact tools, resources and workflows that do the work — you run the prompts in your own AI assistant and stay in control of the result.

Browse guides

73 guides

Structured Outputs & JSON

How to Make AI Return Valid JSON Every Time

AI models return broken JSON more often than you'd expect. Here's how to structure a prompt so the output parses cleanly, plus what to check before you trust it.

7 min read
Prompt Engineering

How to count tokens in a prompt before you send it

Counting a prompt's tokens before you send it tells you whether it fits the model, what it will cost, and whether the end might get cut off. Here's how to check and trim.

7 min read
AI Project Context & Handoffs

How do I move context between two AI chats without repeating myself?

Starting a fresh AI chat shouldn't mean re-explaining the whole project. Here's how to turn the important parts of one conversation into a clean handoff you paste into the next.

7 min read
Software Development with AI

How to Review AI-Generated Code Without Missing Risky Changes

AI-written code usually compiles and passes a quick test while hiding the real risks — a missing auth check, a destructive update, an untested edge case. Here's a review path that surfaces them before you merge.

8 min read
Context & Long Documents

How to Split Long Documents for AI Without Losing Context

A document too long for the model has to be split — but a blind split makes the AI forget earlier parts, drift on definitions, and lean on whatever it saw last. Here's how to split and synthesize without losing the thread.

8 min read
Structured Outputs & JSON

How to Stop AI From Inventing Missing Data

When a source is missing a field, AI tends to fill the gap with a plausible guess instead of saying it isn't there. Here's how to make the model mark missing data explicitly — and check the result before you trust it.

8 min read
Prompt Engineering

How to Turn a Messy AI Conversation Into a Reusable Prompt

After a dozen corrections, the AI finally gives you what you wanted — but the prompt that produces it is smeared across the whole chat. Here's how to distill it into one reusable prompt you can run again.

8 min read
AI Project Context & Handoffs

How to Keep AI From Forgetting Project Decisions

Over a long project, AI keeps reopening decisions you already settled — re-suggesting the option you rejected, softening a constraint, renaming things. Here's how to turn those decisions into a block the model reads before it works.

8 min read
Prompt Engineering

How to Turn a Good Prompt Into a Reusable Template

You have a prompt that works, but you rewrite it by hand every time something changes — and sometimes you miss a spot or break a rule that mattered. Here's how to turn it into a template with variables for what changes and fixed rules for what shouldn't.

8 min read
Prompt Engineering

How to Make AI Follow Your Brand Voice Consistently

AI nails your brand voice on one output, then slides back to generic hype on the next — banned words, wrong tone, dropped format. Here's how to turn your voice into rules, a banned list, examples, and a checklist the model can actually follow.

8 min read
Structured Outputs & JSON

How to Keep AI Output Format Consistent

The AI nails your format once, then the next output adds a "Sure, here's…" wrapper, renames a field, turns the table into bullets, and drops a section. Here's how to write the format as a contract and catch the drift when it happens anyway.

8 min read
Structured Outputs & JSON

How to Extract Data From Documents With AI Without Losing Evidence

AI pulls the fields you asked for, but hands back a flat list with no way to tell which values it read from the document and which it guessed. Here's how to make each extracted value carry its source quote, location, and a review flag — so you can check the result instead of trusting it.

9 min read
Context & Long Documents

How to Review AI Output Against a Source Document

An AI summary reads perfectly, but you can't tell if every sentence is in the source or whether a "may" hardened into a "will." Here's how to review AI output claim-by-claim against the document it came from, so unsupported and overstated claims surface before you rely on them.

9 min read
Context & Long Documents

How to Compare Two Versions With AI Without Missing Important Changes

Ask AI to compare two drafts and it often says "mostly the same" — smoothing over the one edit that flipped a "may" into a "must" or a deadline from 30 days to 45. Here's how to structure the comparison so every change is enumerated, classified by its impact, and the risky ones are flagged for review.

9 min read
Context & Long Documents

How to Stop AI From Mixing Facts From Different Sources

Give AI several sources and it pours them into one bowl — attributing Source A's claim to Source B, averaging a real conflict into a smooth "customers generally think," and calling it consensus. Here's how to keep each source separate and attributed so the facts stay traceable to where they came from.

9 min read
Prompt Engineering

How to Make AI Follow Acceptance Criteria

The output reads well and answers the question, so you almost ship it — then you notice it broke a rule you cared about and skipped a section you needed. "Looks good" was never the test. Here's how to give AI the acceptance criteria up front and check the output against them before you rely on it.

9 min read
Prompt Engineering

How to Revise AI Output Without Breaking What Already Works

The draft is 90% right and you ask AI to fix the one thing that's wrong — and it hands back a whole new version with the good parts rewritten worse. Here's how to ask for a targeted edit that fixes what's broken and leaves the rest exactly as it was.

9 min read
Prompt Engineering

How to Break a Large AI Task Into Safer Smaller Prompts

Ask AI to do six things in one prompt and you get a long answer that's thin everywhere — with a wrong assumption in the first paragraph quietly shaping the rest. Here's how to turn one big request into a sequence of small prompts you can review one at a time.

9 min read
Prompt Engineering

How to Find Gaps in an AI-Generated Plan Before You Use It

The plan AI hands you reads clean and complete — until you try to execute it and hit the missing rollback, the unnamed owner, the decision nobody made. Here's how to run a separate gap-review pass that surfaces what's missing, risky, or unclear before you act on it.

9 min read
Prompt Engineering

How to Turn Requirements Into an AI Execution Plan

Paste a requirement and ask AI for a plan, and you usually get the requirement summarized back or a generic to-do list that can't actually be executed. Here's how to normalize the requirement first, then have AI build a plan with the ordering, dependencies, and checkpoints a summary leaves out.

9 min read
Prompt Engineering

How to Make AI Ask Clarifying Questions Before It Answers

Give AI a vague request and it answers instantly — guessing your audience, tone, scope, and half the missing facts, then handing you something polished and wrong. Here's how to add a clarify-before-answer gate so the model surfaces what it's missing as questions first.

9 min read
Prompt Engineering

How to Make AI Compare Options Before Recommending One

Ask AI which option to pick and it names one in the first sentence — no criteria, no options laid side by side, its assumptions hidden. Here's how to make it compare the choices against explicit criteria first, then recommend with caveats you can actually check.

10 min read
Prompt Engineering

How to Make AI Separate Facts, Assumptions, and Recommendations

Ask AI to analyze something and it hands back one smooth paragraph where you can't tell what you told it from what it assumed from what it's recommending. Here's how to make it split the answer into visible layers — facts, assumptions, inferences, recommendations, and what still needs checking.

10 min read
Prompt Engineering

How to Ask AI for Risks Before You Accept Its Answer

AI hands you a clean recommendation that reads as ready to use — and never shows you which assumption breaks it, which edge case sinks it, or what needs a human's eyes. Here's how to run a separate risk pass on an answer before you accept it.

10 min read
Prompt Engineering

How to Create an AI QA Checklist Before Using Generated Content

AI hands you a polished email, landing page, or support reply that looks ready to send — and only after you send it do you find the claim you can't back or the audience you got wrong. Here's how to build a reusable QA checklist and review generated content against it first.

10 min read
Prompt Engineering

How to Give AI Examples Without Making It Copy Them

Give AI a competitor page or an old email as an example and it hands back a near-clone — same sentence skeleton, the reference's phrases and claims carried straight over. You wanted the style; you got the text. Here's how to give examples as a signal, not a copy source.

10 min read
Prompt Engineering

How to Turn AI Feedback Into a Revision Checklist

AI review comes back as six scattered notes — some vague, some contradictory, one that would wreck the part you liked. Here's how to triage it into a prioritized revision checklist: accept, reject, or defer each note, protect what must stay, and set the order before you edit.

10 min read
Prompt Engineering

How to Make AI Generate Cleaner First Drafts With Fewer Revisions

"Write a professional email" comes back smooth, generic, and aimed at the wrong reader — so you burn three rounds feeding in details you should have led with. Here's how to write a short first-draft brief up front, so the draft lands closer to what you needed.

10 min read
AI Project Context & Handoffs

How to Prepare Context Before Starting a New AI Chat

Open a fresh chat, type "continue where we left off," and the model just guesses — it knows nothing about the project, the decisions, or the goal. Here's how to assemble a short context packet first, so a new chat starts aimed instead of blind.

9 min read
Prompt Engineering

How to Make AI Say What Would Change Its Answer

AI hands back a clean "yes" with no sign of what it's resting on or what would flip it. Here's how to make the model show its load-bearing assumptions and the specific changes that would flip, narrow, or defer its recommendation — so you see how fragile the answer really is.

10 min read
AI Project Context & Handoffs

How to Make AI Create a Decision Log You Can Review Later

Weeks later, all that survives a decision is "we chose export first" — the why, the rejected option, and the assumption are gone. Here's how to have AI write a decision log: the decision, the reasoning, the options turned down, the assumptions, and a trigger to revisit it.

9 min read
Software Development with AI

Make AI Explain Unfamiliar Code Before You Change It

Type "refactor this" on code you don't fully understand and the AI — which understands it no better — rewrites a load-bearing line. Here's how to run an explanation pass first: what the code does, what it assumes, and which lines are risky to touch, before you change anything.

9 min read
Prompt Engineering

Improve a Weak Prompt Without Starting Over

A weak prompt usually isn't all wrong — it's a good ask with two or three decisions left unmade. Here's how to diagnose why it underperforms, keep the parts that work, and patch the weak ones, instead of deleting it and starting from a blank line.

9 min read
Context & Long Documents

Summarize a Document With AI Without Distorting It

AI summaries read clean but quietly distort — an exception dropped, a "may" turned to "will," a target read as a guarantee. Here's how to summarize a document faithfully: scope it, name what must be preserved, keep the caveats, and check it back against the text.

10 min read
Software Development with AI

Get AI to Debug Without Chasing the Wrong Cause

Paste an error, say "fix this," and AI patches the first thing it sees — the symptom clears, the real cause stays. Here's how to run a debugging pass that works from symptoms and evidence to a root cause, and holds off on a fix until the evidence points at one.

10 min read
Structured Outputs & JSON

Classify and Tag Data With AI Consistently

AI tags one batch pricing, billing, bug — then tags the same items cost, plan confusion, error next week, so every count measures a moving target. Here's how to classify and tag data consistently: fix a taxonomy, define every label, and hold the rules steady across runs.

10 min read
Prompt Engineering

Write a Role Prompt That Doesn't Overreach

"Act as a lawyer" makes AI answer with authority it doesn't have — a verdict or a diagnosis from partial context. Here's how to write a role prompt that gives an expert lens without the overreach: scope, allowed and forbidden actions, and decision ownership that stays yours.

10 min read
Structured Outputs & JSON

Turn a Meeting Transcript Into Decisions and Actions

"Summarize this transcript" turns suggestions into decisions, invents deadlines, and drops owners. Here's how to extract decisions, action items, owners, deadlines, and open questions instead — each with evidence and a needs_review flag, and "not stated" for what's missing.

10 min read
Software Development with AI

Generate Tests for AI-Written Code

Ask AI for tests and you get a green suite that only checks the happy path and agrees with the code's bugs. Here's how to generate behavior-focused tests: give the model the intended behavior as the source of truth, cover boundaries and errors, and review them yourself.

10 min read
Prompt Engineering

Keep AI From Building More Than You Asked

You ask for a one-line fix and get a sixty-line diff — a refactor, a fallback, some renames "while it's in there." Here's how to keep AI from building more than you asked: state the exact change, spell out the non-goals, cap the blast radius, and make it show a plan first.

10 min read
Prompt Engineering

Choose Between Two Prompts Objectively

Asked "which prompt is better?", you pick the one that reads better — and it can produce worse output on real inputs. Here's how to choose objectively: turn "better" into criteria tied to your goal, run both on the same test inputs, and score the outputs against one rubric.

10 min read
Prompt Engineering

Use AI to Turn Requirements Into Acceptance Criteria

Hand AI a vague requirement like "improve onboarding" and it fills the blanks with its own guesses — nobody said what "done" means. Here's how to turn a requirement into observable, testable acceptance criteria you can review before any implementation.

10 min read
Software Development with AI

Refactor Code With AI Without Changing Behavior

"Refactor this to be cleaner" returns tidier code that quietly changed the null handling and an error type — a silent regression. Here's how to refactor with AI without changing behavior: name a small goal, list what must stay identical, forbid fixes, and verify the diff.

10 min read
Software Development with AI

Write a Rollback Plan With AI Before You Ship

AI deployment plans end at "roll back if needed" — no trigger, no undo steps, no flag on what can't be reversed. Here's how to write a rollback plan before you ship: a measurable trigger, the reverse of every step, the parts you can't undo, and who makes the call.

10 min read
Prompt Engineering

Tell Reversible From Irreversible Decisions With AI

Before asking AI which option to pick, have it classify the decision's reversal cost — reversible, hard-to-reverse, or irreversible — so you move fast on the easy calls and slow down on the one-way doors. A candidate reading you confirm, not a verdict it issues.

10 min read
Structured Outputs & JSON

Design an Extraction Schema Before You Extract

AI extraction returns clean JSON that quietly means something different each run. Design the extraction schema first — each field's meaning, type, allowed values, missing-value rule, and required evidence — and review it before a single record is pulled.

10 min read
Prompt Engineering

Clean Up a Messy Prompt Before You Reuse It

A prompt that worked once still carries the last job — old names, stale dates, one-off details, buried contradictions. Here's how to clean it up before reuse: keep the intent, strip the residue, turn reusable details into placeholders, and flag the conflicts instead of guessing.

10 min read
Context & Long Documents

Make AI Cite the Source Line for Every Claim

"Cite sources" gets you one citation for a whole answer. Here's how to make AI attach a source quote and location to every factual claim, label quote vs paraphrase vs interpretation, and flag anything unsupported — so checking a claim is a glance, not a hunt.

10 min read
Prompt Engineering

Build a Decision Matrix With AI

Ask AI "which option is best?" and it returns a one-line pick with the criteria hidden and unknowns scored like facts. Here's how to build a decision matrix with AI: options against weighted criteria you approve, a reason per score, unknowns kept separate, and a sensitivity check.

10 min read
Prompt Engineering

Add Confidence Labels to AI Answers

AI answers come out in one confident tone — fact, guess, and a recommendation resting on missing info sound equally sure. Here's how to add confidence labels to AI answers: a high/low/needs-review label, a reason, and a review action per claim — a review aid, not a truth score.

10 min read
Software Development with AI

Get AI to Explain a Codebase for Onboarding

Ask AI to "explain this codebase" and you get generic architecture and "read the controllers" — no reading order, no flow, nothing to act on. Here's how to explain a codebase for onboarding: a map of folders and flow, a reading path, safe first tasks, and the unknowns to confirm.

10 min read
Prompt Engineering

Structure a Rambling Prompt Into Clear Sections

You cram the goal, context, constraints, format, and an example into one run-on prompt, and the AI misses half of it. Here's how to structure a prompt into sections: sort each instruction into Goal, Context, Task, Constraints, Output, and Non-goals — no rewriting, so the gaps show.

10 min read
Prompt Engineering

Set an MVP Scope Guardrail With AI

Ask AI to "plan an MVP" and it hands you auth, a dashboard, billing, admin, and analytics — a platform, not a minimum. Here's how to set an MVP scope guardrail with AI: name the one assumption to test, split must-have from later, and park the not-now ideas before the plan bloats.

10 min read
Context & Long Documents

Build an Evidence Table From Sources With AI

Ask AI to "summarize these sources and list the findings" and one interview becomes "customers," a real disagreement disappears, and no claim shows its source. Build an evidence table instead: one row per claim, with its source, exact quote, and how strong the support really is.

10 min read
Prompt Engineering

Turn an Outline Into a Draft With AI

You wrote the outline; AI "turns it into a draft" and quietly renames your headings, drops a bullet, and invents a statistic. Turn an outline into a draft with AI that keeps the outline: preserve the structure, expand every bullet, and flag gaps instead of inventing them.

10 min read
Software Development with AI

Optimize a Slow SQL Query With AI

Ask AI to "make this query faster" and it guesses — it never saw your execution plan and doesn't know your indexes or row counts. Optimize a slow SQL query with AI instead: bring the evidence, diagnose before you change, and prove the result before it ships.

11 min read
Prompt Engineering

Rewrite Content With AI Without Changing the Meaning

Ask AI to "make this sound better" and "can help" becomes "guarantees" while "does not" quietly flips — the polish is real and so is the drift. The meaning-preserving rewrite: lock the claims, ban the stronger verbs, and diff the result so no silent change reaches the reader.

10 min read
Prompt Engineering

Give an AI Agent Clear Stop Conditions

You wrote what the agent should do, but not when to stop — so it keeps going, retries a failing tool, guesses a missing field, and approves what it should escalate. Give an AI agent clear stop conditions: a success stop, effort caps, and the stops that send it back to you.

11 min read
Context & Long Documents

Resolve Conflicting Sources With AI

Three sources disagree, you ask AI which is right, and it hands you a confident average that folds a sales objection into a churn analysis. Resolve conflicting sources with AI: map the conflict, compare scope and method, and keep "unresolved, needs review" a real outcome.

11 min read
Structured Outputs & JSON

Handle Unknown vs Empty vs Not-Applicable in AI Output

Ask AI to extract fields with "use null if missing" and one null means missing, false, a stated "none", and a real zero — valid JSON, wrong meaning. Handle unknown vs empty vs not-applicable in AI output: give each field a value state so absence gets classified, not collapsed.

11 min read
AI Project Context & Handoffs

Build a Project Glossary So AI Uses Your Terms

Give the AI context and it still writes "AI app builder" for your platform and "cart" for your basket — near-synonyms that change your meaning. Build a project glossary so AI uses your terms: define what each word means, name the synonyms to avoid, and paste it in your own tool.

11 min read
Prompt Engineering

Set Escalation Rules for an AI Assistant

Your support assistant handles routine tickets, then approves a $900 refund on a case with a legal threat — deciding what it should have handed off. Set escalation rules for an AI assistant: define the triggers, name who each goes to, and have it produce a handoff packet.

11 min read
Structured Outputs & JSON

Normalize Messy Inputs Before AI Processes Them

Paste a messy export and "classify these rows" and the AI splits one bug into three categories, mixes currencies, and counts three duplicate rows as three problems — silently. Normalize messy inputs before AI processes them: standardize the formats and flag the ambiguous cases.

11 min read
Software Development with AI

Prepare a Code-Change Review Packet for a Teammate

You finished an AI-assisted fix and sent your teammate a bare diff — so they skim and approve, or burn an hour reconstructing the context you had. Prepare a code-change review packet: the intent, the must-not-change behavior, the risks, and the tests you didn't run.

11 min read
Prompt Engineering

Decide When to Defer a Decision With AI

You ask AI which option to pick and it hands back a confident call — even when the real answer is that the decision isn't ready to make yet. Here's how to make AI weigh cost of delay against cost of being wrong and choose decide-now, a reversible step, or a dated deferral.

10 min read
Prompt Engineering

Track What Changed Between Prompt Versions

You tighten a prompt, ship v2, and the output quietly gets worse — because a rewrite that reads cleaner can drop a rule doing real work. Here's how to track what changed between two prompt versions: the literal edits, what each does to behavior, and the tests to run first.

10 min read
AI Project Context & Handoffs

Clean Up Stale Context Before It Misleads AI

You paste last month's project context and tell AI to continue — but half of it is superseded: the direction changed, a decision reversed, a deadline passed. The model treats the stale parts as current and aims the output wrong. Here's how to audit context before it misleads AI.

10 min read
Context & Long Documents

Estimate Whether Your Input Fits the Context Window

You line up a transcript, three docs, and the project context and assume it'll all fit. But a model's window is shared with its own answer — so "it fits" can still truncate the reply. Here's how to estimate whether your input fits the context window, answer and margin included.

9 min read
Prompt Engineering

Get Multiple Angles From AI Without Near-Duplicates

You ask AI for 10 headline options and get one idea reworded 10 times — same claim, same opening, same proof, just different words. Here's how to get genuinely different angles: name the strategic axes first, then make AI audit its own set for near-duplicates before you pick.

10 min read
Structured Outputs & JSON

Define Fields So AI Fills Them the Same Way Every Time

You ask AI to fill a table — issue_type, priority, reason — and the same column gets filled by different logic each row: priority as urgency here, sentiment there. Here's how to define each field's meaning, allowed values, and include/exclude rules so AI fills them consistently.

10 min read
Prompt Engineering

Define Tool-Use Boundaries for an AI Agent

You give an AI agent tools — search, draft, send, refund — and say "use them as needed," so it drafts a reply and reports the refund as done without asking. Here's how to write tool-use boundaries: which tool for what, read vs write, and what needs a human before it fires.

10 min read
Prompt Engineering

Set Kill Criteria for an Option With AI

You ask AI "should we keep pursuing this?" and get "it could be valuable — keep testing," so a weak option survives on hope. Here's how to set kill criteria first: the observable evidence, threshold, deadline, and owner that decide, in advance, when to drop it.

10 min read
AI Project Context & Handoffs

Extract Action Items From an AI Conversation

A long AI chat ends with a dozen suggestions — some you accepted, some you rejected, some already done — and "list the to-dos" turns all of them into pending tasks. Here's how to extract action items sorted by state, tied to evidence, with finished work kept out of the queue.

10 min read