No history yet

Structured Prompt Engineering

Beyond Conversation

Using an AI for conversational queries is one thing. Turning it into a reliable operational tool is another. For capacity planning, you can't afford ambiguous, human-readable text. You need deterministic, machine-readable output that can plug directly into your resource coordination tools or spreadsheets without manual clean-up. This means moving beyond simple chat and into structured prompting.

The goal is to make the AI's output as predictable as a calculator. By providing clear, structured inputs and defining the exact format you need back, you can transform a general-purpose language model into a specialised processing engine for your planning data.

Structuring Prompts with XML

For complex tasks like capacity planning, you're often feeding the model multiple pieces of distinct information: current team availability, upcoming project demands, historical performance data, and the specific task you want it to perform. If you dump all this in as a single block of text, the model has to guess where one piece of information ends and another begins.

To eliminate this guesswork, we can use XML tags to create clear, separate contexts. Anthropic's Claude models are particularly well-tuned to understand prompts structured this way. By wrapping different parts of your input in tags, you tell the model exactly what each piece of information represents.

Claude excels with XML-style structured prompts, leveraging its fine-tuning on structured data.

Imagine you need to assess your team's capacity for a new project. Instead of a messy paragraph, you can structure your prompt like this:

```xml
<prompt>

<team_availability>
  <engineer id="E01" name="Alice">
    <role>Frontend</role>
    <capacity_hours>32</capacity_hours>
  </engineer>
  <engineer id="E02" name="Bob">
    <role>Backend</role>
    <capacity_hours>20</capacity_hours> <!-- On leave part-time -->
  </engineer>
  <engineer id="E03" name="Charlie">
    <role>DevOps</role>
    <capacity_hours>40</capacity_hours>
  </engineer>
</team_availability>

<project_requirements>
  <task id="T01" name="UI Mockup" skill="Frontend" estimate_hours="24" />
  <task id="T02" name="API Development" skill="Backend" estimate_hours="30" />
  <task id="T03" name="Deployment Pipeline" skill="DevOps" estimate_hours="16" />
</project_requirements>

<task>
Allocate the engineers to the tasks based on their role and available capacity. 
Flag any roles where the required hours exceed the available capacity.
</task>

</prompt>