Zero-Code AI App BuilderZero-Code AI App Builder
Prompting & Planning

Role and context

Tell the AI who it is and what it knows

The AI starts every chat knowing nothing about you. Role and context fix that. They are the first two parts of the 5-part framework.

What is a role?

Think about asking a question at a hospital. A nurse, a surgeon, and a receptionist would each answer differently. They have different jobs and different ways of talking.

A role tells the AI which "person" to be. It changes the tone, the level of detail, and what the AI focuses on.

  • "You are a patient tutor for complete beginners" gives simple, gentle answers.
  • "You are a senior web developer" gives technical, precise answers.
  • "You are a strict editor" gives short, direct feedback.

Before and after

Prompt (before)
Explain what an API is.
Prompt (after)
You are a patient teacher who explains tech to people who have never coded.
Explain what an API is.

The first prompt might give you a textbook answer full of jargon. The second one usually starts with a simple analogy and avoids hard words.

A good role has two parts: a job ("teacher", "designer", "reviewer") and a style ("patient", "friendly", "direct"). Together they shape the whole answer.

What is context?

Imagine asking a friend, "Should I take the job?" They can't help until you tell them about the job, the pay, and your situation. That background is context.

Context is everything the AI needs to know to give a useful answer. Good context often includes:

  • Who you are — "I'm a beginner", "I run a small bakery".
  • Your goal — "I want to build a habit tracker app".
  • Your situation — "I only have weekends free", "I use Lovable".
  • Your audience — "This is for high school students".
  • Material to work with — pasted text, a resume, an error message.

Before and after

Prompt (before)
Give me ideas for an app.
Prompt (after)
You are a product coach who helps beginners pick their first project.
I'm new to building apps and I'll use an AI app builder in the browser.
I have about 5 hours a week. I love fitness and cooking.
Give me ideas for an app I could build in 2 weeks.

Let's break this down:

  • The role (product coach) makes the AI think about what is realistic.
  • "New to building apps" tells it to keep ideas small and simple.
  • "5 hours a week" and "2 weeks" set the size of the project.
  • "Fitness and cooking" makes the ideas personal instead of random.
FeatureNo role or contextWith role and context
ToneGenericMatches your level
DetailToo much or too littleAbout right
RelevanceRandom ideasFits your goal and time
Follow-up neededLotsLittle
The same request with and without role and context.

How much context is enough?

Ask yourself: "If I gave this prompt to a smart stranger, could they do a great job?" If they would need to ask you questions first, add those answers to the prompt.

You don't need to write an essay. Three to five short sentences of context is usually plenty. Remember that the AI has a limited context window (the amount of text it can keep in mind at once), so keep it focused.

Never paste passwords, API keys, or other people's private details as context. The AI doesn't need them to help you.

Common mistakes

Skipping context completely

Prompt
// Wrong
Write a description for my product.

// Right
I sell handmade candles online to people who like cozy home decor.
Write a 2-sentence description for my lavender soy candle.

A role with no real meaning

Prompt
// Wrong
You are the best AI in the world. Help me.

// Right
You are a friendly career coach who reviews resumes for entry-level jobs.

Assuming the AI remembers other chats. A new chat starts fresh. Repeat the important context, or save it in a notes file (you'll learn this later).

Practice

Try these exercises to lock in what you just learned.

Quiz
Not started
You want a simple, jargon-free explanation of databases. Which role works best?
Quiz
Not started
You ask 'Should I use this app builder?' and get a vague answer. What is most likely missing?
Quiz
Not started
Which of these should you NOT include as context in a prompt?

What's next?

Now the AI knows who it is and what it knows. Next, let's tell it exactly what to do, what limits to follow, and how to shape the answer.