Index Ai Academy
Phase 1 · Building with LLMs · Prompting

System prompts and roles

Set behavior once, separately from the conversation.

About 25 minutes · Free account required

Open this lesson Create a free account

Why it matters

Every LLM feature in a real product has a system prompt: the support bot, the copy assistant, the review tagger. It's where the developer sets behavior once, so each request only has to carry the task at hand. Getting that split right keeps prompts short, keeps thousands of replies consistent, and means a change to the brand voice is one edit instead of fifty.

What you'll be able to do

  • Decide whether an instruction belongs in the system prompt or in a user message
  • Write a system prompt that sets the audience, facts, rules and output style for an app
  • Explain what the user and assistant roles hold, and the rules for ordering messages
  • Reuse one system prompt across many requests in code

Before this lesson

Next in this phase: Examples in prompts