Skip to content

AE-2513: show double-brace placeholders in trajectory prompt error - #1968

Draft
al3xanndru wants to merge 1 commit into
mainfrom
wabbit-dri/AE-2513_1
Draft

al3xanndru wants to merge 1 commit into
mainfrom
wabbit-dri/AE-2513_1

Conversation

@al3xanndru

@al3xanndru al3xanndru commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

AE-2513: when a legacy trajectory evaluator's prompt lacks a required
placeholder, loading the evaluator fails with:

Prompt must contain {ExpectedAgentBehavior} and {{AgentRunHistory}} placeholders

The check (LegacyTrajectoryEvaluator.validate_prompt_placeholder) looks for {{ExpectedAgentBehavior}} with
double braces. A user who follows the message literally and writes {ExpectedAgentBehavior} still fails validation.
The DRI triage of SRE-679533 flagged this. In that incident, uip agent eval evaluator add had written a prompt with
{{ExpectedBehavior}}; the root-cause fix is in UiPath/cli.

Change

  • The error message now reads Prompt must contain {{ExpectedAgentBehavior}} and {{AgentRunHistory}} placeholders.
    The validation logic is unchanged.
  • uipath version bumped from 2.14.44 to 2.14.45 (pyproject.toml and uv.lock), per repo convention. 2.14.45 is
    not on PyPI yet.

Tests

  • New test_legacy_trajectory_prompt_error_names_double_brace_placeholders in
    tests/evaluators/test_legacy_trajectory_evaluator.py. It is parametrized over a prompt that uses {{ExpectedBehavior}}
    (the CLI's old default) and a prompt missing {{AgentRunHistory}}, and asserts that the ValidationError names both
    placeholders with double braces. Both cases fail on the old message and pass with the fix.
  • pytest tests/evaluators/: 554 passed.
  • ruff check, ruff format --check and mypy on the changed files: clean.

Risks / open questions

  • Only the message text changes. A caller that matches the old message text exactly would break; none was found in
    this repo.
  • The PR title uses the DRI-loop form (AE-2513: …). If commitlint requires conventional commits, retitle it to
    fix(eval): … [AE-2513].

Drafted by the wabbit-dri draft-fixes loop for AE-2513 (draft #1), for a human to review: not ready to merge as is.

🤖 Generated with Claude Code

…jectory prompt error

The validator requires {{ExpectedAgentBehavior}} but its message asked for
{ExpectedAgentBehavior}, which misled users fixing their prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-runtime test:uipath-integrations labels Oct 30, 2026
@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant