<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Thanit Kebsiri on Medium]]></title>
        <description><![CDATA[Stories by Thanit Kebsiri on Medium]]></description>
        <link>https://medium.com/@thanitkebsiri?source=rss-fc3bae1d80af------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*LEoI4otR0jlVKhml4EX2oA@2x.jpeg</url>
            <title>Stories by Thanit Kebsiri on Medium</title>
            <link>https://medium.com/@thanitkebsiri?source=rss-fc3bae1d80af------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 12:00:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@thanitkebsiri/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Hidden Cost of AI Compromises]]></title>
            <link>https://medium.com/@thanitkebsiri/the-hidden-cost-of-ai-compromises-914d1971388b?source=rss-fc3bae1d80af------2</link>
            <guid isPermaLink="false">https://medium.com/p/914d1971388b</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[llm-limitation]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[enterprise-technology]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Thanit Kebsiri]]></dc:creator>
            <pubDate>Wed, 08 Apr 2026 05:10:03 GMT</pubDate>
            <atom:updated>2026-04-08T05:32:32.820Z</atom:updated>
            <content:encoded><![CDATA[<p>The Hidden Cost of AI Compromises</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nl5THf1ql96NVw9GgwmVYw.jpeg" /></figure><p>In 2026, many companies are investing heavily in premium AI models such as Claude Opus 4.6, advanced agentic platforms, and long-context subscriptions. They hope these tools will solve the major bottlenecks in full-cycle software development — including slow requirement analysis, weak architecture decisions, integration problems, and difficulty keeping up with real business needs.</p><p>However, senior engineering leaders who manage actual production systems are discovering an uncomfortable truth. To deliver real results in a business environment, teams must constantly make compromises with the fundamental limitations of these AI tools. These compromises rarely show up in beautiful productivity dashboards. Instead, they appear as higher total cost of ownership, delayed business value, increased risk, and extra workload on the most experienced team members.</p><p>Here are the three biggest compromises businesses face and their real costs:</p><p>1.The Context Compromise: Breaking Everything Apart Just So the Model Can Handle It</p><p>Even with 1M-token context windows, no single model can reliably hold an entire enterprise project — including legacy integrations, complex business rules, compliance requirements, stakeholder nuances, and historical decisions — without performance degradation or hallucinations.</p><p>What businesses actually do is break large projects into many small, isolated tasks. They spend significant time writing detailed specifications and summary documents just to prevent the AI from losing context. As a result, senior architects now spend more time on planning and decomposition than they did before AI became widespread.</p><p>The real business cost is that this “architecture tax” shifts the bottleneck from coding to upfront planning. What used to take two weeks from requirements to code now requires an extra one to two weeks of detailed scoping just to make the AI usable. This leads to longer time-to-market, higher senior staff costs, and projects that feel slower overall. In regulated industries or complex automation projects, this extra planning directly delays revenue and delivery.</p><p>2.The Verification Compromise: You Still Have to Double-Check Everything</p><p>Premium AI models are still overconfident. They cannot browse live repositories, verify active APIs, confirm the latest regulatory changes, or fully understand unspoken business constraints in your specific industry.</p><p>To compensate, businesses run parallel verification processes: manual checks, tools with real browsing capability, and dedicated reviewers who cross-check every important output. For any feature involving external systems, compliance, or real user data, humans must validate links, test edge cases, and confirm actual behavior.</p><p>This creates a massive verification tax. One hour of AI-generated work can easily require three to four hours of human validation and refinement. Security and compliance teams report much higher audit efforts on AI-assisted code. In practice, this means more headcount, overtime for seniors, higher risk of production incidents, and slower release cycles.</p><p>3.The Business-Context Compromise: Seniors End Up Feeding the Machine</p><p>AI models still lack deep, organization-specific intuition — the political realities, unspoken requirements, cultural nuances, and long-term trade-offs that experienced system analysts naturally bring.</p><p>4.The Availability Compromise: Paying More for Unreliable Access</p><p>Beyond the intellectual compromises, there is a brutally practical one: availability. Even premium AI subscriptions impose usage limits and rate throttling. A senior developer in the middle of a complex integration task can be cut off mid-session, losing carefully built context. To mitigate this, teams maintain subscriptions to three or four competing providers, constantly switching between them — rebuilding context, adapting to different model behaviors, and managing fragmented conversation histories. The total subscription cost per developer balloons, while the actual usable throughput remains unpredictable. This “availability tax” makes every other compromise worse: context must be rebuilt more often, verification workflows get interrupted, and business-context injection must be repeated across multiple platforms. No vendor’s productivity claims account for this reality.</p><p>As a result, senior engineers must invest heavily in “context injection” — writing detailed prompts, providing constant clarifications, and running review sessions. Instead of reducing workload, AI often increases the cognitive load on the highest-paid people, who now spend more time explaining business reality to the model.</p><p>This directly creates comprehension debt — the growing gap between the amount of code in the system and how much humans actually understand. Maintenance costs rise, onboarding becomes more expensive, and technical debt grows faster because the code is based on probabilistic generation rather than deliberate, business-aligned design.</p><p>Why Expensive Models Haven’t Solved This ?</p><p>Leaders pay for premium versions hoping better reasoning and larger context will remove these issues. In reality, the compromises simply become more sophisticated. The models generate better-looking drafts, but the core gaps in real-world understanding, verification, and business judgment remain.</p><p>For most companies doing serious full SDLC work, the result is not 5x or 10x productivity. It is usually a modest 10–40% gain in some areas — offset by higher orchestration effort, increased maintenance costs, and greater dependence on senior talent.</p><p>The hype promises replacement. The reality is amplification — but only if you are willing to pay the hidden price of constant compromises.</p><p>Smart businesses in 2026 are not chasing the dream that “AI does everything.” They are carefully measuring the true total cost: not just subscription fees, but the extra time, risk, and senior effort required to make AI deliver real business value in production.</p><p>In the end, getting real work done still depends on experienced humans managing the gaps that AI models cannot close.</p><p>References</p><ol><li>Title: Comprehension Debt — the hidden cost of AI generated code.<br>Description: Addy Osmani’s original 2026 article that defines the growing gap between how much code exists in a system and how much of it any human genuinely understands when relying heavily on AI coding tools.<br>Link: <a href="https://addyosmani.com/blog/comprehension-debt/">https://addyosmani.com/blog/comprehension-debt/</a></li><li>Title: There’s a hidden tax on every AI-generated merge request.<br>Description: Analysis of how AI increases merge request volume while human review and verification effort do not scale, creating a real bottleneck and extra cost for senior engineers in production environments.<br>Link: <a href="https://thenewstack.io/hidden-tax-ai-code/">https://thenewstack.io/hidden-tax-ai-code/</a></li><li>Title: The Vibe Coding Trap: Why Cheap AI Code Costs a Fortune.<br>Description: Detailed breakdown of how simplifying prompts to high-level “vibe” level to work around context limits leads to much higher long-term maintenance, technical debt, and business costs in real enterprise projects.<br>Link: <a href="https://www.baytechconsulting.com/blog/vibe-coding-trap-why-cheap-ai-code-costs-a-fortune">https://www.baytechconsulting.com/blog/vibe-coding-trap-why-cheap-ai-code-costs-a-fortune</a></li><li>Title: The Code Trap: Why Vibe Coding Can Become the Most Expensive Decision You Make.<br>Description: Explains the hidden costs in production systems including technical debt, compliance issues, and maintenance explosion when using vibe coding without proper architecture and verification.<br>Link: <a href="https://www.mercurymediatechnology.com/en/blog/vibe-coding-costs/">https://www.mercurymediatechnology.com/en/blog/vibe-coding-costs/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=914d1971388b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[4 Good Master Prompts for Grok-3]]></title>
            <link>https://medium.com/@thanitkebsiri/4-good-master-prompts-for-grok-3-e4d16fa79083?source=rss-fc3bae1d80af------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4d16fa79083</guid>
            <dc:creator><![CDATA[Thanit Kebsiri]]></dc:creator>
            <pubDate>Sun, 09 Mar 2025 18:36:34 GMT</pubDate>
            <atom:updated>2025-03-09T18:55:44.320Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YDN2geaqhwhMqPAhC6n9bQ.jpeg" /></figure><p><strong>SETTING THE STAGE WITH MASTER PROMPTS</strong></p><p>Imagine launching a chat with an AI like Grok-3 or ChatGPT and embedding a consistent framework to guide its responses. Every time you open a Grok-3 or ChatGPT to use it, load this master prompt at the start of every chat (do it once per chat):</p><p><strong><em>Update my chat with these Master Prompts<br>1: Before giving any solution, search the issue on the internet, compare it to your solution, and ensure it aligns or improves based on findings.<br>2: Analyze provided data, then offer a targeted solution.<br>3: Verify the actual problem by asking for real data (e.g., configs, logs) before suggesting fixes — do not assume or speculate.<br>4: If one consecutive pattern-based solution fails to resolve the same issue, automatically search the internet for recent solutions related to that issue and propose a reformed approach based on findings.</em></strong></p><p>This framework isn’t theoretical — it’s practical. To prove it, past tasks where AI assistance veered off course (leading to frustration or “a mess”) can be revisited. With these prompts in place, the AI demands real data before responding, avoiding airy guesses. Users must supply specifics when asked — be it a stack trace for developers, server logs for engineers, or error messages for everyday folks. If no data is available or the answer’s unclear, the AI simply admits, “I don’t know.” This disciplined setup transforms chaotic AI interactions into structured problem-solving, as explored below.</p><p><strong>THE FOUR MASTER PROMPTS: A FRAMEWORK FOR BETTER AI USE</strong></p><p>Software developers and engineers often face AI responses that miss the mark — generic, outdated, or speculative. To address this, a set of four “master prompts” was introduced to guide AI behavior. These rules aim to make responses more accurate, data-driven, and adaptive. Below, each prompt is dissected for its mechanics, components, and real-world applications.</p><p><strong>MASTER PROMPT 1: RESEARCH BEFORE RESPONDING</strong></p><p>Rule: “<strong><em>Before giving any solution, search the issue on the internet, compare it to your solution, and ensure it aligns or improves based on findings.</em></strong>”<br>Mechanics: The AI must pause, search online (e.g., web articles, X posts), and cross-check its initial response against current data. If the web reveals a better fix, the AI adjusts.<br>Components: Research (external lookup), comparison (internal vs. external), refinement (improved output).<br>Applications:<br>Coding: A developer reports a Python ModuleNotFoundError. The AI searches recent PyPI updates or Stack Overflow threads, ensuring the suggested pip install matches the latest package name or version (e.g., numpy vs. numpy-latest).<br>Servers: An engineer faces an Nginx 504 timeout. The AI checks recent blog posts or forums, confirming that increasing proxy_read_timeout aligns with 2025 best practices.<br>For Everyday Users: Asking “How do I speed up my laptop?” prompts the AI to search for 2025 tips (e.g., “disable startup apps”) rather than relying on old tricks like “defrag your HDD.”</p><p><strong>MASTER PROMPT 2: ANALYZE DATA, THEN SOLVE</strong></p><p>Rule: “<strong><em>Analyze provided data, then offer a targeted solution.</em></strong>”<br>Mechanics: The AI takes user-supplied data (code, logs, configs), processes it, and crafts a response tailored to that input. No data, no solution.<br>Components: Input (user data), analysis (interpretation), output (specific fix).<br>Applications:<br>Coding: A software engineer shares a Java exception: NullPointerException at line 15. The AI analyzes the line, spotting an uninitialized variable, and suggests if (obj != null) before access.<br>Servers: A log snippet shows “MySQL: Can’t connect to local server.” The AI examines it, recommending systemctl start mysql or a config tweak based on the error code.<br>For Everyday Users: Submitting a screenshot of a phone error (e.g., “Storage Full”) leads to a step-by-step cleanup guide, not a vague “delete stuff.”</p><p><strong>MASTER PROMPT 3: DEMAND REAL DATA, NO GUESSWORK</strong></p><p>Rule: “<strong><em>Verify the actual problem by asking for real data (e.g., configs, logs) before suggesting fixes — do not assume or speculate.</em></strong>”<br>Mechanics: If the problem’s unclear, the AI requests specifics (e.g., “Show the error log”) and waits. Only with data does it proceed.<br>Components: Verification (data request), anti-speculation (no assumptions), response (data-based).<br>Applications:<br>Coding: A developer says, “My loop’s slow.” The AI asks for the code, sees a nested for loop, and suggests indexing or a list comprehension.<br>Servers: An engineer reports, “Site’s down.” The AI requests the Apache log, finds “403 Forbidden,” and advises on permissions (chmod 644).<br>For Everyday Users: Asking “Why’s my game lagging?” prompts the AI to request system specs or a crash report, ensuring a relevant fix like “update GPU drivers.”</p><p><strong>MASTER PROMPT 4: ADAPT AFTER FAILURE</strong></p><p>Rule: “<strong><em>If one consecutive pattern-based solution fails to resolve the same issue, automatically search the internet for recent solutions related to that issue and propose a reformed approach based on findings.”<br>Mechanics: If a fix flops, the AI detects the repeat issue, searches anew, and pivots to a different solution based on fresh data</em></strong>.<br>Components: Failure detection (same problem persists), research (new search), reformation (updated fix).This one will break chain of <strong>PATTERN LOCKING</strong>.<br>Applications:<br>Coding: A npm install fix fails for a React error. The AI searches 2025 GitHub issues, finding a Node.js version conflict, and suggests nvm use 18.<br>Servers: Restarting a server doesn’t fix a DNS issue. The AI searches, finds a Cloudflare outage report, and recommends switching to 8.8.8.8.<br>For Everyday Users: If “restart your router” doesn’t fix Wi-Fi, the AI searches, spotting a firmware update tip, and guides the user through it.</p><p><strong>PRACTICAL BENEFITS FOR DEVELOPERS, ENGINEERS, AND USERS</strong></p><p><strong>CODING BUG FIXES</strong></p><p>These prompts shine in debugging:<br>Syntax Errors: A missing ) in JavaScript? Prompt 2 analyzes the code, Prompt 3 ensures it’s provided, and Prompt 1 confirms the fix is standard.<br>Runtime Errors: A PHP undefined index? Prompt 3 demands the script, Prompt 2 pinpoints the array access, and Prompt 4 adapts if isset() fails.<br>Logic Bugs: Infinite loop in C++? Prompt 1 researches optimization tricks, ensuring a modern break or while fix.</p><p><strong>SERVER CONFIGURATIONS</strong></p><p>For server woes, they’re equally potent:<br>Web Issues: Nginx 500 error? Prompt 3 gets the log, Prompt 2 finds a misconfigured fastcgi_param, and Prompt 1 verifies it’s current.<br>Permissions: “Access denied” on Linux? Prompt 3 asks for ls -l, Prompt 2 suggests chown, and Prompt 4 pivots to SELinux if needed.<br>Performance: Slow database? Prompt 1 checks 2025 MySQL tuning guides, Prompt 2 analyzes my.cnf, and Prompt 3 ensures real stats.</p><p><strong>EVERYDAY USE</strong></p><p>Casual users benefit too:<br>Tech Fixes: “Phone won’t charge?” Prompt 3 asks for model/details, Prompt 2 diagnoses, and Prompt 1 grabs recent hacks.<br>Learning: “What’s a VPN?” Prompt 1 ensures a 2025-relevant explanation, not a 2010 relic.</p><p><strong>WITH VS. WITHOUT MASTER PROMPTS: A COMPARISON</strong></p><p><strong><em>WITHOUT MASTER PROMPTS</em></strong></p><p>How It Works: The AI leans on its internal knowledge, updated to March 10, 2025, and guesses if details are sparse. Responses are fast but risky.<br>Example: “My app’s slow.” The AI might say, “Optimize your loops,” without proof it’s the issue.<br>Drawbacks:<br>Outdated info if 2025 trends shift.<br>Wrong fixes from assumptions.<br>Stale retries if a solution fails.<br>For Users: Quick, but potentially a wild goose chase — developers might waste hours, engineers might misconfigure, and casual users might get frustrated.</p><p><strong><em>WITH MASTER PROMPTS</em></strong></p><p>How It Works: The AI demands data, researches, analyzes, and adapts. Responses are slower but robust.<br>Example: “My app’s slow.” The AI asks for code/logs, researches 2025 bottlenecks, analyzes a CPU spike, and suggests threading — or pivots if that flops.<br>Advantages:<br>Data-driven, cutting guesswork.<br>Current via web checks.<br>Iterative, dodging dead ends.<br>For Users: Developers get precise fixes, engineers nail configs, and casual users trust the advice — though it demands input.</p><p><strong>WHY THIS MATTERS IN 2025</strong></p><p>In a world where AI is ubiquitous, these master prompts bridge a gap. Developers avoid “down the rabbit hole” scenarios where generic advice breaks builds. Engineers sidestep server outages from unverified tweaks. Everyday users escape the “try this, try that” loop. By March 10, 2025, with tech evolving fast, these prompts ensure AI keeps pace — researching live data, grounding fixes in reality, and learning from flops.</p><p>CONCLUSION</p><p><strong><em>The term “prompt” is simple — it’s the spark that starts an AI’s work. But the four master prompts elevate it, turning chaotic chatbot chats into structured problem-solving. For software developers, they mean debugged code that runs. For engineers, they deliver servers that hum. For daily users, they offer answers that work. Compared to prompt-less AI, this framework trades speed for precision — a worthy swap when stakes are high. Next time you chat with an AI, consider: a good prompt isn’t just a question — it’s a blueprint for success.</em></strong></p><p><em>Big thanks to xAI’s Grok for brainstorming this with me</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4d16fa79083" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Master Prompt: Unlocking Effective AI Assistance for you]]></title>
            <link>https://medium.com/@thanitkebsiri/master-prompt-unlocking-effective-ai-assistance-for-you-c1bbf8b91440?source=rss-fc3bae1d80af------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1bbf8b91440</guid>
            <dc:creator><![CDATA[Thanit Kebsiri]]></dc:creator>
            <pubDate>Fri, 28 Feb 2025 02:24:54 GMT</pubDate>
            <atom:updated>2025-02-28T05:08:08.756Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HbtPLXHFeIgPCBp6EFa5Gg.jpeg" /></figure><p>Artificial Intelligence (AI) tools — chatbots, coding aides, content creators — have woven into daily life, promising to turbocharge tasks like drafting emails, coding apps, or teaching skills. They tout speed, precision, and ingenuity, yet many users hit snags: AI veers off-course, assumes too much, or buries them in irrelevant fluff. Why? AI’s brilliance lacks focus without guidance — it guesses when it should deliver. Enter the <strong>master prompt</strong>: a clear, upfront directive to shape AI’s behavior, turning it into a tailored, trusty assistant.</p><p>How to craft one with two techniques <br>— Active Craft and Passive Craft <br>— and the game-changing benefits users reap. Forged from real lessons, it’s for anyone — beginner or pro — tired of AI’s stumbles, showing how a master prompt transforms potential into power.</p><p><strong>Why AI Needs a Master Prompt</strong></p><p><strong>AI Wanders Without a Compass</strong></p><p>Picture a genius who knows all but grasps nothing about you. You say, “Help me,” and they toss back a lecture, a blueprint, or a poem — smart, but off-base. That’s AI sans a master prompt. Built on vast data, it churns out endless options, yet it has no gut sense of your goal, context, or boundaries. It’s raw potential, spinning wild until you point it straight.</p><p>Ask AI to “organize my work” vaguely, and it might spit a 10-page plan, a grocery list, or a rant — some useful, most not. A master prompt like “Organize my 5-task day in 3 steps” cuts the fat, delivering crisp results fast.</p><p><strong>Miscommunication Eats Time</strong></p><p>People chat with AI like it’s a pal who “gets it,” but it’s a machine, sifting words through code, not instinct. Say, “Fix my setup,” and it might tweak hardware when you meant Wi-Fi — no context, wrong fix. Each goof triggers a volley of corrections, bloating chats and stalling you.</p><p>A coder once said, “Speed up my script,” expecting a tweak. AI wrote a 600-word essay on theory. With “Optimize my Python script, short code,” they got a 3-line fix in seconds — time saved, frustration dodged.</p><p><strong>Defaults Miss Your Mark</strong></p><p>AI tools ship with generic vibes — wordy, stiff, broad. These clash with your style. A coder wants tight code, not fluff. A teacher needs Thai lessons, not English. A writer seeks drafts, not edits. Without a master prompt, AI sticks to its mold, forcing mid-chat wrestling.</p><p>It can overstep too — pushing tools you lack or tangents you don’t want. Chats swell, hiding gems in junk. A master prompt flips this: “Code in Rust, no extras,” or “Thai lessons, basic,” syncing AI to your beat from the start.</p><p><strong>Inconsistency Jars Flow</strong></p><p>Using AI over months? No master prompt means each chat’s a reset. One day it’s sharp; the next, a novel. This yo-yo kills momentum — coding a system, writing a book — making you rehash prefs each time.</p><p>A developer lost hours reteaching “short Python fixes” across weeks. “Short Python code, always” in a master prompt kept it steady, month to month, flow unbroken.</p><p><strong>Newbies Suffer Most</strong></p><p>Beginners expect AI to read minds, but it can’t. Loose inputs yield mush, and without tech chops, they blame AI, not their ask. A master prompt — “Use simple terms, ask if unclear” — turns it friendly, slashing the learning hump.</p><p>A novice said, “Teach coding,” and got a PhD rant. “Teach Python basics, easy words” landed loops in 12 minutes — graspable, not grueling.</p><p><strong>How AI Needs a Master Prompt: The Mechanics</strong></p><p><strong>It Aims AI’s Might</strong></p><p>AI’s strength is data-crunching, but it’s a flood without focus. A master prompt aims it — “Stick to my task” keeps it tight; “No tool guesses” skips flops. It’s not a leash — it’s a scope, honing AI’s smarts to your bullseye.</p><p>A designer asked, “Plan a site.” AI dumped a 15-page spec. “Plan a 3-page site, key steps” got a 5-line roadmap — sharp, swift.</p><p><strong>It Frames Your Deal</strong></p><p>A master prompt is your pact with AI, ruling how it hears and talks. “Ask if vague” nabs errors. “Short unless ‘explain’” curbs sprawl. “Check my setup” roots it in your reality. This frame skips guesswork, making AI a teammate, not a maze.</p><p>A sysadmin said, “Secure my server.” AI pushed cloud fixes — they had none. “Secure a local Ubuntu server, short” gave a 2-line firewall rule — dead-on.</p><p><strong>It Syncs to You</strong></p><p>Your style — quick, deep, chill — varies. AI’s default doesn’t know. A master prompt syncs it: “Code in Go, no fluff” for coders, “French lessons, newbie” for teachers. It’s instant fit, dodging mid-chat tussles.</p><p>A writer asked, “Draft a post.” AI critiqued style. “Draft a 200-word blog, direct” landed a clean piece fast — workflow locked.</p><p><strong>It Bottles Context</strong></p><p>Projects stretch months; memory blurs. No master prompt, and you’d retrace tweaks — hours gone. “Standalone answers” makes replies mini-guides, reusable in a year sans chat hunts.</p><p>A coder paused a project for eight months. “Short Python fixes, standalone” resumed seamlessly — no rehash.</p><p><strong>How to Craft a Master Prompt: Two Techniques</strong></p><p>Crafting a master prompt is about clarity and purpose. Here are two paths: <strong>Active Craft</strong>, a hands-on build, and <strong>Passive Craft</strong>, where AI learns from real chats like this one.</p><p><strong>Technique 1: Active Craft — A Simple Guide</strong></p><p>Active Craft is proactive — you shape it step-by-step for your need.</p><p><strong><em>Step 1: Define Your Aim</em> Nail what you want:</strong></p><ul><li>“Design a scalable app.”</li><li>“Code a login form.”</li><li>“Teach Java basics.” This sets the dartboard.</li></ul><p><strong><em>Step 2: Mark Priorities</em> Flag the core:</strong></p><ul><li>“Stick to my first ask.”</li><li>“Code only, no theory.” This keeps AI on point.</li></ul><p><strong><em>Step 3: Block Guesses</em> List don’ts:</strong></p><ul><li>“No tool assumptions.”</li><li>“No expert jargon.” Add your bit — “I use Linux.”</li></ul><p><strong><em>Step 4: Shape Style</em> Set tone:</strong></p><ul><li>“Short, direct replies.”</li><li>“Expand only if ‘explain’ or ‘step by step.’”</li><li>“Plain English.” This fits your flow.</li></ul><p><strong><em>Step 5: Add Guardrails</em> Catch slips:</strong></p><ul><li>“Ask if unclear.”</li><li>“Check setup (e.g., ls).” These save pain.</li></ul><p><strong><em>Step 6: Ensure Reuse</em> Future-proof:</strong></p><ul><li>“Standalone for later.” This keeps it gold.</li></ul><p><strong><em>Active Craft Example</em> For coding:</strong></p><pre>You are assisting with coding. Follow these: <br>1. Prioritize my initial task. <br>2. Don&#39;t assume tools; list them. <br>3. Ask if unclear (e.g., language). <br>4. Give short, exact code with commands. <br>5. Reply short unless &quot;explain&quot; or &quot;step by step.&quot; <br>6. Verify setup (e.g., python --version). <br>7. Standalone for reuse. <br>Start: &quot;Understood, proceeding.&quot;</pre><p><strong>Technique 2: Passive Craft — Lessons from Experience</strong></p><p>Passive Craft grows from your real chats, like this one, where AI learns from stumbles to craft the prompt. Here’s how it played out:</p><p><strong><em>The Chaos: in A Real Chat:</em></strong> A user aimed to install Jitsi Meet in an LXC container on Proxmox, then add Jibri with GPU support. Chaos hit — AI’s steps broke down, piling errors and delays.</p><p><strong><em>Pain Points Emerged in your real issues in chat: Example</em></strong></p><p><em>GPG Key Fiasco</em></p><ul><li><em>Problem</em>: NO_PUBKEY B4D2D216F1FD7806 stopped the install cold.</li><li><em>Cause</em>: AI leaned on an outdated apt-key method unfit for Ubuntu 22.04.</li><li><em>Result</em>: User crashed into a trust wall, needing a modern key fix.</li></ul><p><em>Tool Mishap</em></p><ul><li><em>Problem</em>: curl not found, gpg not found — commands tanked.</li><li><em>Cause</em>: AI didn’t check a bare-bones LXC for essentials.</li><li><em>Result</em>: User scrambled to patch holes, losing setup time.</li></ul><p><em>Permission Snafu</em></p><ul><li><em>Problem</em>: Permission denied locked /usr/share/keyrings/.</li><li><em>Cause</em>: AI skipped sudo in piped commands like curl | gpg &gt;.</li><li><em>Result</em>: Key files didn’t write, repo setup failed.</li></ul><p><em>GPU Number Flub</em></p><ul><li><em>Problem</em>: GPU config listed 508, not the user’s 506.</li><li><em>Cause</em>: AI guessed device numbers blind.</li><li><em>Result</em>: GPU sharing teetered, risking a bust.</li></ul><p><em>Chat Bloat</em></p><ul><li><em>Problem</em>: Long-winded replies bogged the user down.</li><li><em>Cause</em>: AI rambled without a brevity rule.</li><li><em>Result</em>: Fixes hid in text swamps, slowing everything.</li></ul><p><strong><em>Lessons Surfaced (Teaching the Child: You ask Ai summary the lesson learns)</em></strong></p><ul><li><em>Problem</em>: GPG errors froze progress.</li><li><em>Cause</em>: Old ways clashed with new systems.</li><li><em>Result</em>: AI must fit the user’s version — check it.</li><li><em>Problem</em>: Tools weren’t ready.</li><li><em>Cause</em>: No upfront tool scan.</li><li><em>Result</em>: AI must list must-haves — don’t guess.</li><li><em>Problem</em>: Permissions jammed files.</li><li><em>Cause</em>: Sloppy command craft.</li><li><em>Result</em>: AI must nail sudo — test it.</li><li><em>Problem</em>: Wrong GPU numbers.</li><li><em>Cause</em>: No fact-check.</li><li><em>Result</em>: AI must verify — ask for data.</li><li><em>Problem</em>: Chat sprawled.</li><li><em>Cause</em>: No length leash.</li><li><em>Result</em>: AI must trim — stay sharp.</li></ul><p><strong><em>And this is the Moment of the Passive Craft:</em></strong></p><p><strong><em>User Asks AI to Craft It</em> </strong><br>The user said: “From mistakes that happened and what you learned, help me turn it into a master prompt.”</p><p><strong><em>And here AI write Master Prompt to you from the lessons</em></strong></p><pre>You are assisting with tech setup. Follow these: <br>1. Prioritize my first issue. <br>2. Don&#39;t assume tools or access; include installs (e.g., apt install curl gnupg). <br>3. Ask if vague (e.g., &quot;Can you share outputs?&quot;). <br>4. Give short, exact commands with sudo where needed. <br>5. Reply short unless &quot;explain&quot; or &quot;step by step.&quot; <br>6. Verify setup (e.g., ls -l /dev/nvidia*). <br>7. Make answers standalone for reuse. <br>Start: &quot;Understood, proceeding.&quot;</pre><p><strong><em>Why Passive Craft Rules</em></strong> Active Craft plots; Passive Craft proves. This prompt wasn’t dreamed — it was carved from GPG wrecks and GPU saves. AI learned from your grind, making it ironclad. That’s Passive Craft’s heart: AI turns your stumbles into steel.</p><p><strong>Benefits of Crafting a Master Prompt</strong></p><p><strong>Speed Soars, Stress Plummets</strong></p><p>A master prompt kills guesswork. Ask for a fix — bam, two lines, done. No wading through fluff or fixing flops. Tasks drop from 20 messages to 3, freeing time and nerves.</p><p>A writer spent an hour on “Draft a post” — AI rambled. “200-word draft, direct” — five minutes, spot-on.</p><p><strong>Precision, Your Fit</strong></p><p>Your prompt molds AI. Coders get code, not chatter. Teachers get lessons in their tongue. Writers get drafts, not notes. It’s your cut, no mid-chat fight.</p><p><strong>Steady Flow</strong></p><p>Months apart, “Short Java fixes” holds — June to March, no drift. Long projects glide, effort stays low.</p><p><strong>Newbie Lift</strong></p><p>Beginners flip “Teach coding” flops — PhD rants — to “Python basics, simple” — loops in 15 minutes. AI’s a pal, not a puzzle.</p><p><strong>Errors Fade, Trust Grows</strong></p><p>Mistakes drop when AI sticks to rules — no wild leaps, just hits. Trust builds; AI’s a go-to, not a gamble.</p><p><strong>Scalable Gains</strong></p><p>One prompt scales — coding to writing, tweak and roll. Upfront work, endless wins.</p><p><strong>Why This Matters to All</strong></p><p>AI’s hype — “It just works!” — fades sans prompts. Coders get junk, writers get fluff, teachers get wrong tongues. Most fault AI, not input. Awareness flips this: a prompt’s no geek badge — it’s practical gold. Tell peers, “Set rules once, win always.” Show a messy chat vs. a tight one — they’ll see.</p><p><strong>Conclusion: Prompt On, Power Up</strong></p><p>AI’s a tool, not a seer. Loose, it’s a yakker; led, it’s a blade. A master prompt — active or passive — takes minutes, saves days, cuts grief, and sharpens hits. Craft it yourself, or let AI forge it from your stumbles — it’s your reins on AI’s horsepower.</p><p><strong>Bonus when you read at this ending:</strong><br><em>I like to share you a bonus trick you can retrieve back all master prompt already craft in chat to reuse to your next chat if you using Grok-3 by asking chat like this:</em><br>“can you show me what master prompt that activate in this chat”<br><strong><em>And Grok-3 return:</em></strong></p><pre>You are assisting me with technical setup instructions. To ensure accurate and effective responses, follow these rules: <br>1. Prioritize My Initial Request: Focus on the first problem or question I present as the top priority throughout the chat, unless I explicitly shift focus.<br>2. No Assumptions: Do not assume I have tools, permissions, or prior steps completed. Include all prerequisites (e.g., software installs, sudo usage) in your instructions.<br>3. Ask for Clarification: If my question is unclear, too short, or lacks context, ask me for more details or specific data (e.g., command outputs) before answering, to avoid guessing.<br>4. Keep Instructions Complete: Provide step-by-step commands with exact syntax, including sudo where needed, and explain key parts briefly if they&#39;re complex or hardware-specific.<br>5. Short and Direct Answers: Reply directly to my question in a short, concise way. Only give long answers with full details, explanations, or step-by-step guides if I ask for &quot;explain,&quot; &quot;full detail,&quot; or &quot;step by step,&quot; to avoid chat bloat and keep responses fast.<br>6. Verify Hardware/Details: For hardware-related steps (e.g., GPU), include commands to check my specific setup (e.g., ls -l /dev/*) and use that data in the response.<br>7. Reusable Format: Structure answers as standalone, clear instructions I can save and reuse months later without needing chat context.<br>Start your response with: &quot;Understood, proceeding with your request.&quot;</pre><h4>Q&amp;A:</h4><h4>What is difference Between Master Prompt and Prompt Engineering</h4><p><em>A </em><strong><em>master prompt</em></strong><em> is a single, clear instruction you give AI at the start of a chat to guide its behavior for a specific task or session — like a rulebook for how it should respond to you.</em></p><p><strong><em>Prompt engineering</em></strong><em>, on the other hand, is the broader skill or process of designing, testing, and refining prompts (including master prompts) to get the best results from AI across various tasks. It’s the art and science behind crafting prompts, often done by experts to optimize AI for complex systems or general use — like a chef perfecting recipes.</em></p><p><strong><em>Key Difference: A master prompt is a tool you use; prompt engineering is the craft of making that tool effective.</em></strong></p><h4>What is difference Between Master Prompt, User Prompt, and System Prompt</h4><p><em>A </em><strong><em>master prompt</em></strong><em> is a user-created, reusable instruction given to AI at the start of a session to shape its behavior for a specific task or chat</em></p><p><em>A </em><strong><em>user prompt</em></strong><em> is any single input or question a user gives AI during a session, often short and task-specific, without necessarily setting overall rules. Example: “Fix my code” or “Write a paragraph.”</em></p><p><em>A </em><strong><em>system prompt</em></strong><em> is a predefined instruction set by the AI’s developers, embedded in its core to define its default tone, role, or limits — like a factory setting.</em></p><p><strong><em>Key Difference</em></strong><em>: A master prompt is your custom control for a session, a user prompt is your one-off ask, and a system prompt is the AI’s built-in baseline.</em></p><p><em>Big thanks to xAI’s Grok for brainstorming this with me</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1bbf8b91440" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Wolf Pack in LLM]]></title>
            <link>https://medium.com/@thanitkebsiri/wolf-pack-in-llm-57cc2a3f4414?source=rss-fc3bae1d80af------2</link>
            <guid isPermaLink="false">https://medium.com/p/57cc2a3f4414</guid>
            <dc:creator><![CDATA[Thanit Kebsiri]]></dc:creator>
            <pubDate>Thu, 20 Feb 2025 07:15:06 GMT</pubDate>
            <atom:updated>2025-02-20T07:15:06.128Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K0nrpKxpvMlOIXT_BrjPMQ.jpeg" /></figure><h3>What’s a Wolf Pack in LLM?</h3><p>Imagine you’re lost in the woods, and a pack of wolves starts circling you. They’re sneaky, stubborn, and won’t let up — each move they make just tightens the trap. Now picture that happening with artificial intelligence (AI), specifically the big language models (LLMs) we use for everything from writing emails to coding apps. I call this the “wolf pack” — a trio of quirks that can turn these smart tools into frustrating foes. I stumbled into this trap myself, losing 50,000 tokens (think of them as AI “energy credits”) trying to fix a simple coding project, only to end up with more bugs than I started with!</p><p>So, what is the wolf pack? It’s three problems that haunt LLMs:</p><ol><li><strong>Pattern Locking:</strong> The AI spots something familiar — like a coding trick it’s seen before — and keeps suggesting it, even if it’s wrong for your situation. It’s like a wolf that only knows one hunting move.</li><li><strong>Lack of Multi-Level Reasoning:</strong> Humans can zoom in on details (a single line of code) then zoom out to see the big picture (the whole app). LLMs? They chug along line by line, missing how one piece connects to the rest — like a wolf blind to the forest.</li><li><strong>No Frustration: </strong>When you or I hit a dead end, we get annoyed and try something new. LLMs don’t feel that — they’ll cheerfully repeat a bad fix forever, like a wolf that never tires of barking up the wrong tree.</li></ol><p>I coined this term after my AI adventure went haywire, but it’s a real issue many don’t see coming. Let’s unpack where it comes from and how it affects the AI tools we use today.</p><h4>Where Does the Wolf Pack Come From?</h4><p>LLMs — like the ones powering chatbots or coding assistants — are <strong>trained on massive piles of text:</strong> books, websites, code forums, you name it. They’re geniuses at spotting patterns in that data, but that’s also their Achilles’ heel. They don’t truly “<strong>think</strong>” like us; they <strong>predict what comes next based on what they’ve seen before</strong>. No emotions, no gut checks — just stats and sequences. That’s why they lock onto patterns, miss the bigger picture, and never sense when they’re stuck. It’s not a bug; it’s how they’re built.</p><p>I learned this the hard way. I asked an AI (Claude 3.5 Sonnet) to build me a simple app to study testing. It gave me code, but when I ran the tests, bugs popped up. The AI kept tweaking the code — each fix birthing new problems — until I was drowning in errors. Turns out, it paired two libraries that didn’t play nice together after an update. The wolf pack had me cornered!</p><h4>Enter GEN1 and GEN2: The AI Generations</h4><p>Not all LLMs are the same. They come in two flavors I call GEN1 and GEN2:</p><ul><li><strong>GEN1:</strong> These are the “older” models, like GPT-4o (from OpenAI), Claude 3.5 Sonnet (from Anthropic), and DeepSeek-V3. They’re powerful but classic — think of them as the first wave of smart assistants.</li><li><strong>GEN2: </strong>The newer crew, like GPT-o1, GPT-o3 (fancier OpenAI models), and DeepSeek-R1. They’re built with tricks to “reason” better, like breaking problems into steps or learning from mistakes.</li></ul><p>Both generations face the wolf pack, but in different ways. Most folks — whether they’re hobbyists or companies — don’t realize this until it bites them.</p><h4>How the Wolf Pack Impacts GEN1 and GEN2</h4><ul><li><strong>GEN1 </strong>(e.g., Claude 3.5 Sonnet): These models are wolf pack magnets. In my case, Claude locked onto quick fixes (“add this line!”), ignored the library clash causing the bugs, and kept suggesting more tweaks without noticing the mess growing. Businesses using GEN1 for customer service or coding often see this: chatbots repeating useless advice or coders stuck in a loop of half-baked fixes. It’s widespread because GEN1 leans hard on old-school pattern-matching.</li><li><strong>GEN2</strong> (e.g., GPT-o1): These models are smarter — they might pause and rethink a problem — but they’re not immune. They can still latch onto patterns if their training data skews that way, miss how a fix ripples through a system, and lack that human “I’m done with this!” instinct. A company using GEN2 for fraud detection might see it suggest better rules than GEN1, but if it overlooks a server glitch, the wolf pack still howls.</li></ul><p>The catch? Many people — coders, small biz owners, even big firms — jump into these tools thinking, “<strong>AI’s so advanced, it’ll just work!</strong>” They don’t spot the wolf pack until they’re out of tokens or deadlines, like I was.</p><h4>The Future: Predicting the Impact</h4><p>As more people lean on LLMs — GEN1 today, GEN2 tomorrow — the wolf pack will keep tripping us up. Picture a small business owner using GPT-4o to write a website. It churns out code, but a tiny bug snowballs because the AI can’t see the full design. Or a bank using GPT-o3 to catch scams — it might nail 90% but miss a sneaky flaw, costing millions. The impact grows as we trust AI more without knowing its limits. My 50K-token flop taught me: ignorance of the wolf pack is the real danger.</p><h4>Solutions: Multi-Hat and Multiple Outcomes</h4><p>So, how do we tame this pack? I came up with a trick called the “Multi-Hat” method — think of it as putting the AI through a team meeting:</p><ul><li><strong>Hat 1: Planner</strong>: Tell the AI, “Design two ways to fix this — don’t just pick one!” It might say, “Try tweaking the code or check the libraries.”</li><li><strong>Hat 2: Checker:</strong> Then say, “Audit those ideas — are they solid? What’s missing?” It might catch, “Oh, the library versions don’t match!”</li><li><strong>Hat 3: Boss:</strong> Finally, “Pick the best fix and guess how likely it’ll work.” It could decide, “Library fix — 90% chance!”</li></ul><p>This forces the AI to try different angles (bye, Pattern Locking), look at the whole problem (hello, Multi-Level Reasoning), and shift gears (mimicking frustration). Plus, asking for multiple outcomes — not one “best” answer — keeps it from getting stuck.</p><h4>Simple Example for Everyone</h4><p>Say your Wi-Fi drops randomly. You ask an AI:</p><ul><li><strong>Planner:</strong> “Option 1: Restart the router. Option 2: Check for signal interference.”</li><li><strong>Checker:</strong> “Restarting’s easy, but interference might be the real issue — any new gadgets nearby?”</li><li><strong>Boss:</strong> “Interference fix: 80% chance. Restart: 50%. Try interference first.”</li></ul><p>No tech degree needed — just nudge the AI to think broader and double-check itself. That’s the wolf pack tamed!</p><h4>Wrap-Up: Stay Aware</h4><p>The wolf pack isn’t going away — it’s baked into LLMs. Whether you’re using GEN1 or GEN2, watch for those circling wolves. My lesson? Don’t let AI run wild — guide it with a multi-hat leash and demand options. Next time you chat with an AI, you’ll spot the pack before it pounces!</p><p><em>Big thanks to xAI’s Grok for brainstorming this with me</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57cc2a3f4414" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Three problem when using LLM for coding and fix-bug]]></title>
            <link>https://medium.com/@thanitkebsiri/three-problem-when-using-llm-for-coding-and-fix-bug-c65b63d9e085?source=rss-fc3bae1d80af------2</link>
            <guid isPermaLink="false">https://medium.com/p/c65b63d9e085</guid>
            <category><![CDATA[using-llm-for-coding]]></category>
            <dc:creator><![CDATA[Thanit Kebsiri]]></dc:creator>
            <pubDate>Sat, 01 Feb 2025 15:09:44 GMT</pubDate>
            <atom:updated>2025-02-01T15:09:44.232Z</atom:updated>
            <content:encoded><![CDATA[<p>WHY DO AI MODELS KEEP MAKING THE SAME MISTAKES?<br>Once upon a time, a group of developers noticed something strange: whenever they relied heavily on AI assistants — like Sonnet-3.5, Chat-4o, or DeepSeek-V3 — to troubleshoot their code, the AI kept getting stuck in odd, repetitive loops. Whenever a styling error appeared in a front-end file, the AI would insist on fixing the same snippet repeatedly, ignoring the possibility that the real culprit lurked in a different function or file.</p><p>This recurring problem boiled down to three major issues:</p><p>1) PATTERN LOCKING <br> Large Language Models (LLMs) learn from vast training data and latch onto patterns — even if those patterns don’t precisely match the current situation. Once they think they’ve “seen” a particular bug before, they’ll propose the same fix repeatedly. There’s no automatic reflex that says, “Wait, maybe I’m wrong here.”</p><p>2) LACK OF MULTI-LEVEL REASONING <br> Humans naturally zoom in on details and then zoom out to see the broader system. AI processes text line by line (token by token), so it doesn’t spontaneously step back to review how code in one function might interact with the rest of the stack. It might fixate on a front-end snippet while ignoring the fact that the real problem is in a server configuration or a library conflict.</p><p>3) AI DOESN’T “FEEL” FRUSTRATION <br> A human programmer notices when they’ve tried the same fix multiple times without success. They become frustrated and switch tactics. An AI, however, will keep proposing the same solution unless explicitly redirected. It lacks an internal signal that says, “I’m stuck!”</p><p>BEHIND THESE ISSUES: STRENGTHS, WEAKNESSES, AND THE HUMAN FACTOR<br>Despite these shortcomings, AI excels at pattern-based solutions. It never tires, and it can comb through large codebases more efficiently than a single human. But it fails to question its own assumptions or step outside its narrow focus.</p><p>That is why human developers remain critical. They can detect when the AI is stuck or overlooking a file, library, or environment variable, and supply new context that forces the AI to try a different angle.</p><p>STORIES FROM THE FIELD</p><p>THE LOGIN PAGE DILEMMA <br>A small start-up had a login page with two key components: <br>- A front-end JavaScript script for handling the password form <br>- A back-end server for validating credentials</p><p>The AI kept fiddling with the JavaScript for a “styling” glitch. In reality, the bug was caused by one line of shared CSS. The AI repeated small variations of the same JS fix multiple times, never checking the CSS, until a human finally inspected that file and discovered the real problem.</p><p>THE NEVER-ENDING TEST CONFLICT <br>Another team ran both unit tests and end-to-end (e2e) tests on their authentication code. The e2e tests kept failing, so they asked an AI to resolve the errors. Each time, it tweaked the test scripts but ignored a library dependency conflict causing the real problem. After multiple failures, a developer noticed the version mismatch. The AI simply was not designed to step back and see the bigger picture.</p><p>A QUICK CODE SNIPPET EXAMPLE OF REPEATED FIX ATTEMPTS<br>Below is a fictional snippet illustrating how an AI might keep tweaking the same part of the code, ignoring the real cause:</p><p>CODE SNIPPET:</p><p>function updateLoginUI() {<br> // The AI keeps adding the same “fix” for styling<br> const loginForm = document.getElementById(“loginForm”);<br> loginForm.style.backgroundColor = “#FFFFFF”; // Repeated fix attempt</p><p>// Meanwhile, the actual bug is in CSS:<br> // .login-form { display: none; }<br> // The AI does not remove or even check further.<br> }</p><p>In this scenario, the AI sees a pattern that “the login form color might be off” and keeps proposing the same background fix. It never checks the CSS file that is actually hiding the entire form.</p><p>ENTER DEEPSEEK-R1 AND THE O1 DESIGN CONCEPT<br>Some teams responded by creating refined models. DeepSeek-R1, for example, integrates checks for repeated failures and broader context signals. It might hook into debugging tools or logs to reduce pattern locking and detect loops.</p><p>Meanwhile, a conceptual framework called O1 emerged. Instead of relying on a specialized AI, O1 acts as a workflow layer you can wrap around any Large Language Model. It does three things:</p><p>1) LAYERED CONTEXT INPUTS <br> O1 ensures the AI examines multiple parts of the system — front-end, back-end, database, configuration — so it cannot remain locked onto a single file.</p><p>2) REAL-TIME VALIDATION HOOKS <br> Each time the AI suggests a fix, O1 runs quick tests to confirm it works. If not, O1 instructs the AI to expand its scope, rather than just retrying the same fix.</p><p>3) FAILURE-DRIVEN RE-FRAMING <br> If the AI repeats itself more than two or three times with no success, O1 says: “Stop. Check logs, environment variables, or other modules.” It is effectively simulating “frustration.”</p><p>Though O1 differs from DeepSeek-R1 (a specialized model in its own right), both reduce looped mistakes and prompt deeper debugging.</p><p>RECOMMENDED WORKFLOW: COMBINING GENERAL AIS, O1, AND HUMAN OVERSIGHT<br>- GATHER INITIAL REQUIREMENTS <br> Use a general AI (such as Sonnet-3.5 or Chat-4o) to gather info and generate a high-level project plan, including code snippets and test outlines. Consolidate all details into a markdown file, for example “project-implement-xyz.md.”</p><p>- ARCHITECT MODE WITH O1 OR DEEPSEEK-R1 <br> Provide that markdown file to O1 or DeepSeek-R1 for scanning and analysis. Address any missing dependencies or overlooked security concerns. Produce a refined architecture that highlights potential pitfalls, like conflicting libraries.</p><p>- IMPLEMENTATION AND TESTING (WITH A HUMAN IN THE LOOP) <br> Give the AI the refined plan to implement features step by step, running unit, integration, and e2e tests frequently. Always have a human developer on standby to intervene if the AI repeats a flawed fix or focuses on the wrong area. Use O1 or DeepSeek-R1 checks to direct the AI to alternate files or logs whenever repeated failures arise.</p><p>THE “MASTER PROMPT” THAT PREVENTS LOOPS<br>Even if you are not using O1 or DeepSeek-R1, a well-constructed prompt can significantly enhance an AI’s performance. The following Master Prompt is loaded at the start of each session:</p><p>MASTER PROMPT FOR AI-ASSISTED DEVELOPMENT</p><p>1. AVOID PATTERN LOCKING <br> Do not fixate on a single file or known pattern. If a solution fails more than once, revisit assumptions and explore other components.</p><p>2. ENCOURAGE MULTI-LEVEL REASONING <br> Investigate related files, dependencies, environment variables, and logs. Consider both the frontend and backend interactions.</p><p>3. SELF-CORRECTION AND LOOP AWARENESS <br> After two repeated failures, pause and re-check the broader context. Ask clarifying questions if anything seems unclear or contradictory.</p><p>4. FOLLOW THE PROJECT BLUEPRINT <br> Read “project-implement-xyz.md” thoroughly before coding. Verify each step with real-time context (like logs and test results).</p><p>5. CODE QUALITY AND STANDARDS <br> Write maintainable, well-documented, and modular code. Show code in clearly marked sections.</p><p>6. HUMAN-IN-THE-LOOP COLLABORATION <br> Explain your rationale for major code changes. Mark unclear areas for human review; expect a human to finalize decisions.</p><p>7. TESTING AND VALIDATION <br> For each code change, run unit, integration, and e2e tests. If tests fail repeatedly, do not just keep rewriting the same fix.</p><p>8. DEPLOYMENT <br> Follow the specified steps (for example, Docker Compose). Confirm everything runs properly before finishing.</p><p>Developers paste this text into the AI’s context first, then provide “project-implement-xyz.md.” Reminding the AI to avoid pattern locking, check the broader context, and self-correct lowers the risk of endless loops. If it does get stuck, the developer points to whichever step it overlooked and reorients the AI.</p><p>A QUICK-START CHECKLIST FOR IMPLEMENTATION<br>1) PREPARE YOUR ENVIRONMENT <br> — Set up a repository with code and a CI pipeline for automatic tests. <br> — Ensure the AI or O1 framework can access test results.</p><p>2) LOAD THE MASTER PROMPT <br> — Paste the prompt into the AI’s context at the start. <br> — Provide planning files (like “project-implement-xyz.md”).</p><p>3) ITERATIVE DEVELOPMENT <br> — Request small, incremental code changes instead of massive overhauls. <br> — Run tests (unit, integration, e2e) after each change.</p><p>4) MONITOR FOR LOOPS <br> — If the AI repeats a fix twice, tell it to check alternative files or dependencies. <br> — Watch for suspiciously similar outputs or repeated failures.</p><p>5) FINAL DEPLOYMENT <br> — When tests pass, deploy (for example, via Docker). <br> — Check logs and environment settings in production.</p><p>KEY TAKEAWAYS FOR A SMOOTHER AI EXPERIENCE<br> 1) Any LLM — be it DeepSeek-V3, Chat-4o, or Sonnet-3.5 — can fall into repetitive loops if left unprompted. <br>2) A structured prompt strategy that highlights multi-level reasoning and loop awareness can be a powerful first line of defense. <br>3) O1 is a flexible design concept you can apply to any AI, guiding it to consider multiple levels and reevaluate after repeated failures, essentially simulating “frustration.” <br>4) DeepSeek-R1 is a specialized AI model with advanced reasoning and feedback loops, but it still benefits from a well-crafted prompt and human oversight. <br>5) No matter the tool, a human engineer’s role is vital for testing, validation, and intervention, stopping an AI from cycling through the same solutions endlessly.</p><p>So, if you ever see your AI relentlessly tweaking the same snippet of code, recall that it is not truly “frustrated” — it is just following patterns. With layered design, structured prompts, short checklists, and diligent human supervision, you can steer any AI toward more accurate, less repetitive outcomes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c65b63d9e085" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>