Skip to content
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

[Security Assistant] Add support for manually entering eval datasets #194072

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

spong
Copy link
Member

@spong spong commented Sep 25, 2024

Summary

On cloud environments we don't send the LangSmith credentials through the GET /evaluate route which returns available datasets for selection, so the datasets are never populated. Since the Dataset field didn't allow custom options, this means you couldn't perform evals in cloud environments.

This PR updates the Dataset field to take custom options so that you can manually enter the dataset name in cloud environments:

To test, enable the below feature flag to show the evaluation tab under settings:

xpack.securitySolution.enableExperimental:
  - "assistantModelEvaluation"

@spong spong added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Feature:Security Assistant Security Assistant Team:Security Generative AI Security Generative AI Feature:Assistant Evaluation Assistant Evaluation v8.16.0 backport:version Backport to applied version labels labels Sep 25, 2024
@spong spong self-assigned this Sep 25, 2024
@spong spong requested a review from a team as a code owner September 25, 2024 21:30
@spong spong enabled auto-merge (squash) September 26, 2024 16:36
@spong spong merged commit 1c0ec85 into elastic:main Sep 26, 2024
48 of 49 checks passed
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 20.5MB 20.5MB +139.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @spong

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 26, 2024
…lastic#194072)

## Summary

On cloud environments we don't send the LangSmith credentials through
the `GET /evaluate` route which returns available datasets for
selection, so the datasets are never populated. Since the Dataset field
didn't allow custom options, this means you couldn't perform evals in
cloud environments.

This PR updates the Dataset field to take custom options so that you can
manually enter the dataset name in cloud environments:

<p align="center">
<img width="500"
src="https://github.com/user-attachments/assets/4828e085-180c-42bb-9656-34bda57b74b5"
/>
</p>

To test, enable the below feature flag to show the evaluation tab under
settings:

```
xpack.securitySolution.enableExperimental:
  - "assistantModelEvaluation"
```

(cherry picked from commit 1c0ec85)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@spong spong deleted the fix-dataset-validation branch September 26, 2024 18:40
kibanamachine added a commit that referenced this pull request Sep 26, 2024
…asets (#194072) (#194207)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Assistant] Add support for manually entering eval datasets
(#194072)](#194072)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Garrett
Spong","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-26T18:17:50Z","message":"[Security
Assistant] Add support for manually entering eval datasets
(#194072)\n\n## Summary\r\n\r\nOn cloud environments we don't send the
LangSmith credentials through\r\nthe `GET /evaluate` route which returns
available datasets for\r\nselection, so the datasets are never
populated. Since the Dataset field\r\ndidn't allow custom options, this
means you couldn't perform evals in\r\ncloud environments.\r\n\r\nThis
PR updates the Dataset field to take custom options so that you
can\r\nmanually enter the dataset name in cloud environments:\r\n\r\n<p
align=\"center\">\r\n<img
width=\"500\"\r\nsrc=\"https://github.com/user-attachments/assets/4828e085-180c-42bb-9656-34bda57b74b5\"\r\n/>\r\n</p>
\r\n\r\n\r\nTo test, enable the below feature flag to show the
evaluation tab
under\r\nsettings:\r\n\r\n```\r\nxpack.securitySolution.enableExperimental:\r\n
-
\"assistantModelEvaluation\"\r\n```","sha":"1c0ec85b740789ba99c30f09a5b56bc66a9de897","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Feature:Security
Assistant","Team:Security Generative AI","Feature:Assistant
Evaluation","v8.16.0","backport:version"],"title":"[Security Assistant]
Add support for manually entering eval
datasets","number":194072,"url":"https://github.com/elastic/kibana/pull/194072","mergeCommit":{"message":"[Security
Assistant] Add support for manually entering eval datasets
(#194072)\n\n## Summary\r\n\r\nOn cloud environments we don't send the
LangSmith credentials through\r\nthe `GET /evaluate` route which returns
available datasets for\r\nselection, so the datasets are never
populated. Since the Dataset field\r\ndidn't allow custom options, this
means you couldn't perform evals in\r\ncloud environments.\r\n\r\nThis
PR updates the Dataset field to take custom options so that you
can\r\nmanually enter the dataset name in cloud environments:\r\n\r\n<p
align=\"center\">\r\n<img
width=\"500\"\r\nsrc=\"https://github.com/user-attachments/assets/4828e085-180c-42bb-9656-34bda57b74b5\"\r\n/>\r\n</p>
\r\n\r\n\r\nTo test, enable the below feature flag to show the
evaluation tab
under\r\nsettings:\r\n\r\n```\r\nxpack.securitySolution.enableExperimental:\r\n
-
\"assistantModelEvaluation\"\r\n```","sha":"1c0ec85b740789ba99c30f09a5b56bc66a9de897"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194072","number":194072,"mergeCommit":{"message":"[Security
Assistant] Add support for manually entering eval datasets
(#194072)\n\n## Summary\r\n\r\nOn cloud environments we don't send the
LangSmith credentials through\r\nthe `GET /evaluate` route which returns
available datasets for\r\nselection, so the datasets are never
populated. Since the Dataset field\r\ndidn't allow custom options, this
means you couldn't perform evals in\r\ncloud environments.\r\n\r\nThis
PR updates the Dataset field to take custom options so that you
can\r\nmanually enter the dataset name in cloud environments:\r\n\r\n<p
align=\"center\">\r\n<img
width=\"500\"\r\nsrc=\"https://github.com/user-attachments/assets/4828e085-180c-42bb-9656-34bda57b74b5\"\r\n/>\r\n</p>
\r\n\r\n\r\nTo test, enable the below feature flag to show the
evaluation tab
under\r\nsettings:\r\n\r\n```\r\nxpack.securitySolution.enableExperimental:\r\n
-
\"assistantModelEvaluation\"\r\n```","sha":"1c0ec85b740789ba99c30f09a5b56bc66a9de897"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Garrett Spong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:Assistant Evaluation Assistant Evaluation Feature:Security Assistant Security Assistant release_note:skip Skip the PR/issue when compiling release notes Team:Security Generative AI Security Generative AI v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants