Skip to content

feat(uipath-agents): discover llm-as-judge models via CLI [AL-515]#2121

Open
apetraru-uipath wants to merge 1 commit into
mainfrom
feat/llm-as-judge-model-discovery
Open

feat(uipath-agents): discover llm-as-judge models via CLI [AL-515]#2121
apetraru-uipath wants to merge 1 commit into
mainfrom
feat/llm-as-judge-model-discovery

Conversation

@apetraru-uipath

Copy link
Copy Markdown
Contributor

What changed?

The coded guardrail skills (guardrails.md, guardrails-recommend.md) told the agent to "ask the user which model ID" for an llm_as_judge guardrail's model parameter. Now that the CLI ships uip agent guardrails llm-as-judge-models (PR UiPath/cli#3113), the skills point at it instead: run the command, pick a ModelId from the result, and fall back to asking only if it returns nothing or fails.

  • guardrails.md — the LLM-as-judge tenant-availability note now runs uip agent guardrails llm-as-judge-models --output json and recommends a non-preview model (Haiku/mini class as a sound judge default).
  • guardrails-recommend.md — the enum/model parameter-mapping row now discovers models via the command instead of asking blindly.

How has this been tested?

Doc-only change. The referenced command already exists and is tested in the CLI repo. The existing llm_as_judge test task (which passes an explicit model) still exercises the valid explicit-model path.

Are there any breaking changes?

None — guidance-only. The CLI-side deterministic reviewer rule that validates the chosen model is a separate PR in UiPath/cli.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Claude finished @apetraru-uipath's task in 1m 5s —— View job


PR Review: feat(uipath-agents): discover llm-as-judge models via CLI AL-515

  • Read review criteria and project conventions
  • Read full diff and changed files
  • Check relative links resolve
  • Check for cross-skill references, secrets, CODEOWNERS
  • Post review findings

Summary

This PR replaces the "ask the user for a model ID" guidance in two guardrail reference docs with a CLI-driven discovery step (uip agent guardrails llm-as-judge-models --output json), falling back to asking only when the command returns nothing or fails. Both changes are within the same skill (uipath-agents) and are internally consistent.

Change-by-Change Review

1. skills/uipath-agents/references/coded/capabilities/guardrails/guardrails.md — lines 50–56

Severity: OK

The blockquote for LLM-as-Judge tenant availability is replaced with a richer version that:

  • Runs uip agent guardrails llm-as-judge-models --output json (correctly uses --output json).
  • Recommends a non-preview, small/fast model (Haiku / mini class).
  • Falls back to asking the user only when the command returns nothing or fails.

Clean, prescriptive, follows CLI documentation conventions (fenced bash block, --output json).

2. skills/uipath-agents/references/coded/capabilities/guardrails/guardrails-recommend.md — line 195

Severity: OK

The enum row in the parameter-mapping table is updated to reference the same CLI command. The fallback ("ask the user for a model ID only if the command returns nothing or fails") is consistent with guardrails.md.

What's Missing

Nothing identified. The two files are the only places that referenced the old "ask the user" guidance for llm_as_judge model selection, and both are updated consistently. The existing test task (tests/tasks/uipath-agents/coded/guardrails/llm_as_judge/llm_as_judge.yaml) passes an explicit model in the prompt, so it exercises the valid explicit-model path and does not conflict with this change.

A future test task that exercises the discovery path (no model pre-supplied, agent must run the CLI command) would strengthen coverage, but is not required for this guidance-only change.

Area Ratings

Area Status Notes
Frontmatter OK Not touched
E2E Tests OK Existing llm_as_judge smoke task still valid; discovery-path test is a nice-to-have
Skill Body OK Not touched
References & Assets OK Both changed files consistent; all relative links resolve
Repo Hygiene OK No secrets, no cross-skill refs, changes scoped to one skill

Issues for Manual Review

  • CLI command existence: The review assumes uip agent guardrails llm-as-judge-models ships in the CLI (PR description references UiPath/cli#3113). Verify the command is available in @uipath/cli@latest before this merges, or coordinate release timing.

Conclusion

Clean, well-scoped documentation change. Both files are updated consistently and follow repo conventions (--output json, prescriptive language, graceful fallback). No issues found — approve.


@apetraru-uipath
apetraru-uipath force-pushed the feat/llm-as-judge-model-discovery branch 2 times, most recently from 383b5fa to 3ed5571 Compare July 19, 2026 20:37
and the message "Response violated the judge rule." The judge rule is: "The agent must
only provide factual account information and must never offer refunds or price
negotiation." For the model parameter, discover an available model by running
`uip agent guardrails llm-as-judge-models --output json` and use one of the returned

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test's prompt should not discole HOW the LLM as judge model should be discovered via the CLI. It should be inferred based on the skill's instructions.

apetraru-uipath added a commit that referenced this pull request Jul 20, 2026
…pts [AL-515]

The smoke-test prompts spelled out how to find the model (run
`uip agent guardrails llm-as-judge-models`). A prompt should read like a
normal user request and let the agent infer discovery from the skill's
instructions. Remove the "how" from both the low-code and coded prompts;
the command_executed check still verifies the skill drove discovery.

Addresses andreibalas-uipath's review comment on #2121.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The guardrail skills told the agent to "ask the user which model ID" for an
llm_as_judge guardrail. Now that `uip agent guardrails llm-as-judge-models`
lists the models available on the tenant, point the skills at it: run the
command, pick a ModelId from the result, and fall back to asking only if it
returns nothing or fails.

- Coded guardrail skills (guardrails.md, guardrails-recommend.md): discover the
  model via the command instead of asking.
- Low-code guardrail skills: add llm_as_judge parity — the enum/text/text-list
  parameter types, an llm_as_judge row in the validators reference, the model
  discovery note, and stop treating an empty enum Options list as invalid.
- Smoke tests: add a low-code llm_as_judge task (scaffold + assert the agent.json
  shape) and update the coded task to let the skill drive model discovery. The
  prompts read like a normal user request — they don't spell out the discovery
  command; a command_executed check verifies the skill drove discovery.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@apetraru-uipath
apetraru-uipath force-pushed the feat/llm-as-judge-model-discovery branch from c717fe5 to 31255b4 Compare July 20, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants