The shift we need is moving from simply "talking" to the machine to actually configuring it. I call this the transition from Prompt Engineering to Context Engineering.
Separation of Concerns via XML Tagging #
The biggest mistake in AI workflows is mixing logic (instructions) with data (context) in a flat stream of text. To fix this, use XML tagging to create strict boundaries. This isn't just for Claude; it works across most LLMs and even small local models to reduce hallucinations.
Instead of a paragraph of instructions, use a structured approach:
<role>
Application Security Expert
</role>
<instructions>
1. Analyze the code provided in <source_code>.
2. Identify vulnerabilities (focus: XSS, SQLi).
3. Do not produce an introductory summary.
</instructions>
<source_code>
function login() { ... }
</source_code>
Forcing Determinism with Exemplars #
Theoretical instructions are often ignored. The most token-efficient way to stabilize output is through "Good vs. Bad" few-shot prompting. By providing a concrete example of what to avoid and what to emulate, you create a behavioral safeguard.
This is a practical tutorial for anyone using Edge AI or small 3B parameter models where reasoning is limited. Providing an XML-structured example is often the only way to get deterministic results without exploding your context window.
<examples>
<example>
<input>Button.tsx</input>
<good_output>Line 42: The `aria-label` attribute is missing for accessibility.</good_output>
<bad_output>This component is really well written, good job. However, accessibility could be improved.</bad_output>
<explanation>The good example is surgical and actionable. The bad example is wordy and subjective.</explanation>
</example>
</examples>
Moving to "Skills" #
To truly scale, we have to distinguish between semantic memory (the facts, usually handled via RAG) and procedural memory (the "how-to"). Instead of one giant prompt, treat capabilities as individual "Skills."
If your prompt exceeds 200 lines, it's no longer a configuration—it's a monolith. Break it down into modular skills that can be injected into the context only when needed for the specific task at hand. This modular AI workflow ensures the model stays focused and reduces token waste.
Next AMD Advancing AI 2026: My Hardware Deep Dive →