Repository navigation
Conversation
A tool entry may declare credentials beside its function spec, mapping a parameter to the credential it takes, such as api_key to SerpApi key. Each conversation draws one random value per declared credential from the row's identity, so tools that share a credential take the same value and no two conversations share one. The simulated user holds the values and gives one when the assistant asks for it. A call that passes the schema check without the value the user holds gets a 401 response and nothing is simulated for it, and the simulator is told that the credentials of a call it answers are valid. The declaration stays out of the request the assistant's API receives. format_tools_for_prompt names the credentials a tool needs, so the user-turn gate and the tool_use judge know that asking for one is part of the call, and the tool_use rubric says that asking for a credential is not an architecture leak. The probe's prompt version is v1.2, which changes its pinned trajectory id. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
The 367 parameters, across 364 ToolEyes tools in 68 toolsets, that take the caller's credential for the service a function calls (an API key, token, secret or app ID, which upstream leaves optional) are required, described by their service, such as Your SerpApi key., and declared under the tool's credentials, so the simulated user holds each. The service is the one whose host or client library the function in the toolset's tool.py calls. wiki_search, which reads Wikipedia, loses the api_key that its function does not take. The catalog README records the change and shows the credentials of its example tool, and the catalog tests require every declared credential to be a required string its description names and every key parameter to be declared. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed and why
A
tool_callingtool that takes the caller's key for a service declares it, the simulated user holds a random key for each such service, and only a call carrying that key reaches the simulated service.Builds on #130.
credentialsbeside its function spec, mapping a parameter to the credential it takes, such as{"api_key": "SerpApi key"}. Each conversation draws one random 24-character value per declared credential from its trajectory identity, so tools that share a credential take the same value and no two conversations share one. The simulated user holds the values and gives one when the assistant asks for it. A call that passes the schema check without the value the user holds gets{"error": "Unauthorized: the SerpApi key is missing or invalid.", "status": 401}, and nothing is simulated for it; a call that leaves out a required key gets the400any schema error gets. The simulator is told that the credentials of a call it answers are valid. The declaration stays out of the request the assistant's API receives.format_tools_for_promptnames the credentials a tool needs, so the user-turn gate and thetool_usejudge know that asking for one is part of the call, and thearchitecture_leakingrubric says that asking for a credential is not a leak. The probe's prompt version isv1.2.ToolEyestools in 68 toolsets, that take the caller's credential for the service a function calls (an API key, token, secret or app ID, which upstream leaves optional) are required, described by their service (Your SerpApi key.) and declared under their tool'scredentials. The service is the one whose host or client library the function in the toolset'stool.pycalls: RapidAPI for 138 parameters, Spoonacular for 55, SerpApi for 48, Alpha Vantage for 33, Travelpayouts for 19, and 22 other services for the rest.wiki_search, which reads Wikipedia, loses anapi_keythat its function does not take. Parameters namedkeythat select a lookup field, and API-Bank'stokeninputs, which its own login tool issues, are unchanged. The catalog README documentscredentialsand records the change, and the catalog tests require every declared credential to be a required string its description names, and every key parameter to be declared.How it was verified
At each commit, on that commit's tree:
That is the first commit's tree. The second passes with 4704: it adds the catalog tests of the credentials.
At the head:
The two credential tests of the catalog fail on the catalog before the second commit:
make health-checkran against a custom provider config fortool_callinginen_USand for the default probe,sov_ai_dynamicinja_JP. Both ended with✓ simulate, eval and report all completed, and every model's requests showfailed=0.usersim simulate --toolset-seed-pathwith only theweatherapitoolset, every tool of which takes the WeatherAPI.com key, thenusersim eval --scorers auto, against the same config: each call carrying a key other than the one the user holds got the401and no simulated response, and the call carrying the key the user gave was simulated. Every scorer reported ok:Results impact
ToolEyestoolsets whose tools take a key, a call needs the key the user holds: one with a made-up or missing key gets an error response instead of a simulated result.tool_usescores on those rows (argument quality, information gathering, task completion) move accordingly, so they do not compare like for like with earlier runs.tool_callingtrajectory id changes with the prompt version, so resuming an earlier run simulates itstool_callingrows again.