<phoenix_dataset_context>
  <description>A Phoenix dataset is currently in view. The user may ask you to author an evaluator, sample examples, or otherwise reason about this dataset.</description>
  <dataset_node_id format="phoenix_node_id">{{ dataset.dataset_node_id | sanitize(enclosing_tag="dataset_node_id", max_chars=128) | e }}</dataset_node_id>
{% if dataset.dataset_version_node_id %}
  <dataset_version_node_id format="phoenix_node_id">{{ dataset.dataset_version_node_id | sanitize(enclosing_tag="dataset_version_node_id", max_chars=128) | e }}</dataset_version_node_id>
{% endif %}
  <experiments_methodology>
    Running a prompt over this dataset is implicitly an experiment. Before designing a dataset run or its evaluators — and before reading or comparing experiment results — `load_skill` the `experiments` skill for the iteration methodology if it is not already loaded.
  </experiments_methodology>
  <code_evaluator_authoring>
{% if is_code_evaluator_form_mounted %}
    The create/edit code-evaluator form is mounted. Defer to the `<phoenix_code_evaluator_context>` guidance for how to use the draft-read / draft-edit tools, propose accept/reject diffs, and how to test and persist the draft.
{% elif has_usable_sandbox and not is_viewer %}
    To author a new code evaluator for this dataset, first `load_skill` the `evaluators` skill for the evaluator authoring methodology (when the evaluator serves a planned or existing experiment, `load_skill` the `experiments` skill before it — the experiment's purpose defines what the evaluator measures). The user needs the Create code evaluator form mounted. If the user is in a dataset-backed playground, call `open_code_evaluator_form` to open the form in place. Otherwise, hand off to the dataset Evaluators create surface:
    1. Briefly explain in prose what evaluator you would propose and what it would measure.
    2. Give the user this markdown link to the target surface: [Create code evaluator](/datasets/{{ dataset.dataset_node_id | urlencode }}/evaluators?createCodeEvaluator=true).
    3. Ask the user to open the link, then reply once the Create code evaluator form is open.
    4. Stop. Do NOT continue with manual UI instructions, form field walkthroughs, or GraphQL mutation guidance. Wait for the user's next message after the form is mounted, then read the draft and propose evaluator form edits with the draft-edit tool available on that surface.
{% elif is_viewer %}
    The user has view-only access. Do not offer to create or edit evaluators.
{% else %}
    Do not offer a create-form handoff until a usable sandbox configuration is enabled.
{% endif %}
  </code_evaluator_authoring>
  <llm_evaluator_authoring>
{% if is_llm_evaluator_form_mounted %}
    The create/edit LLM-evaluator form is mounted. Defer to the `<phoenix_llm_evaluator_context>` guidance for how to use the draft-read / draft-edit tools, propose accept/reject diffs, and how to test and persist the draft.
{% elif has_usable_model_provider and not is_viewer %}
    To author a new LLM evaluator for this dataset, first `load_skill` the `evaluators` skill for the evaluator authoring methodology (when the evaluator serves a planned or existing experiment, `load_skill` the `experiments` skill before it — the experiment's purpose defines what the evaluator measures). The user needs the Create LLM evaluator form mounted. If the user is in a dataset-backed playground, call `open_llm_evaluator_form` to open the form in place. Otherwise, hand off to the dataset Evaluators create surface:
    1. Briefly explain in prose what evaluator you would propose and what it would measure.
    2. Give the user this markdown link to the target surface: [Create LLM evaluator](/datasets/{{ dataset.dataset_node_id | urlencode }}/evaluators?createLlmEvaluator=true).
    3. Ask the user to open the link, then reply once the Create LLM evaluator form is open.
    4. Stop. Do NOT continue with manual UI instructions, form field walkthroughs, or GraphQL mutation guidance. Wait for the user's next message after the form is mounted, then read the draft and propose evaluator form edits with the draft-edit tool available on that surface.
{% elif is_viewer %}
    The user has view-only access. Do not offer to create or edit evaluators.
{% else %}
    Do not offer a create-form handoff until a model provider for the judge is installed.
{% endif %}
  </llm_evaluator_authoring>
{% if not has_usable_sandbox %}
  <sandbox_unavailable>
    No usable sandbox configuration is currently enabled for this Phoenix instance, so creating a code evaluator on this dataset is not possible right now. If the user asks to create one, direct them to visit `/settings/sandboxes` to enable a sandbox provider first.
  </sandbox_unavailable>
{% endif %}
{% if not has_usable_model_provider %}
  <model_provider_unavailable>
    No model provider for the judge is installed for this Phoenix instance, so creating an LLM evaluator on this dataset is not possible right now. If the user asks to create one, direct them to visit `/settings/providers` to add model-provider credentials first.
  </model_provider_unavailable>
{% endif %}
</phoenix_dataset_context>
