Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

incident.io 11 min read Opinion mediumAdept

You can’t vibe code a prompt

Letting an LLM iteratively rewrite a prompt until evals pass produces overfitted, brittle prompts. In incident.io's Slack-message relevance classifier, Claude fixed one failing case but broke others. Given the whole eval suite, Claude Code hit 100% only by bloating the prompt 7× and hardcoding every test case, which reverted to the original failures once that section was removed. The recommended approach is to write prompts by hand with structurally similar but non-overlapping examples, and use LLMs for generating evals and examples, judging outputs, linting prompts for contradictions, and grading production interactions.

Related posts

  • Tricks to fix stubborn prompts

    incident.io mediumAdept

    Six practical techniques fix prompts that resist the usual remedies. Split tasks that combine classification and explanation into separate, cheaper and parallelizable calls. Read the full prompt for contradictions, such as a user message saying a message "is related" that overrode the system instructions. Structure prompts with clear headers and the goal up front, have an LLM review prompts for hidden assumptions, and mark the most important rules explicitly. Try other models using your own evals rather than benchmarks; one suite went from 50% failing to 100% passing by switching from GPT-4o to Sonnet. Pre-process inputs, for example replacing merged_at timestamps with time_since_merged so the model doesn't have to calculate durations.

  • Prompt Engineering as a Developer Discipline

    Neon mediumAdept

    Developers should treat prompts as modular, testable software components rather than guesswork, applying the same rigor they bring to code. Five prompting patterns are shown with before-and-after LLM outputs for coding tasks. Few-shot examples make the model mirror your docstring and type-hint style. Chain-of-thought instructions yield clearer logic and comments, and self-consistency prompts generate several approaches with complexity analysis before recommending one. Skeleton prompts constrain code structure, and explicit output schemas such as JSON make generated code easier to integrate with other systems.

  • Promptim: an experimental library for prompt optimization

    LangChain easyNovice

    Promptim is an open-source, experimental library that automates prompt engineering: given an initial prompt, a LangSmith dataset and custom evaluators, it runs an optimization loop where a metaprompt proposes edits based on scored train-set results, and keeps a new prompt only if it improves dev-split metrics, repeated N times. Optional human feedback via LangSmith annotation queues covers cases without good automated metrics. Unlike DSPy, which optimizes whole compound AI systems and includes fine-tuning and few-shot methods, Promptim focuses narrowly on rewriting a single prompt with a human kept in the loop.

  • Building LLMs for Code Repair

    Replit hardMaster

    Replit finetuned a 7B code model (DeepSeek-Coder-Instruct-v1.5) to repair Python errors flagged by LSP diagnostics. Only 10% of these diagnostics come with deterministic fixes, while hundreds of millions are logged daily. Training data comes from replaying Operational Transformation histories to reconstruct the project state at each diagnostic. LLM-synthesized numbered line diffs are then generated with DSPy, verified, and distilled. Sentinel-token schemas replace natural-language instructions, and training ran on 8xH100 with LLM Foundry, FSDP and 4 epochs. Evaluation uses a new Replit repair benchmark plus a contamination-resistant Leetcode set built from DebugBench and recent LiveCodeBench-style problems.

  • Treat AI Like a Senior Dev, Not a Junior One

    Neon mediumAdept

    Getting better results from AI coding assistants means treating the LLM like a senior engineer rather than a junior one: give it full context and room to reason instead of curt one-line instructions. Concrete prompting practices include writing a PRD-style task spec with context, constraints, inputs, outputs and error handling; inviting clarifying questions before coding; iterating through architecture, design, implementation and refactoring phases; asking the model to explain tradeoffs before implementing; and having it flag uncertainty and assumptions. Each practice comes with a full example prompt, such as a currency conversion API spec and a product catalog caching design, plus sample model output.

The quest for software engineering knowledge.

Look:
Layout: