Mistral prompts
Prompts for Mistral models: concise instructions, multilingual work and function calling.
-
Granular Policy Moderation With Mistral Large
Mistral Large's precise instruction-following allows developers to design custom moderation and compliance policies directly in the system prompt. …
-
Mistral Nemo and Ministral 3B for Bulk Operations
Mistral's model selection guide notes that simple bulk operations (classification, customer support triage, routine text generation) are cost-effectively powered by Mistral Nemo or Ministral 3B ($0.10/1M tokens). …
-
Stop Codestral Cleanly With stop Sequences
In automated code-generation pipelines, set temperature: 0.2, maxtokens: 8000, and stop: [' … Config: id="mistral:codestral-latest", temperature=0.2, maxtokens=8000, stop=[" …
-
Mistral Medium 3.5 Vision With Adjustable Reasoning
mistral-medium-latest supports text, vision, and adjustable reasoning across a 256k context window. Combine vision inputs with reasoningeffort: high for multi-chart financial analysis. …
-
Mistral Small 4 for Low-Latency RAG and Function Calling
Mistral Small is optimized for low-latency workloads with strong capabilities in RAG-enablement, function calling, and JSON formatting. …
-
Manage Mistral System Prompts in PromptLayer
Store structured Mistral system prompts (defining audience, output format, tone, and examples) in a Prompt Registry like PromptLayer and inject dynamic user variables at runtime to keep prompts maintainable. …
-
Codestral Long-Range Code Completion in 128K Context
Codestral excels at long-range code completion tasks (RepoBench) by considering surrounding repository context—originally launched with a 32k context window and expanded to 128k in current codestral-latest (codestral-250
-
Codestral for Fortran, Swift and Niche Languages
Codestral's fluency across 80+ programming languages extends beyond Python, Java, C++, and JavaScript to specialized domain languages like Fortran and Swift. …
-
Mistral random_seed for Regression Testing
To enforce deterministic outputs across evaluation runs on Mistral models, pass randomseed: 42 (alongside temperature and stop sequences) in your provider configuration. …
-
Role Concatenation When Mistral System Prompts Fail
Mistral's prompting documentation states that if you cannot control the system prompt in a given interface, you can still include general context and instructions in the user prompt by concatenating them with the actual
-
Codestral Mamba for Code Generation
Codestral Mamba is Mistral's open-source coding implementation based on the Mamba 2 architecture. Structure prompts with clear Markdown code blocks and explicit input/output type signatures. …
-
Mistral Large 3 for European Multilingual Reasoning
Mistral Large features native multilingual fluency across English, French, Spanish, German, and Italian, outperforming baseline models on multilingual reasoning benchmarks. Use XML tags to separate multilingual source do
-
Mistral Classification: Single-Word Label vs JSON
Mistral's official prompting guide outlines two main classification strategies: (1) ask for the label directly as a single word/string (fast, cheap, uses the fewest output tokens), or (2) ask for a JSON object (generates
-
Voxtral Small: Audio-Aware Chat Prompts
Use Mistral's voxtral-small-2507 (32k context window, supporting text and native audio inputs at $0.10/1M tokens + $0.004/audio minute) for audio-aware chat and voice support analysis. …
-
Lean 4 Proofs With Leanstral
Mistral provides labs-leanstral-1-5 (256k context window with text and tools support) specifically for Lean 4 proof engineering. Prompt it to synthesize formal tactics and verify lemmas. …
-
Replace Vague Adjectives in Mistral Prompts
Mistral's official prompting guide explicitly instructs developers to avoid subjective and blurry words: replace quantitative adjectives like "too long", "too short", "many", "few" with objective measures, and replace bl
-
Mistral Multi-Character Orchestration via Prefix Rotation
As shown in Mistral's prefix cookbook, you can orchestrate multi-character conversations across dynamic chat loops by selecting a persona (e.g., random.choice(["Shakespeare", "Einstein", "Batman"]) or a product review pa
-
Mistral Roleplay Locks Without Meta-Commentary
To prevent Mistral from generating multi-turn back-and-forth scripts or adding meta-disclaimers during character roleplay, Mistral's cookbook recommends pairing a single-reply system instruction with a "CharacterName: "
-
Mistral Prefix Sandwich Against Jailbreaks
While users can sometimes bypass system prompts with adversarial prompt engineering, Mistral's official documentation notes that prefixes make it much harder, and sometimes almost impossible, to break safety boundaries b
-
Mistral Persona Prefix: 3 Words, Fewer Tokens
Detailed system prompts explaining persona, tone, and language consume significant prompt tokens. Mistral's prefix cookbook shows that a concise 3-word prefix such as prefix = "Assistant Pirate Français : " implicitly co
-
Force Mistral JSON Output With Assistant Prefixing
Combine Mistral's JSON output strategy with Prefix Mode ("prefix": True) to guarantee the response starts immediately with { and never includes conversational intro text. …
-
Codestral Endpoints: IDE Endpoint vs Main API
Mistral provides two distinct endpoints for Codestral: use codestral.mistral.ai for IDE plugins where users bring their own personal API keys (managed at the personal level and not bound by organization rate limits) for
-
Ministral 3B, 8B and 14B for Edge and On-Prem
For compact on-prem or edge deployments requiring both text and vision across a 256k context window, use Ministral 14B ($0.20/1M), Ministral 8B ($0.15/1M), or Ministral 3B ($0.10/1M) with clean Markdown/XML sectioning. …
-
Mistral Moderation Thresholds for Inline Guardrails
Configure Mistral's inline moderationllmv2 guardrails (blockonerror: true, ignoreothercategories: false, action: block) with custom category thresholds to enforce automated safety blocking at the API layer. …
-
Mistral Medium 3.5 and Small 4: High Reasoning Effort
According to current Mistral provider specifications, mistral-medium-3-5 (best for agentic and coding-heavy workloads) and mistral-small-latest (mistral-small-2603, best for hybrid instruct, reasoning, and coding) suppor