@@ -35,6 +35,7 @@ export default ({ getService }: FtrProviderContext) => {
3535 const es = getService ( 'es' ) ;
3636 const ml = getService ( 'ml' ) as ReturnType < typeof MachineLearningProvider > ;
3737 const esArchiver = getService ( 'esArchiver' ) ;
38+ const isEvalLocalPrompts = process . env . IS_SECURITY_AI_PROMPT_TEST === 'true' ;
3839
3940 /**
4041 * Results will be written to LangSmith for project associated with the langSmithAPIKey, then later
@@ -63,6 +64,12 @@ export default ({ getService }: FtrProviderContext) => {
6364 await esArchiver . load (
6465 'x-pack/test/functional/es_archives/security_solution/attack_discovery_alerts'
6566 ) ;
67+ // if run is to test prompt changes, uninstall prompt integration to default to local prompts
68+ if ( isEvalLocalPrompts ) {
69+ // delete integration prompt saved objects
70+ const route = routeWithNamespace ( `/api/saved_objects/epm-packages/security_ai_prompts` ) ;
71+ await supertest . delete ( route ) . set ( 'kbn-xsrf' , 'foo' ) ;
72+ }
6673 } ) ;
6774
6875 after ( async ( ) => {
@@ -78,9 +85,12 @@ export default ({ getService }: FtrProviderContext) => {
7885
7986 describe ( 'Run Evaluations' , ( ) => {
8087 const buildNumber = process . env . BUILDKITE_BUILD_NUMBER || os . hostname ( ) ;
88+ const prNumber = process . env . BUILDKITE_PULL_REQUEST ;
8189 const config = getSecurityGenAIConfigFromEnvVar ( ) ;
8290 const defaultEvalPayload : PostEvaluateBody = {
83- runName : `Eval Automation${ buildNumber ? ' - ' + buildNumber : '' } ` ,
91+ runName : `Eval Automation${ buildNumber ? ' | Build ' + buildNumber : '' } ${
92+ prNumber ? ' | PR ' + prNumber : ''
93+ } ${ isEvalLocalPrompts ? ' | [Local Prompts]' : '' } `,
8494 graphs : [ 'DefaultAssistantGraph' ] ,
8595 datasetName : 'Sample Dataset' ,
8696 connectorIds : Object . keys ( config . connectors ) ,
0 commit comments