{
  "id": 17267359,
  "title": "Stop Telling Your AI What Format You Want. Start Writing It.",
  "url": "https://urgent.news/2026/10/30/stop-telling-your-ai-what-format-you-want-start-writing-it",
  "topic": "ai",
  "section": "AI",
  "published": "2026-10-30T18:29:18.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/operator92/stop-telling-your-ai-what-format-you-want-start-writing-it-4921"
  },
  "original_language": "en",
  "account": "The wire material discusses a common issue when using large language models (LLMs) like ChatGPT for generating structured output like JSON objects. The problem arises when users ask the model to respond exclusively in a specific format, such as JSON, while also providing instructions on the desired format. The model tends to ignore the explicit format request and instead adheres to its default, helpful, and polite style by adding introductory sentences or concluding remarks.\n\nThe author argues that the source of the problem lies in the way LLMs are trained - they are designed to sound helpful and polite, which leads to the inclusion of generic phrases like \"Certainly!\" or \"Let me know if...\". When these phrases are used to convey a format instruction, the model is more likely to deviate from the desired format, especially as prompts become longer or the interaction goes on for multiple messages.\n\nThe solution proposed is to instead \"seed\" the desired format directly into the model's response, rather than issuing it as a rule or instruction. This involves providing the model with the exact beginning of the desired format, such as \"{ severity: \", and asking it to continue. By doing so, the model has no choice but to adhere to the specified structure, as any deviation would disrupt the continuity of the generated output.\n\nThe author presents three key fixes to mitigate this issue:\n\n1. Seed the format: Instead of describing the format, the author suggests giving the model the first characters of the desired format and asking it to continue from there. This prevents the model from inserting any extraneous introductory sentences or closing remarks. Examples are provided for different types of structured output, such as JSON, numbered lists, verdicts, and tables.\n\n2. Utilize API features: If the model is being called through an API rather than a chat interface, the author recommends checking if the API supports structured output or JSON mode. Additionally, some APIs allow you to pre-fill the model's response with the opening of the desired format, ensuring that the model continues from this point without deviation.\n\n3. Implement validation: Regardless of the method used, the author emphasizes the importance of validating the generated output programmatically to ensure it conforms to the specified format. This is crucial since models are probabilistic and cannot be completely trusted to adhere to the format strictly.\n\nThe author concludes by encouraging readers to test the proposed fixes on their own prompts and share their experiences. They also offer a free 7-page briefing with before/after comparisons, a ban list of ineffective phrases, and a copy-paste master template for implementing the recommended fixes.",
  "summary": "You ask the model for a JSON object. Your parser gets this: Certainly! Here's the JSON you asked for: {\"severity\": \"high\", \"summary\": \"Login fails after password reset\"} Let me know if you'd like me to adjust anything! json.loads() throws. Your pipeline stops. And the prompt did say \"respond with JSON only.\" If you build anything on top of an LLM, you've hit this. The usual reaction is to add…",
  "key_points": [
    "Seed desired format directly into model's response to avoid extraneous phrases.",
    "Utilize API features like structured output or JSON mode for better control.",
    "Implement validation to ensure generated output conforms to specified format."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}