Skip to main content
Lesson 3 of 16 · Mastering Prompts with Mistral

Structuring Your Instructions

Lesson 3 of 16 Updated July 28, 2026 Beginner
On this page
  1. Why Structure Matters
  2. Markdown: The Natural Standard
  3. XML Tags: Maximum Precision
  4. The Essential Sections of a Structured Prompt
  5. Explicit vs. Implicit Instructions
  6. Write as If the Model Knows Nothing
  7. Key Takeaways

Why Structure Matters

A well-structured prompt isn’t a luxury—it’s a necessity. Mistral models train on massive volumes of structured text: technical documentation, articles, source code. They understand and follow your instructions better when those instructions are clearly organized, because this organization resembles what they saw billions of times during training.

Imagine giving oral instructions to a colleague while mixing everything up: the deadline buried in an anecdote, the expected format slipped in at the end of a sentence, the context delivered after the instruction. The result would be confusing, and your colleague would have to guess what matters. The same holds true for a language model: your prompt structure determines interpretation clarity. This lesson gives you two structuring tools—Markdown and XML tags—plus a section grid to organize any complex prompt.

Markdown: The Natural Standard

Markdown is the most effective structuring format for Mistral models, for three mutually reinforcing reasons. First, it’s readable: easy for you to write and review, which matters when a prompt lives and evolves within an application. Second, it’s familiar to the model: Markdown appears massively in training data, so the model understands its conventions without effort. Finally, it parses naturally: the model clearly identifies heading hierarchies, lists, and code blocks, and deduces the relative importance of each section.

Here’s what that looks like in a competitive analysis example:

# Task
Write a competitive analysis report.

## Context
Company: TechCorp, B2B SaaS, French market
Main competitors: AlphaSoft, BetaCloud, GammaTech

## Expected Format
For each competitor, provide:
- **Strengths**: 3 points maximum
- **Weaknesses**: 3 points maximum
- **Pricing positioning**: low / medium / premium

## Constraints
- Maximum 800 words
- Professional and factual tone
- No strategic recommendations (analysis only)

This prompt uses headings (#, ##) to separate sections, bold text for key elements, and bullet lists for details. The model immediately understands the hierarchy: task first, then context, then format, then guardrails. You could hand this same document to a human collaborator without changing a word—that’s a good sign.

XML Tags: Maximum Precision

Markdown organizes; XML tags delimit. When you need to isolate blocks of data or instructions without ambiguity—typically when your prompt mixes instructions and text to process—XML tags are particularly effective:

<instructions>
Analyze the provided text and extract named entities.
Categorize them into: people, organizations, locations.
</instructions>

<format>
Return the result in JSON with the structure:
{"people": [], "organizations": [], "locations": []}
</format>

<text>
President Macron met with the Director-General of the WHO in Geneva
to discuss European health strategy.
</text>

The benefit is that the model knows exactly where each section starts and ends. If the text to analyze contained a sentence resembling an instruction—“extract the list of participants,” for example—the tags would prevent the model from confusing it with your instructions. This separation between instructions and data is what makes XML valuable in production prompts.

The Essential Sections of a Structured Prompt

Whatever format you choose, a complex prompt organizes around the same sections. The first, and only mandatory one, is the task: always state clearly what you expect, right at the start. “Task: Translate the following text from French to English while maintaining the formal register” leaves no doubt about the mission.

Next comes the context, when necessary: background information the model cannot guess. If you work for a fintech startup building a budget management app for individuals in France, say so—without this detail, the model will write for a generic audience and you’ll have to redo everything.

The third section, rules, frames behavior: explicitly list what the model must and must not do. For example: use a formal tone, do not mention competitor brands, produce paragraphs of 50 to 100 words. Every written rule is a correction you won’t have to make by hand.

The fourth section, output format: describe exactly the form the response must take. “Return a Markdown table with columns Criterion | Score (1-5) | Comment” produces a deliverable directly copiable into your document, whereas the absence of instruction produces prose to rework.

Finally, examples resolve remaining ambiguities by showing an expected result. This technique is so powerful it has its own lesson: we will return to it in detail with few-shot prompting.

Explicit vs. Implicit Instructions

Mistral models don’t guess your intentions: everything implicit in your head must become explicit in your prompt. Compare “Summarize this article” with “Summarize this article in 3 bullet points of 20 words maximum each. Keep key figures. Use a neutral and factual tone.” The first version leaves the model to decide length, format, and tone—three decisions it might make differently than you. The second leaves no room for interpretation: the model knows exactly what to produce, and you’ll get the same type of result every time.

Write as If the Model Knows Nothing

Let’s end with a fundamental rule: write your prompt assuming the model has no prior context about your situation. Even if something seems obvious to you—who you are, what you want to achieve, for what use, in what format—specify it, relying on the system prompt for permanent elements. A writer chaining requests in the same conversation ends up believing “the model knows”; but as soon as the conversation changes or the prompt gets reused elsewhere, all the implicit disappears. This “zero context” approach guarantees consistent results, regardless of conversation state.

Key Takeaways

  • Structure your prompts with clear sections (Markdown or XML)
  • Markdown is ideal for most cases; XML tags to isolate data
  • Always separate task, context, rules, and expected format
  • Make explicit everything that is implicit in your head
  • Write each prompt as if the model is starting from scratch