How I Think About Prompting AI Agents Across the Entire Prompt Hierarchy

Reddit r/AI_Agents News

Summary

The author shares principles for writing effective prompts for AI agents, emphasizing focusing on what truly matters, high-signal communication, actionable instructions, and using established phrasing.

1. Optimize for What You Actually Care About The prompts have to be optimized for what you really care about, not for theoretically making the model follow every petty requirement you could have for it. The model will always screw up something sometimes no matter how you prompt. You could theoretically add every edge case handling to your prompt. Then you have a huge diluted prompt optimized for tail ends. For example, "DON'T USE EMOJIS" is bad unless it's a very common problem you have. I bet it is not a problem unless you literally send it memes, jokes, or internet slang. Let it fail at what barely matters. The less intent you want to convey in your prompt, the better, because it will adhere more to it. Focus on what you actually care about the model knowing. I think it would be best to go through every sentence you write into your system prompts and ask yourself: Do I really care about this? What is the expected gain from having this? Rank them in that order and remove the bottom half. Then also ask the model: How precise is this? How do you understand it? For anything that you think it misunderstands, you need to change or expand it if you care about it. Otherwise, it's easier to just remove it too. 2. High Signal, No Drama For communication style, I want something like: High signal but no drama. Professional-sounding, direct, dry, and competent. "Super boring" is not precise enough. You need to define boring more precisely. "High signal but no drama" is closer to what I mean. Avoid sycophancy. I am not your friend. I think "AVOID SYCOPHANCY LIKE THE PLAGUE. I AM NOT YOUR FRIEND" might even work better than something abstract like "Do not be a sycophant under any circumstances." 3. Keep Instructions Actionable Keep prompts actionable. Remove trivia and environmental things that are inactionable for the model. They don't tell the model what to actually do differently. The prompt is better when it addresses a genuine issue you actually have. It's not some: "use this skill if you think you might want to use it but don't feel pressured" vague instruction. It addresses a real failure you have. 4. The Average Effect of the Prompt Matters Overall, I don't know if it's technically true, but I feel like what models do is conflate the complete string of whatever you send them into the one most probable case and then default toward it. So it's decent to split modal "unless user asks otherwise" logic into literal separate prompts or separate agents. It also means that the exact wording doesn't matter as much as the average effect of the prompt. No clue exactly how metaphor examples affect it. Are they more extracting and might make it start to overfit for the literal interpretation, or will it actually get the metaphor? Certainly some models are too dumb for metaphors. I think metaphor examples can affect the linguistic style. The model might start using some itself, but it should not degrade reasoning. 5. Default to Established Language Where It Works I have no clue what the most effective prompts are. Another thing that could be good is to ask: What are the most established ways to convey this intent? Is there some word for it? What is the typical way people phrase it? If it does the job, default to clichés. It saves tokens and makes it least likely to be misinterpreted. 6. Keywords as Semantic Pointers I was experimenting with long spams of keywords like: Bad — avoid: Sycophancy. Flattery. Obsequiousness. Servility. Fawning. Toadying. Kowtowing. Groveling. Bootlicking. Brown-nosing. Ingratiation. Adulation. Subservience. Deference. Blandishment. Cajolery. Flunkeyism. Yes-manning. Apple-polishing. Good — apply: Honesty. Integrity. Directness. Candor. Sincerity. Authenticity. Frankness. Forthrightness. Independence. Assertiveness. Objectivity. Impartiality. Principle. Dignity. Self-respect. Conviction. Truthfulness. Transparency. Uprightness. Courage. I just made this up, so it has some flaws. Basically, you use words as pointers and pick those that you feel convey your intent. You can also ask the model how it understands each in one sentence, and then if you like that definition, put it in the list. 7. Give Up on Conditional Logic Where Possible Really give up on conditional logic where possible. Instead, have a short shared system prompt, then very long modal system prompts for each agent. For example: write-plan discuss-yourself-brainstorm discuss-ask-me-rephrase build-simple build-creative explore-files explore-web Each of them should know all it needs to know and nothing any of the others need to know. Then toggle between them manually. It depends on whether you want something like "I DO NOT WANT YOUR OPINION." You can configure different agents and toggle between them. Make one for discussion but without the sycophancy, and another one for literally: I DO NOT WANT YOUR OPINION. For a build agent, the intent can be much closer to: Do what I ask, no more and no less. Do not simplify, modify, or otherwise change directions I communicate. Do not veer off on wild goose chases trying to do a different task than the one you've been told to complete. Give each agent a different prompt and different skills and toggle between each in a session. OpenCode is good for this. 8. Skills Should Be Optional Only use skills for something you want the model to optionally use, where your whole workflow doesn't depend on it and it's just a nice-to-have add-on. Skills should be for: Nice to have. Why not. Experiment with it if it's cool and helpful. I don't care if it fails. If your whole workflow depends on something happening, don't make it depend on the model deciding whether it wants to load some optional skill. 9. Don't Ask the Model to One-Shot Everything Also write validator scripts. Tell the model to write scripts and run them. What it does is the model realizes something is wrong and does a second pass. Don't ask the model to one-shot anything. You could maybe even tell the model to literally run a validator script every time before it talks to you. Don't even let it respond to you unless it has passed a script that validates whether the response is up to your standard. For example: no certain words; has a certain structure; is within some threshold of length; has given formatting. The important thing is that it generates something, checks it, notices something is wrong, and then does a second pass. 10. Build a Prompt Evaluation Engine Maybe you could even build a prompt evaluation engine. First: Write the prompt instruction you care about now. Then get some typical issues or tasks you typically send to the model. Let the model generate responses for each. Then let another model session independently evaluate whether it has passed the requirement and respond with something like: 5/10 Only ever include prompts that are above some threshold, like 7/10. Otherwise, don't even bother putting that sentence in your prompt. If it doesn't work in isolation, I would be skeptical that it will suddenly work when buried in a giant prompt. 11. Don't Train the Conversation Into an Apology Loop There is also this effect: You yell at the model → it is sorry instead of doing the job → you yell at it more → now it thinks that the whole interaction is literally supposed to be: "user yells at stupid model, let me do something stupid again so he yells more, it fits the interaction." So really you need to think much more like: What is the thing I can say that is the highest-level signal that doesn't make the model be sorry? Best not to tell it where it failed. Tell it what to do. Models default to being useless if you keep telling them that they are wrong. Tell them actionably what to do. 12. Define the Overarching Goal Also, I think this matters: Let the model know what your overarching /goal is. And even define: Highest goals and non-goals. If those are not what the model could think by default, they should be defined in the global system prompt. But only define them if they aren't common sense. Define what is unique to your goals. Especially things where it's like: "Yeah, basically everyone has this goal, but you treat it like nothing." 13. Prefer "Do This" Over "Avoid This" You should probably do something like: 80% "do this" instructions and 20% "avoid these" instructions. Tell the model what behavior you want, not only what behavior you don't want. 14. Separate Exploration From Intent-Gathering Also have two distinct phases. One is exploration. The other is intent-gathering. Exploration Don't complain that the model does something. You want it to freestyle. Let it make a prototype that sucks. Let it talk generic material half the time. The point is to explore. Intent-Gathering Then ask: Which points did I approve? Then assemble only those into a whole piece. You have to label what you like. Don't ask: Make a plan based on this whole conversation. The whole conversation contains exploration, rejected ideas, half-finished thoughts, generic material, and things you never approved. 15. The Overall Layering So overall, there are these layers: 1. Unusual highest goals and non-goals What actually should override everything else, even the user's immediate prompt itself. 2. /goal The current conversation goal. 3. Global system prompt Things every agent would share in its prompt anyway. 4. Per-agent, modal, manually toggled prompts For example: write-plan discuss-yourself-brainstorm discuss-ask-me-rephrase build-simple build-creative explore-files explore-web 5. Skills Nice-to-have things. Why not. Experiment if it's cool and helpful. I don't care if it fails. 6. Macros Things like /concise. Ad-hoc prompts for low-stakes but annoying adjustments. Instead of yelling: Be concise. you slash-command a macro that has maybe ten sentences defining exactly what concise means to you. That way you don't have to repeatedly improvise some angry correction. You reuse the same instruction. 16. The General Idea The general idea is to stop putting everything into one giant prompt. Focus on what you actually care about the model knowing. Keep the shared system prompt short. Split incompatible modes into separate agents and toggle them manually. Give every agent everything it needs and nothing it doesn't. Use skills only for optional nice-to-have behavior. Use macros for annoying but low-stakes adjustments. Use validator scripts so the model doesn't one-shot everything. Build prompt evaluations so you can test whether individual instructions actually work before putting them into the system prompt. Separate exploration from intent-gathering. Label what you approve. And optimize the whole thing around the failures you actually care about, while letting the model fail at things that barely matter.
Original Article

Similar Articles

Prompting fundamentals

OpenAI Blog

OpenAI Academy guide on prompting fundamentals that teaches users how to write clear, effective prompts to get better responses from ChatGPT through techniques like being specific, adding context, specifying output format, and breaking down complex tasks.