FetchXML Builder – AI Instructions

This folder contains the AI instruction files used by FetchXML Builder in XrmToolBox.

These files define how the AI assistant helps users build, modify, and explain FetchXML queries.
They are split into separate files to keep responsibilities clear and avoid prompt conflicts.


Instruction Set

These files are combined into the main instruction sent to the AI.


Runtime context

At runtime, FetchXML Builder injects dynamic context into the instructions, such as:

Placeholders (for example or) are populated by the tool and must not be modified.


Helper Prompt Files

These prompt files are used during sampling to help the AI resolve specific runtime subtasks.


Notes


Instruction architecture

The instruction files are treated as compiled templates, not dynamic prompts.

Before being sent to the AI model, FetchXML Builder:

  1. Loads each instruction file
  2. Replaces placeholders (for example ,, ``)
  3. Sends the fully resolved instructions to the model

As a result:

This design avoids conditional logic in prompts and produces more deterministic behavior.