-
Notifications
You must be signed in to change notification settings - Fork 13
feat: render inputs, latency, and token usage in agent test results @W-23524159@ #481
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
Open
niharpatel-salesforce
wants to merge
7
commits into
salesforcecli:main
Choose a base branch
from
niharpatel-salesforce:feat/w-23524159-prompt-results-rendering
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
70c33e3
docs: add design spec for W-23524159 results rendering
niharpatel-salesforce 16cf58f
docs: add implementation plan for W-23524159 results rendering
niharpatel-salesforce db84f73
feat: render test-case inputs in agent test results human format
niharpatel-salesforce 13a72a1
feat: render latency and token usage in agent test results human format
niharpatel-salesforce 7569fd6
Merge branch 'main' into feat/w-23524159-prompt-results-rendering
niharpatel-salesforce 908728e
chore: drop specs/ planning docs from PR
niharpatel-salesforce 9481dbf
fix: show raw input field name in Inputs line, not a capitalized label
niharpatel-salesforce 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| { | ||
| "status": "SUCCESS", | ||
| "testCases": [ | ||
| { | ||
| "testNumber": 1, | ||
| "subjectResponse": "{\"text\":\"Response with latency only.\",\"performance\":{\"latency\":{\"duration\":500}}}", | ||
| "testScorerResults": [ | ||
| { | ||
| "scorerName": "Coherence Evaluation", | ||
| "scorerResponse": "{\"status\":\"PASS\",\"score\":4.1,\"reasoning\":\"OK.\"}" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
15 changes: 15 additions & 0 deletions
15
test/mocks/agentforce-studio-results/legacy-user-input-fallback.json
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,15 @@ | ||
| { | ||
| "status": "SUCCESS", | ||
| "testCases": [ | ||
| { | ||
| "testNumber": 1, | ||
| "subjectResponse": "{\"userInput\":\"What is the account status?\",\"text\":\"The account is active.\"}", | ||
| "testScorerResults": [ | ||
| { | ||
| "scorerName": "Coherence Evaluation", | ||
| "scorerResponse": "{\"status\":\"PASS\",\"score\":4.5,\"reasoning\":\"Clear.\"}" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
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,22 @@ | ||
| { | ||
| "status": "SUCCESS", | ||
| "testCases": [ | ||
| { | ||
| "testNumber": 2, | ||
| "inputs": [ | ||
| { "name": "account", "value": "Acme" }, | ||
| { "name": "region", "value": "ANZ" }, | ||
| { "name": "tier", "value": "Gold" }, | ||
| { "name": "segment", "value": "Enterprise" }, | ||
| { "name": "priority", "value": "High" } | ||
| ], | ||
| "subjectResponse": "{\"text\":\"Multi-input response.\"}", | ||
| "testScorerResults": [ | ||
| { | ||
| "scorerName": "Coherence Evaluation", | ||
| "scorerResponse": "{\"status\":\"PASS\",\"score\":4.2,\"reasoning\":\"OK.\"}" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
15 changes: 15 additions & 0 deletions
15
test/mocks/agentforce-studio-results/no-inputs-no-user-input.json
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,15 @@ | ||
| { | ||
| "status": "SUCCESS", | ||
| "testCases": [ | ||
| { | ||
| "testNumber": 1, | ||
| "subjectResponse": "{\"text\":\"Some response with no metadata.\"}", | ||
| "testScorerResults": [ | ||
| { | ||
| "scorerName": "Coherence Evaluation", | ||
| "scorerResponse": "{\"status\":\"PASS\",\"score\":4.0,\"reasoning\":\"OK.\"}" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
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,15 @@ | ||
| { | ||
| "status": "SUCCESS", | ||
| "testCases": [ | ||
| { | ||
| "testNumber": 1, | ||
| "subjectResponse": "{\"text\":\"Response with tokens only.\",\"tokenUsage\":{\"completion\":20,\"prompt\":{\"total\":30},\"total\":50}}", | ||
| "testScorerResults": [ | ||
| { | ||
| "scorerName": "Coherence Evaluation", | ||
| "scorerResponse": "{\"status\":\"PASS\",\"score\":4.3,\"reasoning\":\"OK.\"}" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
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,19 @@ | ||
| { | ||
| "status": "SUCCESS", | ||
| "testCases": [ | ||
| { | ||
| "testNumber": 1, | ||
| "inputs": [ | ||
| { "name": "account", "value": "Acme" }, | ||
| { "name": "notes", "value": "what is kafka" } | ||
| ], | ||
| "subjectResponse": "{\"text\":\"Acme is a manufacturing prospect.\",\"performance\":{\"latency\":{\"duration\":842}},\"tokenUsage\":{\"completion\":89,\"prompt\":{\"total\":156},\"total\":245}}", | ||
| "testScorerResults": [ | ||
| { | ||
| "scorerName": "Conciseness Evaluation", | ||
| "scorerResponse": "{\"status\":\"PASS\",\"score\":4.7,\"reasoning\":\"Good.\"}" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
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.
This hunk is a pure Prettier auto-format fix - no logic change.
This repo's config sets
printWidth: 120;The original single-line json/junit/tap entries were 125–131 chars each (over the limit), while human was 115 chars (under it), which is why only those three got wrapped and human was left alone.
Confirmed the original file already failed prettier --check at this exact spot before this PR.