{
  "id": 8885617,
  "title": "Prompt engineering: How to fix instructions that AI ignores",
  "url": "https://urgent.news/2026/09/21/prompt-engineering-how-to-fix-instructions-that-ai-ignores",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-21T08:44:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/devlog/prompt-engineering-how-to-fix-instructions-that-ai-ignores-3fgj"
  },
  "original_language": "en",
  "account": "While automating tasks on a Mac mini, a recurring issue emerged: the AI consistently failed to adhere to instructions. This challenge arose during text summarization, where the AI consistently exceeded the desired length by several characters. To resolve this, the reporter experimented with aggressive commands like \"Strictly adhere to 300 characters!\" and \"Do not exceed the limit by even one character,\" but these efforts proved ineffective. The AI interpreted numerical constraints as mere suggestions instead of hard limits.\n\nTo address this, the reporter shifted the responsibility of controlling length to post-processing code. Regardless of the AI's output length, the text was trimmed to the desired size using Python. This approach proved far more reliable than attempting to refine the prompt endlessly. Next, the reporter tackled the issue of tone. Requests for a \"strong tone\" often resulted in text that sounded rude or aggressive. After trying various descriptors, the reporter discovered that positive instructions alone left too much room for interpretation. By defining the boundaries—explicitly stating what was not acceptable—the AI's output stabilized, producing a professional yet firm tone.\n\nFinally, the reporter recognized the AI's strength in filling in blanks rather than following a strict list of demands. Previously, detailed sequential orders were provided, but the AI would often skip parts or mix them up. By moving the focus to structural templates, the reporter specified exact requirements for the AI to fill in. For example, instead of providing a list of instructions, a template was created that specified the structure of the output. A blog post on a given topic would follow a predefined structure: an introduction to build empathy and introduce the topic, followed by two body paragraphs detailing the cause and a solution, and concluding with a summary and a lesson or call to action. By providing this framework, the AI produced the desired output consistently.\n\nApplying this same logic to other tasks, such as writing Shorts scripts, the reporter analyzed successful channels and mirrored their structures in their prompts. This approach ensured that the AI produced content that followed the intended structure, even if the internal phrasing varied slightly. The reporter now approaches prompt building with the assumption that the AI might ignore their instructions. By handling hard constraints like character counts with code and setting boundaries on tone, the reporter can achieve reliable and consistent results. Ultimately, providing a clear structure for the AI to fill in rather than a laundry list of contents to include has proven to be the most effective strategy.",
  "summary": "While running automation pipelines on my Mac mini, I hit a recurring wall: the AI simply wouldn't follow directions. Whether generating articles or summarizing text, I spent hours tweaking prompts to get the length, tone, and structure right. Through this trial and error, I realized that while AI is great at creation, it struggles with strict constraints. At first, I tried simple requests like…",
  "key_points": [],
  "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."
}