Mistral Models Prompt Guide

Mistral responds to precise and role-based prompting.

Table of Contents


1. Give the Model a Clear Purpose

Mistral recommends defining a clear purpose early, often through a simple role-and-task setup like: “You are a <role>, your task is to <task>.”

Less Effective

Analyze this customer feedback.

More Effective

You are a customer insights analyst. 
Your task is to review this customer feedback and identify
the top 3 recurring complaints.

Tip: Lead with role + task before adding detailed instructions.


2) Structure Prompts Clearly

Mistral explicitly recommends organizing prompts hierarchically with clear sections and subsections.

A good structure often includes:

  • Context

  • Task

  • Instructions or steps

  • Constraints

  • Output format

Unclear Prompt

Clear Prompt


3. Use Formatting

Formatting is a core prompting tool. It's best to use structures such as markdown and/or XML-style tags because they are readable, parsable, and familiar to models.

Recommended formats:

  • Markdown headings

  • Bullets and numbered steps

  • XML-style sections like <context>, <task>, <constraints>

Example

Tip: The more complex the task, the more important formatting becomes.


4. Add examples when Accuracy or Format Matters

Use example prompting, especially few-shot prompting, when you want better accuracy or tighter control over output format.

This is especially useful for:

  • classification

  • extraction

  • tagging

  • JSON outputs

  • repeated formatting tasks

Tip: If output structure matters, show the model at least one example of the exact format you want.


5. Don't Overuse Reasoning

For simple rewriting, extraction, formatting, or short summaries, a well-structured prompt is usually enough.

Use reasoning for:

  • math

  • coding

  • multi-step logic

  • difficult comparisons

  • edge-case-heavy decisions


6. Avoid Subjective Words

Words like “too long,” “interesting,” “better,” “some,” or “a few” are vague. Mistral recommends replacing them with objective measures.

Instead of: Make it shorter Use: Keep it under 120 words


7. Avoid Self Count of Words or Characters

Mistral advises against relying on the model to calculate thresholds itself. If length matters operationally, pass the count in as data instead.


8. Use Worded Scales over Numeric Scales

For evaluations, Mistral recommends labels like Very Low, Low, Neutral, Good, Very Good instead of a raw 1–5 scale.


9. Prompt Templates

General Task Template

Few Shot Template

Structured Output Template

Last updated