
Introduction
Tabletop RPGs are all about creating unforgettable stories with your friends. Whether it’s a last-minute plot twist, an unexpected character moment, or a talking squirrel leading a woodland uprising, the best moments are often the ones no one saw coming. But that unpredictability can make a Game Master’s job tough—especially when players take the story in directions you never planned.
This is where a well-prompted AI assistant can become your secret weapon. Inspired by OpenAI's latest recommendations on effective prompting, this guide will show you how to write prompts that get practical, game-ready results. Need a morally gray villain with a compelling backstory? A port city that feels alive with culture and conflict? Or an NPC who can react naturally to player choices? With the right prompt—clear, specific, and tailored to your world—AI can help you bring those ideas to life faster than ever before.
You’ll learn the latest and greatest prompting techniques using the key elements of a good prompt, including Goal, Return Format, Warnings, and Context, and see examples that cover world-building, NPC creation, dungeon design, and more.
Because when the rogue decides to pickpocket the king during a diplomatic dinner, you’ll be ready to turn their chaos into the next great chapter of your shared story.
“No plan survives contact with the players.” — Every Game Master Ever
OpenAI Prompt Structure

The Anatomy of an AI Prompt for GMs
A good AI prompt is like giving directions to a mischievous genie—you need to be clear and specific, or you might end up with something wildly unexpected. Every effective prompt has four key parts:
Goal: What do you need? Describe the task clearly. Are you building a morally gray villain, creating a haunted forest, or developing a plot twist with long-term consequences? The more specific your goal, the better the results.
Return Format: Tell the AI how to present the information. Need a quick character profile? Ask for bullet points. Want immersive world lore? Request a detailed paragraph. The right format makes the output more usable at the table.
Warnings: Specify what to avoid or what tone to maintain. Want a villain who's morally complex, not cartoonishly evil? Say so. Need a dungeon that’s eerie but not outright horror? Let the AI know. This keeps the results aligned with your campaign’s vibe.
Context: Give the AI the essential details and have it converse with you to get those details. Is your world a crumbling empire clinging to lost glory? Are your players hunting a relic tied to ancient shadow magic? The AI doesn’t know your world, so a bit of context helps it create something that fits right in.
I am starting to add this sentence at the end of many of my prompts. "Ask me questions, one at a time, until you have enough information to create a detailed outline for {insert topic}."
Think of these four elements as the ingredients of a magic spell. Leave one out, and the results might still work—but nail all four, and you’ll get exactly what you need.
“The secret we should never let the gamemasters know is that they don't need any rules.”— Gary Gygax, Co-creator of Dungeons & Dragons
Writing AI Prompts: Best Practices for GMs
Using AI as a Game Master is like having an all-knowing co-DM ready to brainstorm, create, and improvise with you. But to get the best results, you need to approach it as a creative partner, not a magic vending machine. Here are some best practices to help you write prompts that deliver useful, game-ready content:
Treat AI as a conversational partner.
Instead of asking for a single answer, start a dialogue. For example:
“I need an NPC who believes they’re the hero of their story. Can you describe their motivations and how they justify their actions? Then, give me an example of how they’d confront the player party. Ask me questions, one at a time, until you have enough information to create this NPC.”
This back-and-forth approach helps refine the character into someone more believable and engaging.
Be specific but concise.
The AI needs clear instructions to generate content that fits your campaign. Include key details without overwhelming it.
Compare:
❌ “Make a port city for my D&D game.” (Too vague)
✅ “Design a coastal city known for its decaying fishing industry and rumors of a cursed relic. Include its economy, local legends, and key locations. Ask me questions one at a time until you have enough information to create a detailed outline for my city.”
Use tone and style cues.
If your world is dark and morally gray, say so. If you need something lighthearted and whimsical, mention that. Examples:
“Describe a forest that feels ancient, eerie, and full of unseen eyes. Ask me questions one at a time until you have enough information to create a detailed outline for my forest.”
“Create a villain with a tragic backstory who genuinely believes their actions are justified. Ask me questions one at a time until you have enough information to create a detailed outline for my villain.”
Adjust complexity based on your needs.
Use quick prompts for spontaneous moments during sessions and more detailed prompts for pre-session prep. For example:
Quick: “Give me three pirate crew names and their captains.”
Detailed: “Describe a pirate crew led by a former naval officer who turned rogue after being betrayed. Include the ship’s name, three key crew members, and their motivations. Ask me questions one at a time until you have enough information to create a detailed outline for the ship and crew.”
Iterate and refine. Don’t be afraid to ask follow-up questions or request variations. If the first result doesn’t quite fit, provide feedback:
“That’s good, but I need the villain to be more manipulative and less physically imposing. Can you adjust their personality and tactics? Give me 3 examples of how they might react.”
Have a conversation: Converse with the AI until it gets things correct.
Let AI ask you questions. Encourage the AI to ask clarifying questions if your initial prompt is too vague. This back-and-forth can help refine ideas until you get the perfect result.
Example 1: Creating a Morally Gray Villain
GM: “Create a morally gray villain who opposes the players but believes they’re doing the right thing. Ask me questions one at a time until you have enough information to create a detailed outline for my villain.”
AI: “What is the villain’s core motivation? Are they protecting someone, seeking justice, or trying to prevent a greater evil?”
GM: “They’re seeking justice for their destroyed homeland, even if it means hurting others to achieve it.”
Example 3: Responding to Player Choices On the Fly
GM: “The players bypassed the main villain’s guards and snuck into their lair. How should the villain react?”
AI: “Do you want the villain to confront the players directly, set traps to slow them down, or reveal clues about their tragic backstory as they move through the lair?”
GM: “Reveal environmental clues about their backstory, but also set up traps that reflect their twisted worldview.”
Examples of AI Prompts for Different GM Tasks
AI can help with everything from building entire cities to crafting quick NPCs on the fly. Each example below uses the four key prompt elements: Goal, Return Format, Warnings, and Context.
A. World-Building: Designing a Port City
Goal: Create a morally gray port city struggling with elemental decay.
Return Format: Paragraphs for lore, bullet points for character hooks.
Warnings: Maintain a tone of muted gothic realism; avoid clichés like “city of thieves.”
Context: The city’s fishing industry is dwindling, and rumors of a pirate fleet loom.
Prompt:“Describe a port city suffering from elemental decay. Its economy is failing due to dwindling fish stocks, and rumors of a pirate fleet are spreading fear. Maintain a muted gothic tone without falling into clichés like ‘city of thieves.’ Return the city’s lore in two paragraphs and provide three character hooks as bullet points. Ask me questions, one at a time, until you understand the final result.”
B. NPC Creation: A Villain with Justifiable Motives
Goal: Generate an NPC who opposes the player party’s goals but believes they are the hero of their story.
Return Format: Concise profile with a short dialogue script.
Warnings: Avoid one-dimensional villain stereotypes.
Context: The NPC’s actions are driven by personal loss connected to the party’s mission.
Prompt:“Create a villain who believes they are the hero of their story. Their motivations are rooted in personal loss connected to the player party’s mission. Avoid one-dimensional stereotypes. Return a short profile (name, appearance, personality, and goal) and a quick example of their dialogue. Ask me questions, one at a time, until you understand the final result.”
C. Designing a Dungeon: The Shadow Druid’s Lair
Goal: Design a shadow-infused dungeon corrupted by ancient magic.
Return Format: Bullet points with short descriptions for each room.
Warnings: Maintain an atmosphere of creeping dread, not jump-scare horror.
Context: The dungeon is the lair of a corrupted druid and is shaped by their twisted nature magic.
Prompt:“Design a dungeon corrupted by ancient shadow magic. The final threat is a druid twisted by their desire to preserve the dungeon’s power. Focus on creeping dread rather than jump-scare horror. Describe five key rooms as bullet points, each with a brief description of its atmosphere and dangers. Ask me questions, one at a time, until you understand the final result.”
D. Plot Twists: The Relic’s Consequences
Goal: Suggest three plot twists involving a powerful relic the players are seeking.
Return Format: Three concise paragraph summaries.
Warnings: Twists should present moral dilemmas, not just surprise obstacles.
Context: The relic is rumored to restore life but carries dangerous consequences.
Prompt:“Suggest three plot twists involving a relic that can restore life. Each twist should create a moral dilemma rather than a simple obstacle. Return three short paragraph summaries that highlight the potential consequences of using the relic. Ask me questions, one at a time, until you understand the final result.”
E. Responding When Players Go Sideways (Live Session Example)
Goal: Describe how the villain reacts when players bypass their defenses.
Return Format: Quick descriptive paragraph with key details.
Warnings: Maintain tension without punishing the players’ creativity.
Context: The villain’s lair reveals their tragic backstory through environmental clues.
Prompt:“The players have bypassed the main villain’s defenses and entered their lair. Describe how the villain reacts, balancing tension with respect for the players’ creativity. Include environmental details that hint at the villain’s tragic backstory. Ask me questions, one at a time, until you understand the final result.”
5. Ready-to-Use Templates for GMs
Writing AI prompts becomes faster and more reliable when you use templates designed for specific tasks. Below are four templates tailored for towns, dungeons, characters, and plot twists. Each template follows the structure of Goal, Return Format, Warnings, and Context and ends with the instruction: “Ask me questions, one at a time, until you understand the final result.”
“It’s not about the gold or the loot—it’s about the stories you create with your friends.”— Chris Perkins, Principal Story Designer for Dungeons & Dragons
A. Town Template
Goal: Describe a town with unique cultural traits and social challenges.
Return Format: Paragraphs for lore, bullet points for key locations and NPC hooks.
Warnings: Keep the tone consistent with the world’s aesthetic. Avoid stereotypes like “thieves’ guild” or “noble council.”
Context: Include the town’s economy, seasonal festivals, and any local myths or threats.
Starting Prompt: "Read the following campaign overview document" {Upload Campaign Planning Document"}, reply with "I understand".
Next Prompt
Prompt Template:“Describe a town with distinct culture and internal challenges. The town should have a unique economy and seasonal festivals that shape daily life. Include three key locations with brief descriptions and three NPC hooks as bullet points. Avoid overused tropes like thieves’ guilds or generic noble councils. Ask me questions one at a time, until you understand the final result.”
B. Dungeon Template
Goal: Design a dungeon with thematic traps and encounters that align with its backstory.
Return Format: Bullet points for each room’s purpose, atmosphere, and key threats.
Warnings: Balance tension and danger without overwhelming players. Avoid random traps with no narrative purpose.
Context: Describe the dungeon’s origin and the final challenge that awaits players.
Prompt: "Read the following campaign overview document" {Upload Campaign Document"}, reply with "I understand".
Next Prompt
Prompt Template: “Now I want you to design a dungeon where the atmosphere reflects its dark origins. Include five rooms, each with a short description, key threat, and environmental detail. Include a twist in the fourth room. Use the 5 Room Dungeon concept. The dungeon should build tension without overwhelming players. Avoid traps that feel random or disconnected from the theme. Describe the final challenge that serves as the dungeon’s climax. Ask me questions, one at a time, until you understand the final result.”
C. Character Template
Goal: Create an NPC with a compelling backstory, believable motivations, and a distinct personality.
Return Format: Bullet points for name, appearance, personality, goals, relationships, and example dialogue.
Warnings: Avoid one-dimensional personalities. Ensure their actions are rooted in their past experiences.
Context: Define the character’s role in the story—are they an ally, antagonist, or neutral figure?
Prompt: "Read the following campaign overview document" {Upload Campaign Document"}, reply with "I understand".
Prompt Template: “Create an NPC with a detailed backstory that shapes their motivations. Include their name, appearance, personality traits, goals, and key relationships as bullet points. Provide one example of their dialogue that reflects their worldview. Avoid one-dimensional characters; their actions should be grounded in past experiences. Ask me questions one at a time, until you understand the final result.”
D. Plot Twist Template
Goal: Develop a plot twist that surprises players while fitting the campaign’s themes.
Return Format: One short paragraph explaining the twist and its consequences.
Warnings: Ensure the twist creates new moral or strategic challenges rather than simply shocking players.
Context: Identify the story arc where the twist occurs, and the NPCs or factions involved.
Prompt Template:
"Read the following campaign overview document" {Upload Campaign Document"}
Next Prompt
“Develop a plot twist that aligns with the campaign’s themes and adds depth to the story. The twist should impact both the players’ current mission and future choices. Describe the twist in one paragraph, including its immediate consequences and long-term implications. Talk about why the twist works. Avoid twists that feel random or disconnected from prior events. Ask me questions one at a time, until you understand the final result.”
GM Tip: Master Prompter
Now here is the kicker. You do not need to write any of these prompts. You can tell the AI to write the prompts for you. Here is how you do it. Replace the content in the {brackets} with what you want.
Prompt 1: "I want to create an {NPC} for my D&D campaign" I want you to write for me a prompt to help me do this. We are going to use this framework.
Goal: What do you need? Describe the task clearly. Are you building a morally gray villain, creating a haunted forest, or developing a plot twist with long-term consequences? The more specific your goal, the better the results.
Return Format: Tell the AI how to present the information. Need a quick character profile? Ask for bullet points. Want immersive world lore? Request a detailed paragraph. The right format makes the output more usable at the table.
Warnings: Specify what to avoid or what tone to maintain. Want a villain who's morally complex, not cartoonishly evil? Say so. Need a dungeon that’s eerie but not outright horror? Let the AI know. This keeps the results aligned with your campaign’s vibe.
Context: Give the AI the essential details and have it converse with you to get those details. Is your world a crumbling empire clinging to lost glory? Are your players hunting a relic tied to ancient shadow magic? The AI doesn’t know your world, so a bit of context helps it create something that fits right in.
Reply with "I understand".
End Prompt
Prompt 2: "Ask me questions, one at a time, until you have enough information to create a prompt for {my NPC} using the Goal, Return Format, Warnings, and Context."
From this I was asked 12 questions about my NPC. Here is the output from the questions for the prompt you should get.
Prompt Output
Goal: Create a human bard NPC who is an ally and quest-giver, seeking the players’ help to retrieve a lost relic tied to saving their rustic town from a blight. The bard is desperate and pleading for help but should not be portrayed as overly tragic. Their role will evolve into a trusted friend of the players.
Return Format:
Provide a quick character profile in bullet points (including name, age, appearance, personality traits, motivations, and notable skills).
Follow with a detailed backstory in paragraph form, capturing their emotional state, connection to the relic, and their role within the town.
Warnings:
Avoid making the character morally gray or tragic.
Focus on their desperation, hope, and determination rather than sadness or hopelessness.
Context:
The town is rustic and isolated, suffering from a blight that threatens its survival.
The bard is known for their singing, which is both a source of hope for the townspeople and a personal passion.
They have no special abilities beyond their bardic talents and rely on the players' help.

NPC: Lira Thorne, The Silver Song
Character Profile:
Name: Lira Thorne
Age: 32
Gender: Female
Race: Human
Appearance: Shoulder-length auburn hair often braided to one side, expressive green eyes that shine with hope despite her desperation, and a slender but sturdy frame. Wears a simple, earth-toned cloak adorned with silver embroidery representing her bardic lineage.
Personality Traits: Compassionate, determined, and courageous. Though fear weighs on her, she refuses to let despair take hold. Her voice carries both sorrow and hope, inspiring those who hear her.
Motivations: To save her hometown from the encroaching blight by recovering the lost relic. Her music is not only her passion but also a means of lifting the spirits of those around her.
Notable Skills: A talented singer and musician, capable of captivating an audience with her hauntingly beautiful melodies. Skilled with the lute and flute. Her charisma and heartfelt performances often sway even the most hardened hearts.
Backstory: Lira Thorne grew up in the rustic village of Duskmere, nestled at the edge of the Silverwood Forest. Life in the village was humble yet peaceful, with the townspeople relying on fertile fields and the forest’s bounty. Lira’s gift for music became evident at a young age, her songs becoming a source of joy during village gatherings and festivals. Her voice, clear and resonant, earned her the nickname The Silver Song, a tribute to both her talent and the forest that cradled her home.
Everything changed when the blight arrived. Crops withered overnight, trees turned brittle and lifeless, and the air grew heavy with an unnatural stillness. Desperation gripped Duskmere as supplies dwindled and hope faded. Yet, Lira refused to yield to despair. Believing that the village’s salvation lay in a relic lost deep within the forest—a talisman said to hold the power to cleanse corruption—she dedicated herself to finding it.
Despite her determination, Lira cannot face this challenge alone. The forest has grown dangerous, twisted by the blight’s influence, and rumors of shadowy creatures lurking among the trees deter even the bravest villagers. With no warriors or adventurers among their own, Lira now turns to the players. Her plea is heartfelt, not only for the village’s survival but also because she believes her music is incomplete without hope. She longs to see the day when her songs can once again celebrate life, not mourn its loss.
Though desperation lingers in her eyes, Lira's spirit remains unbroken. She stands as a beacon of courage for her people, her music a reminder that even in the darkest of times, hope can still be heard in the echoes of a silver song.
Here I am preparing Lira for the Caravan of Whispers, an upcoming campaign that is being built in The Game Master Platform. In this image I am chatting with her, identifying what should would focus on when she firsts arrives in the small town of Shuanghe.

Conclusion: Bringing Your Story to Life with the Goal, Return Format, Warnings, and Context Process
Running a D&D campaign is a journey through unpredictable twists and character-driven choices. Players will forge unexpected alliances, uncover hidden motivations, and change the course of your world in ways no script could anticipate. While AI can’t predict these surprises, it can help you respond with narrative depth and consistency, ensuring your story remains immersive and engaging.
The key to using AI effectively lies in the Goal, Return Format, Warnings, and Context process:
Goal: Clearly define what you need, whether it’s an NPC with a compelling backstory, a morally gray villain, or a plot twist that challenges your players’ choices. A well-defined goal ensures the AI delivers content that serves your narrative.
Return Format: Specify how you want the information presented—concise bullet points, immersive paragraphs, or a blend of both—so the AI’s output is ready to use at your table.
Warnings: Set guidelines for tone and style, whether you need eerie suspense without horror or a desperate character without excessive tragedy. This ensures the AI’s suggestions match your world’s atmosphere.
Context: Provide essential world details, such as the setting’s cultural dynamics, ongoing conflicts, and key player choices. The more context you offer, the more seamlessly AI-generated content will integrate into your campaign.
Allowing the AI to ask follow-up questions can unlock even richer results, encouraging a collaborative process that aligns with your creative vision. By combining this structured approach with your storytelling instincts, you can craft NPCs, locations, and encounters that resonate with your players and enhance their immersion in the world.
In the end, AI is not a replacement for your imagination—it’s a catalyst that helps you weave more vivid and cohesive stories. Whether your players stand at the gates of a city on the brink of collapse or confront a bard whose song holds the fate of a village, you’ll have the tools to create moments that leave a lasting impression. And when the rogue inevitably pockets the ancient relic meant to save the town, you’ll be ready with the next chapter of the story—one shaped by both player choices and the creative partnership you’ve built with AI.
“The best adventures are the ones where players surprise themselves with their own ingenuity.” — Gary Gygax
Now go forth and unleash chaos—with a little help from your AI co-DM.
I love these prompts, I learned very quickly to be specific with the AI, the more detailed info you ask for the better the outcome. I use the first two quite often (Goal and Return Format) but I have not tried to use Warnings, and Context. These are definitely going in the playbook going forward.
Thank you, love the blog! great info.