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.
messages = [ {"role": "system", "content": "Output valid JSON only."}, {"role": "user", "content": "Extract metrics from: " + text}, {"role": "assistant", "content": "{", "prefix": True} ]Nobody has confirmed this prompt yet. If you try it, tell others whether it worked.
No comments yet.