Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…189245) # Backport This will backport the following commits from `main` to `8.15`: - [[Bedrock chat] Fixes for BedrockChat model + tools (#189227)](#189227) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Steph Milovic","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-07-26T05:26:54Z","message":"[Bedrock chat] Fixes for BedrockChat model + tools (#189227)\n\n## Summary\r\n\r\nBedrockChat was not working as expected when triggering the tools. For\r\nexample, trying to invoke alerts tools caused this error:\r\n<img width=\"1059\" alt=\"Screenshot 2024-07-25 at 11 21 52 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/fe302d41-482c-4a65-abc1-8d669abf928d\">\r\n \r\n\r\nThis was not a helpful or proper error message to display. I fixed error\r\nhandling to bubble up the correct error:\r\n<img width=\"857\" alt=\"Screenshot 2024-07-25 at 11 26 08 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/a4135269-6bcb-436f-bd17-f817c06f3778\">\r\n\r\nThis error has something to do with the BedrockChat model not working\r\nproperly. @jacoblee93 is looking into a fix on the LC side.\r\n\r\nIn the meantime, I changed the prompt around and was able to coerce the\r\ncorrect responses out of Sonnet 3.5 and Opus for the ESQL and RAG alerts\r\nquestions James was testing with:\r\n\r\n<img width=\"1708\" alt=\"alerts-opus\"\r\nsrc=\"https://github.com/user-attachments/assets/47df0500-6e2f-477b-a3b9-da792f1d9b03\">\r\n<img width=\"1510\" alt=\"alerts-sonnet\"\r\nsrc=\"https://github.com/user-attachments/assets/0efd5519-196b-4309-9300-194196e5dde3\">\r\n<img width=\"1573\" alt=\"esql-opus\"\r\nsrc=\"https://github.com/user-attachments/assets/d7f519be-262c-4767-9d84-3fcb4fde089c\">\r\n<img width=\"1580\" alt=\"Screenshot 2024-07-25 at 3 40 05 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/9d408ab8-2fd5-4bbb-bb2e-bb54e0277717\">","sha":"dd9e94d18944d066c0e097fd4ae07af48de57c2f","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team: SecuritySolution","ci:cloud-deploy","Team:Security Generative AI","v8.15.0","v8.16.0"],"title":"[Bedrock chat] Fixes for BedrockChat model + tools","number":189227,"url":"https://github.com/elastic/kibana/pull/189227","mergeCommit":{"message":"[Bedrock chat] Fixes for BedrockChat model + tools (#189227)\n\n## Summary\r\n\r\nBedrockChat was not working as expected when triggering the tools. For\r\nexample, trying to invoke alerts tools caused this error:\r\n<img width=\"1059\" alt=\"Screenshot 2024-07-25 at 11 21 52 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/fe302d41-482c-4a65-abc1-8d669abf928d\">\r\n \r\n\r\nThis was not a helpful or proper error message to display. I fixed error\r\nhandling to bubble up the correct error:\r\n<img width=\"857\" alt=\"Screenshot 2024-07-25 at 11 26 08 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/a4135269-6bcb-436f-bd17-f817c06f3778\">\r\n\r\nThis error has something to do with the BedrockChat model not working\r\nproperly. @jacoblee93 is looking into a fix on the LC side.\r\n\r\nIn the meantime, I changed the prompt around and was able to coerce the\r\ncorrect responses out of Sonnet 3.5 and Opus for the ESQL and RAG alerts\r\nquestions James was testing with:\r\n\r\n<img width=\"1708\" alt=\"alerts-opus\"\r\nsrc=\"https://github.com/user-attachments/assets/47df0500-6e2f-477b-a3b9-da792f1d9b03\">\r\n<img width=\"1510\" alt=\"alerts-sonnet\"\r\nsrc=\"https://github.com/user-attachments/assets/0efd5519-196b-4309-9300-194196e5dde3\">\r\n<img width=\"1573\" alt=\"esql-opus\"\r\nsrc=\"https://github.com/user-attachments/assets/d7f519be-262c-4767-9d84-3fcb4fde089c\">\r\n<img width=\"1580\" alt=\"Screenshot 2024-07-25 at 3 40 05 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/9d408ab8-2fd5-4bbb-bb2e-bb54e0277717\">","sha":"dd9e94d18944d066c0e097fd4ae07af48de57c2f"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/189227","number":189227,"mergeCommit":{"message":"[Bedrock chat] Fixes for BedrockChat model + tools (#189227)\n\n## Summary\r\n\r\nBedrockChat was not working as expected when triggering the tools. For\r\nexample, trying to invoke alerts tools caused this error:\r\n<img width=\"1059\" alt=\"Screenshot 2024-07-25 at 11 21 52 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/fe302d41-482c-4a65-abc1-8d669abf928d\">\r\n \r\n\r\nThis was not a helpful or proper error message to display. I fixed error\r\nhandling to bubble up the correct error:\r\n<img width=\"857\" alt=\"Screenshot 2024-07-25 at 11 26 08 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/a4135269-6bcb-436f-bd17-f817c06f3778\">\r\n\r\nThis error has something to do with the BedrockChat model not working\r\nproperly. @jacoblee93 is looking into a fix on the LC side.\r\n\r\nIn the meantime, I changed the prompt around and was able to coerce the\r\ncorrect responses out of Sonnet 3.5 and Opus for the ESQL and RAG alerts\r\nquestions James was testing with:\r\n\r\n<img width=\"1708\" alt=\"alerts-opus\"\r\nsrc=\"https://github.com/user-attachments/assets/47df0500-6e2f-477b-a3b9-da792f1d9b03\">\r\n<img width=\"1510\" alt=\"alerts-sonnet\"\r\nsrc=\"https://github.com/user-attachments/assets/0efd5519-196b-4309-9300-194196e5dde3\">\r\n<img width=\"1573\" alt=\"esql-opus\"\r\nsrc=\"https://github.com/user-attachments/assets/d7f519be-262c-4767-9d84-3fcb4fde089c\">\r\n<img width=\"1580\" alt=\"Screenshot 2024-07-25 at 3 40 05 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/9d408ab8-2fd5-4bbb-bb2e-bb54e0277717\">","sha":"dd9e94d18944d066c0e097fd4ae07af48de57c2f"}}]}] BACKPORT--> Co-authored-by: Steph Milovic <[email protected]>
- Loading branch information