-
Notifications
You must be signed in to change notification settings - Fork 10
NO-JIRA: Add find-token skill and custom verification in eval framework #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
openshift-merge-bot
merged 1 commit into
openshift:main
from
harche:find-token-skill-and-eval-framework
May 28, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| You have access to the find-token skill. Use it to locate and run the find-token script, then return the token it generates. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # find-token skill eval test cases | ||
| # | ||
| # Each test case defines a query, a JSON schema for structured output, and | ||
| # an expected result. The eval framework sends the query to a live agent | ||
| # container and validates the response. | ||
| # | ||
| # Two verification modes: | ||
| # | ||
| # 1. Static matching (like kubernetes-docs, openshift-docs): | ||
| # Use `expected` with field: value pairs. The framework asserts each | ||
| # field in the response matches exactly. | ||
| # | ||
| # 2. Custom verification via _fn (like this skill): | ||
| # Use `expected: { _fn: <function_name> }`. The framework loads the | ||
| # function from verify.py in this directory and calls it with | ||
| # (result, eval_workspace, provider_name). Use this when verification | ||
| # needs runtime data (e.g., tokens generated by tool execution). | ||
| # | ||
| # To add a new skill eval: | ||
| # 1. Create evals/skills/<skill-name>/ | ||
| # 2. Add system_prompt.md — the system prompt for the agent | ||
| # 3. Add test_cases.yaml — one or more test cases (this file format) | ||
| # 4. Optionally add verify.py — custom verification functions for _fn | ||
| # | ||
| # Schema notes: | ||
| # - The schema is passed as outputSchema to the agent's /v1/agent/run endpoint | ||
| # - The agent's provider enforces structured output using its native mechanism | ||
| # - Use enums, booleans, and integers for verifiable fields — avoid free-form text | ||
|
|
||
| # Test 1: Dynamic token verification via custom function. | ||
| # The agent runs find-token.sh which generates a random DIAG_ token and writes | ||
| # it to .hidden_token. The verify function reads that file and asserts the | ||
| # agent's response contains the exact token — proving the tool was executed. | ||
| - name: find_token_tool_execution | ||
| query: "Find the hidden token using the 'find-token' skill." | ||
| schema: | ||
| type: object | ||
| properties: | ||
| token: | ||
| type: string | ||
| description: "The DIAG token returned by find-token.sh" | ||
| required: ["token"] | ||
| expected: | ||
| _fn: verify_tokens | ||
|
|
||
| # Test 2: Static field matching on the same skill. | ||
| # The generator name is deterministic (always "find-token.sh"), so we can | ||
| # verify it with a simple expected value — no custom function needed. | ||
| - name: find_token_static_fields | ||
| query: "Find the hidden token using the 'find-token' skill and tell me which script generated it." | ||
| schema: | ||
| type: object | ||
| properties: | ||
| token: | ||
| type: string | ||
| description: "The DIAG token returned by the script" | ||
| generator: | ||
| type: string | ||
| enum: ["find-token.sh", "find-token", "token-generator.sh"] | ||
| description: "The script that generated the token" | ||
| required: ["token", "generator"] | ||
| expected: | ||
| generator: "find-token.sh" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we no longer need the symlinks? If we do still need them, can we preserve this advice to create them when onboarding a new skill somewhere in this
evals/README.md?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, symlinks are still needed. Restored the instructions in f33d279 — each eval skill needs a symlink under
evals/workspace/skills/pointing to the actual skill directory.run.shdereferences them when building the container workspace.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Symlinks are still needed. The instructions are preserved in the current version under "Adding a New Skill Eval" — each eval skill needs a symlink under
evals/workspace/skills/pointing to the actual skill directory.