Starts a recommendation job that analyzes agent traces and generates optimization suggestions for system prompts or tool descriptions to improve agent performance¶
Description¶
Starts a recommendation job that analyzes agent traces and generates optimization suggestions for system prompts or tool descriptions to improve agent performance.
Usage¶
bedrockagentcore_start_recommendation(name, description, type,
recommendationConfig, kmsKeyArn, clientToken, tags)
Arguments¶
-
name[required] The name of the recommendation. Must be unique within your account.
-
descriptionThe description of the recommendation.
-
type[required] The type of recommendation to generate. Valid values are
SYSTEM_PROMPT_RECOMMENDATIONfor system prompt optimization orTOOL_DESCRIPTION_RECOMMENDATIONfor tool description optimization. -
recommendationConfig[required] The configuration for the recommendation, including the input to optimize, agent traces to analyze, and evaluation settings.
-
kmsKeyArnThe ARN of the KMS key used to encrypt recommendation data. If provided, customer data is encrypted at rest with the specified key.
-
clientTokenA unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, the service ignores the request, but does not return an error.
-
tagsA map of tag keys and values to associate with the recommendation.
Value¶
A list with the following syntax:
list(
recommendationId = "string",
recommendationArn = "string",
name = "string",
description = "string",
type = "SYSTEM_PROMPT_RECOMMENDATION"|"TOOL_DESCRIPTION_RECOMMENDATION",
recommendationConfig = list(
systemPromptRecommendationConfig = list(
systemPrompt = list(
text = "string",
configurationBundle = list(
bundleArn = "string",
versionId = "string",
systemPromptJsonPath = "string"
)
),
agentTraces = list(
sessionSpans = list(
list()
),
cloudwatchLogs = list(
logGroupArns = list(
"string"
),
serviceNames = list(
"string"
),
startTime = as.POSIXct(
"2015-01-01"
),
endTime = as.POSIXct(
"2015-01-01"
),
rule = list(
filters = list(
list(
key = "string",
operator = "Equals"|"NotEquals"|"GreaterThan"|"LessThan"|"GreaterThanOrEqual"|"LessThanOrEqual"|"Contains"|"NotContains",
value = list(
stringValue = "string",
doubleValue = 123.0,
booleanValue = TRUE|FALSE
)
)
)
)
),
batchEvaluation = list(
batchEvaluationArn = "string"
),
onlineEvaluation = list(
onlineEvaluationConfigArn = "string",
startTime = as.POSIXct(
"2015-01-01"
),
endTime = as.POSIXct(
"2015-01-01"
)
)
),
evaluationConfig = list(
evaluators = list(
list(
evaluatorArn = "string"
)
)
)
),
toolDescriptionRecommendationConfig = list(
toolDescription = list(
toolDescriptionText = list(
tools = list(
list(
toolName = "string",
toolDescription = list(
text = "string"
)
)
)
),
configurationBundle = list(
bundleArn = "string",
versionId = "string",
tools = list(
list(
toolName = "string",
toolDescriptionJsonPath = "string"
)
)
)
),
agentTraces = list(
sessionSpans = list(
list()
),
cloudwatchLogs = list(
logGroupArns = list(
"string"
),
serviceNames = list(
"string"
),
startTime = as.POSIXct(
"2015-01-01"
),
endTime = as.POSIXct(
"2015-01-01"
),
rule = list(
filters = list(
list(
key = "string",
operator = "Equals"|"NotEquals"|"GreaterThan"|"LessThan"|"GreaterThanOrEqual"|"LessThanOrEqual"|"Contains"|"NotContains",
value = list(
stringValue = "string",
doubleValue = 123.0,
booleanValue = TRUE|FALSE
)
)
)
)
),
batchEvaluation = list(
batchEvaluationArn = "string"
),
onlineEvaluation = list(
onlineEvaluationConfigArn = "string",
startTime = as.POSIXct(
"2015-01-01"
),
endTime = as.POSIXct(
"2015-01-01"
)
)
)
)
),
status = "PENDING"|"IN_PROGRESS"|"COMPLETED"|"FAILED"|"DELETING",
createdAt = as.POSIXct(
"2015-01-01"
),
updatedAt = as.POSIXct(
"2015-01-01"
)
)
Request syntax¶
svc$start_recommendation(
name = "string",
description = "string",
type = "SYSTEM_PROMPT_RECOMMENDATION"|"TOOL_DESCRIPTION_RECOMMENDATION",
recommendationConfig = list(
systemPromptRecommendationConfig = list(
systemPrompt = list(
text = "string",
configurationBundle = list(
bundleArn = "string",
versionId = "string",
systemPromptJsonPath = "string"
)
),
agentTraces = list(
sessionSpans = list(
list()
),
cloudwatchLogs = list(
logGroupArns = list(
"string"
),
serviceNames = list(
"string"
),
startTime = as.POSIXct(
"2015-01-01"
),
endTime = as.POSIXct(
"2015-01-01"
),
rule = list(
filters = list(
list(
key = "string",
operator = "Equals"|"NotEquals"|"GreaterThan"|"LessThan"|"GreaterThanOrEqual"|"LessThanOrEqual"|"Contains"|"NotContains",
value = list(
stringValue = "string",
doubleValue = 123.0,
booleanValue = TRUE|FALSE
)
)
)
)
),
batchEvaluation = list(
batchEvaluationArn = "string"
),
onlineEvaluation = list(
onlineEvaluationConfigArn = "string",
startTime = as.POSIXct(
"2015-01-01"
),
endTime = as.POSIXct(
"2015-01-01"
)
)
),
evaluationConfig = list(
evaluators = list(
list(
evaluatorArn = "string"
)
)
)
),
toolDescriptionRecommendationConfig = list(
toolDescription = list(
toolDescriptionText = list(
tools = list(
list(
toolName = "string",
toolDescription = list(
text = "string"
)
)
)
),
configurationBundle = list(
bundleArn = "string",
versionId = "string",
tools = list(
list(
toolName = "string",
toolDescriptionJsonPath = "string"
)
)
)
),
agentTraces = list(
sessionSpans = list(
list()
),
cloudwatchLogs = list(
logGroupArns = list(
"string"
),
serviceNames = list(
"string"
),
startTime = as.POSIXct(
"2015-01-01"
),
endTime = as.POSIXct(
"2015-01-01"
),
rule = list(
filters = list(
list(
key = "string",
operator = "Equals"|"NotEquals"|"GreaterThan"|"LessThan"|"GreaterThanOrEqual"|"LessThanOrEqual"|"Contains"|"NotContains",
value = list(
stringValue = "string",
doubleValue = 123.0,
booleanValue = TRUE|FALSE
)
)
)
)
),
batchEvaluation = list(
batchEvaluationArn = "string"
),
onlineEvaluation = list(
onlineEvaluationConfigArn = "string",
startTime = as.POSIXct(
"2015-01-01"
),
endTime = as.POSIXct(
"2015-01-01"
)
)
)
)
),
kmsKeyArn = "string",
clientToken = "string",
tags = list(
"string"
)
)