When an AI model makes the same undesirable output two or three times, treat it as a signal. Create a custom rule or prompt instruction that explicitly codifies the desired behavior. This trains the AI to avoid that specific mistake in the future, improving consistency over time.
Generic evaluation metrics like "helpfulness" or "conciseness" are vague and untrustworthy. A better approach is to first perform manual error analysis to find recurring problems (e.g., "tour scheduling failures"). Then, build specific, targeted evaluations (evals) that directly measure the frequency of these concrete issues, making metrics meaningful.
Effective GPT instructions go beyond defining a role and goal. A critical component is the "anti-prompt," which sets hard boundaries and constraints (e.g., "no unproven supplements," "don't push past recovery metrics") to ensure safe and relevant outputs.
Instead of manually refining a complex prompt, create a process where an AI agent evaluates its own output. By providing a framework for self-critique, including quantitative scores and qualitative reasoning, the AI can iteratively enhance its own system instructions and achieve a much stronger result.
Many AI tools expose the model's reasoning before generating an answer. Reading this internal monologue is a powerful debugging technique. It reveals how the AI is interpreting your instructions, allowing you to quickly identify misunderstandings and improve the clarity of your prompts for better results.
When an LLM produces text with the wrong style, re-prompting is often ineffective. A superior technique is to use a tool that allows you to directly edit the model's output. This act of editing creates a perfect, in-context example for the next turn, teaching the LLM your preferred style much more effectively than descriptive instructions.
When an AI tool fails, a common user mistake is to get stuck in a 'doom loop' by repeatedly using negative, low-context prompts like 'it's not working.' This is counterproductive. A better approach is to use a specific command or prompt that forces the AI to reflect and reset its approach.
When a prompt yields poor results, use a meta-prompting technique. Feed the failing prompt back to the AI, describe the incorrect output, specify the desired outcome, and explicitly grant it permission to rewrite, add, or delete. The AI will then debug and improve its own instructions.
You don't need to create an automated "LLM as a judge" for every potential failure. Many issues discovered during error analysis can be fixed with a simple prompt adjustment. Reserve the effort of building robust, automated evals for the 4-7 most persistent and critical failure modes that prompt changes alone cannot solve.
Fine-tuning an AI model is most effective when you use high-signal data. The best source for this is the set of difficult examples where your system consistently fails. The processes of error analysis and evaluation naturally curate this valuable dataset, making fine-tuning a logical and powerful next step after prompt engineering.
When an agent fails, treat it like an intern. Scrutinize its log of actions to find the specific step where it went wrong (e.g., used the wrong link), then provide a targeted correction. This is far more effective than giving a generic, frustrated re-prompt.