@aws-sdk/client-bedrock 3.1173.0 → 3.1174.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +175 -0
  2. package/dist-cjs/index.js +790 -44
  3. package/dist-es/Bedrock.js +54 -0
  4. package/dist-es/commands/ArchiveProjectCommand.js +4 -0
  5. package/dist-es/commands/CreateProjectCommand.js +4 -0
  6. package/dist-es/commands/DeleteAccountDataRetentionStorageCommand.js +4 -0
  7. package/dist-es/commands/DeleteOrganizationDataRetentionStorageCommand.js +4 -0
  8. package/dist-es/commands/DeleteProjectDataRetentionStorageCommand.js +4 -0
  9. package/dist-es/commands/GetAccountDataRetentionStorageCommand.js +4 -0
  10. package/dist-es/commands/GetOrganizationDataRetentionStorageCommand.js +4 -0
  11. package/dist-es/commands/GetProjectCommand.js +4 -0
  12. package/dist-es/commands/GetProjectDataRetentionStorageCommand.js +4 -0
  13. package/dist-es/commands/GetTrustedAccessProgramAccountEnrollmentCommand.js +4 -0
  14. package/dist-es/commands/GetTrustedAccessProgramCommand.js +4 -0
  15. package/dist-es/commands/GetTrustedAccessProgramOrganizationEnrollmentCommand.js +4 -0
  16. package/dist-es/commands/GetTrustedAccessProgramProjectEnrollmentCommand.js +4 -0
  17. package/dist-es/commands/ListProjectsCommand.js +4 -0
  18. package/dist-es/commands/ListTrustedAccessProgramsCommand.js +4 -0
  19. package/dist-es/commands/PutAccountDataRetentionStorageCommand.js +4 -0
  20. package/dist-es/commands/PutOrganizationDataRetentionStorageCommand.js +4 -0
  21. package/dist-es/commands/PutProjectDataRetentionStorageCommand.js +4 -0
  22. package/dist-es/commands/PutTrustedAccessProgramAccountEnrollmentCommand.js +4 -0
  23. package/dist-es/commands/PutTrustedAccessProgramOrganizationEnrollmentCommand.js +4 -0
  24. package/dist-es/commands/PutTrustedAccessProgramProjectEnrollmentCommand.js +4 -0
  25. package/dist-es/commands/StartTrustedAccessProgramAccountApplicationCommand.js +4 -0
  26. package/dist-es/commands/StartTrustedAccessProgramOrganizationApplicationCommand.js +4 -0
  27. package/dist-es/commands/StartTrustedAccessProgramProjectApplicationCommand.js +4 -0
  28. package/dist-es/commands/UpdateProjectCommand.js +4 -0
  29. package/dist-es/commands/index.js +25 -0
  30. package/dist-es/models/enums.js +40 -0
  31. package/dist-es/pagination/ListProjectsPaginator.js +4 -0
  32. package/dist-es/pagination/ListTrustedAccessProgramsPaginator.js +4 -0
  33. package/dist-es/pagination/index.js +2 -0
  34. package/dist-es/schemas/schemas_0.js +526 -43
  35. package/dist-types/Bedrock.d.ts +191 -0
  36. package/dist-types/BedrockClient.d.ts +27 -2
  37. package/dist-types/commands/ArchiveProjectCommand.d.ts +97 -0
  38. package/dist-types/commands/CreateEvaluationJobCommand.d.ts +1 -2
  39. package/dist-types/commands/CreateProjectCommand.d.ts +109 -0
  40. package/dist-types/commands/DeleteAccountDataRetentionStorageCommand.d.ts +81 -0
  41. package/dist-types/commands/DeleteOrganizationDataRetentionStorageCommand.d.ts +81 -0
  42. package/dist-types/commands/DeleteProjectDataRetentionStorageCommand.d.ts +85 -0
  43. package/dist-types/commands/GetAccountDataRetentionStorageCommand.d.ts +96 -0
  44. package/dist-types/commands/GetEvaluationJobCommand.d.ts +1 -2
  45. package/dist-types/commands/GetFoundationModelCommand.d.ts +1 -0
  46. package/dist-types/commands/GetInferenceProfileCommand.d.ts +1 -0
  47. package/dist-types/commands/GetOrganizationDataRetentionStorageCommand.d.ts +96 -0
  48. package/dist-types/commands/GetProjectCommand.d.ts +94 -0
  49. package/dist-types/commands/GetProjectDataRetentionStorageCommand.d.ts +98 -0
  50. package/dist-types/commands/GetTrustedAccessProgramAccountEnrollmentCommand.d.ts +87 -0
  51. package/dist-types/commands/GetTrustedAccessProgramCommand.d.ts +102 -0
  52. package/dist-types/commands/GetTrustedAccessProgramOrganizationEnrollmentCommand.d.ts +87 -0
  53. package/dist-types/commands/GetTrustedAccessProgramProjectEnrollmentCommand.d.ts +88 -0
  54. package/dist-types/commands/ListEvaluationJobsCommand.d.ts +1 -1
  55. package/dist-types/commands/ListFoundationModelsCommand.d.ts +1 -0
  56. package/dist-types/commands/ListInferenceProfilesCommand.d.ts +1 -0
  57. package/dist-types/commands/ListProjectsCommand.d.ts +98 -0
  58. package/dist-types/commands/ListTrustedAccessProgramsCommand.d.ts +108 -0
  59. package/dist-types/commands/PutAccountDataRetentionStorageCommand.d.ts +102 -0
  60. package/dist-types/commands/PutOrganizationDataRetentionStorageCommand.d.ts +102 -0
  61. package/dist-types/commands/PutProjectDataRetentionStorageCommand.d.ts +107 -0
  62. package/dist-types/commands/PutTrustedAccessProgramAccountEnrollmentCommand.d.ts +91 -0
  63. package/dist-types/commands/PutTrustedAccessProgramOrganizationEnrollmentCommand.d.ts +91 -0
  64. package/dist-types/commands/PutTrustedAccessProgramProjectEnrollmentCommand.d.ts +92 -0
  65. package/dist-types/commands/StartTrustedAccessProgramAccountApplicationCommand.d.ts +92 -0
  66. package/dist-types/commands/StartTrustedAccessProgramOrganizationApplicationCommand.d.ts +92 -0
  67. package/dist-types/commands/StartTrustedAccessProgramProjectApplicationCommand.d.ts +93 -0
  68. package/dist-types/commands/StopEvaluationJobCommand.d.ts +1 -1
  69. package/dist-types/commands/UpdateProjectCommand.d.ts +101 -0
  70. package/dist-types/commands/index.d.ts +25 -0
  71. package/dist-types/models/enums.d.ts +176 -0
  72. package/dist-types/models/models_0.d.ts +768 -716
  73. package/dist-types/models/models_1.d.ts +3216 -1969
  74. package/dist-types/pagination/ListProjectsPaginator.d.ts +7 -0
  75. package/dist-types/pagination/ListTrustedAccessProgramsPaginator.d.ts +7 -0
  76. package/dist-types/pagination/index.d.ts +2 -0
  77. package/dist-types/schemas/schemas_0.d.ts +82 -0
  78. package/dist-types/ts3.4/Bedrock.d.ts +438 -0
  79. package/dist-types/ts3.4/BedrockClient.d.ts +147 -0
  80. package/dist-types/ts3.4/commands/ArchiveProjectCommand.d.ts +38 -0
  81. package/dist-types/ts3.4/commands/CreateEvaluationJobCommand.d.ts +1 -2
  82. package/dist-types/ts3.4/commands/CreateProjectCommand.d.ts +38 -0
  83. package/dist-types/ts3.4/commands/DeleteAccountDataRetentionStorageCommand.d.ts +42 -0
  84. package/dist-types/ts3.4/commands/DeleteOrganizationDataRetentionStorageCommand.d.ts +42 -0
  85. package/dist-types/ts3.4/commands/DeleteProjectDataRetentionStorageCommand.d.ts +42 -0
  86. package/dist-types/ts3.4/commands/GetAccountDataRetentionStorageCommand.d.ts +42 -0
  87. package/dist-types/ts3.4/commands/GetEvaluationJobCommand.d.ts +1 -2
  88. package/dist-types/ts3.4/commands/GetOrganizationDataRetentionStorageCommand.d.ts +42 -0
  89. package/dist-types/ts3.4/commands/GetProjectCommand.d.ts +38 -0
  90. package/dist-types/ts3.4/commands/GetProjectDataRetentionStorageCommand.d.ts +42 -0
  91. package/dist-types/ts3.4/commands/GetTrustedAccessProgramAccountEnrollmentCommand.d.ts +42 -0
  92. package/dist-types/ts3.4/commands/GetTrustedAccessProgramCommand.d.ts +42 -0
  93. package/dist-types/ts3.4/commands/GetTrustedAccessProgramOrganizationEnrollmentCommand.d.ts +42 -0
  94. package/dist-types/ts3.4/commands/GetTrustedAccessProgramProjectEnrollmentCommand.d.ts +42 -0
  95. package/dist-types/ts3.4/commands/ListEvaluationJobsCommand.d.ts +1 -1
  96. package/dist-types/ts3.4/commands/ListProjectsCommand.d.ts +38 -0
  97. package/dist-types/ts3.4/commands/ListTrustedAccessProgramsCommand.d.ts +42 -0
  98. package/dist-types/ts3.4/commands/PutAccountDataRetentionStorageCommand.d.ts +42 -0
  99. package/dist-types/ts3.4/commands/PutOrganizationDataRetentionStorageCommand.d.ts +42 -0
  100. package/dist-types/ts3.4/commands/PutProjectDataRetentionStorageCommand.d.ts +42 -0
  101. package/dist-types/ts3.4/commands/PutTrustedAccessProgramAccountEnrollmentCommand.d.ts +42 -0
  102. package/dist-types/ts3.4/commands/PutTrustedAccessProgramOrganizationEnrollmentCommand.d.ts +42 -0
  103. package/dist-types/ts3.4/commands/PutTrustedAccessProgramProjectEnrollmentCommand.d.ts +42 -0
  104. package/dist-types/ts3.4/commands/StartTrustedAccessProgramAccountApplicationCommand.d.ts +42 -0
  105. package/dist-types/ts3.4/commands/StartTrustedAccessProgramOrganizationApplicationCommand.d.ts +42 -0
  106. package/dist-types/ts3.4/commands/StartTrustedAccessProgramProjectApplicationCommand.d.ts +42 -0
  107. package/dist-types/ts3.4/commands/StopEvaluationJobCommand.d.ts +1 -1
  108. package/dist-types/ts3.4/commands/UpdateProjectCommand.d.ts +38 -0
  109. package/dist-types/ts3.4/commands/index.d.ts +25 -0
  110. package/dist-types/ts3.4/models/enums.d.ts +55 -0
  111. package/dist-types/ts3.4/models/models_0.d.ts +104 -102
  112. package/dist-types/ts3.4/models/models_1.d.ts +310 -5
  113. package/dist-types/ts3.4/pagination/ListProjectsPaginator.d.ts +11 -0
  114. package/dist-types/ts3.4/pagination/ListTrustedAccessProgramsPaginator.d.ts +11 -0
  115. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  116. package/dist-types/ts3.4/schemas/schemas_0.d.ts +82 -0
  117. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  import type { DocumentType as __DocumentType } from "@smithy/types";
2
- import type { AdvancedPromptOptimizationJobStatus, AgreementStatus, ApplicationType, AttributeType, AutomatedReasoningCheckLogicWarningType, AutomatedReasoningCheckResult, AutomatedReasoningPolicyAnnotationStatus, AutomatedReasoningPolicyBuildDocumentContentType, AutomatedReasoningPolicyBuildMessageType, AutomatedReasoningPolicyBuildResultAssetType, AutomatedReasoningPolicyBuildWorkflowStatus, AutomatedReasoningPolicyBuildWorkflowType, AutomatedReasoningPolicyTestRunResult, AutomatedReasoningPolicyTestRunStatus, ConfigurationOwner, CustomizationType, CustomModelDeploymentStatus, CustomModelDeploymentUpdateStatus, DataRetentionMode, EvaluationJobStatus, EvaluationJobType, EvaluationTaskType, ExternalSourceType, GuardrailContentFilterAction, GuardrailContentFiltersTierName, GuardrailContentFilterType, GuardrailContextualGroundingAction, GuardrailContextualGroundingFilterType, GuardrailContextualGroundingTierName, GuardrailFilterStrength, GuardrailModality, InputTags, ModelStatus, PerformanceConfigLatency, QueryTransformationType, ReasoningEffort, RerankingMetadataSelectionMode, SelectiveGuardingMode, SortJobsBy, SortModelsBy, SortOrder, Status, VectorSearchRerankingConfigurationType } from "./enums";
2
+ import type { AdvancedPromptOptimizationJobStatus, AgreementStatus, AttributeType, AutomatedReasoningCheckLogicWarningType, AutomatedReasoningCheckResult, AutomatedReasoningPolicyAnnotationStatus, AutomatedReasoningPolicyBuildDocumentContentType, AutomatedReasoningPolicyBuildMessageType, AutomatedReasoningPolicyBuildResultAssetType, AutomatedReasoningPolicyBuildWorkflowStatus, AutomatedReasoningPolicyBuildWorkflowType, AutomatedReasoningPolicyTestRunResult, AutomatedReasoningPolicyTestRunStatus, ConfigurationOwner, CustomizationType, CustomModelDeploymentStatus, CustomModelDeploymentUpdateStatus, DataRetentionMode, DataRetentionStorageDestination, DataRetentionStorageModelProvider, DataRetentionStorageResourceStatus, DataRetentionStorageScope, EvaluationJobStatus, EvaluationTaskType, ExternalSourceType, InputTags, ModelStatus, PerformanceConfigLatency, QueryTransformationType, ReasoningEffort, RerankingMetadataSelectionMode, SelectiveGuardingMode, SortJobsBy, SortModelsBy, SortOrder, Status, VectorSearchRerankingConfigurationType } from "./enums";
3
3
  /**
4
4
  * <p>Model-specific information for the enforced guardrail configuration.</p>
5
5
  * @public
@@ -5461,930 +5461,837 @@ export interface PutAccountDataRetentionResponse {
5461
5461
  updatedAt?: Date | undefined;
5462
5462
  }
5463
5463
  /**
5464
+ * <p>Identifies the model provider whose account retention storage configuration to delete.</p>
5464
5465
  * @public
5465
5466
  */
5466
- export interface DeleteEnforcedGuardrailConfigurationRequest {
5467
+ export interface DeleteAccountDataRetentionStorageRequest {
5467
5468
  /**
5468
- * <p>Unique ID for the account enforced configuration.</p>
5469
+ * <p>The model provider whose retention storage configuration is addressed by this request.</p>
5469
5470
  * @public
5470
5471
  */
5471
- configId: string | undefined;
5472
+ modelProvider: DataRetentionStorageModelProvider | undefined;
5472
5473
  }
5473
5474
  /**
5475
+ * <p>A successful deletion returns no response fields.</p>
5474
5476
  * @public
5475
5477
  */
5476
- export interface DeleteEnforcedGuardrailConfigurationResponse {
5478
+ export interface DeleteAccountDataRetentionStorageResponse {
5477
5479
  }
5478
5480
  /**
5481
+ * <p>Identifies the model provider whose organization retention storage configuration to delete.</p>
5479
5482
  * @public
5480
5483
  */
5481
- export interface ListEnforcedGuardrailsConfigurationRequest {
5484
+ export interface DeleteOrganizationDataRetentionStorageRequest {
5482
5485
  /**
5483
- * <p>Opaque continuation token of previous paginated response.</p>
5486
+ * <p>The model provider whose retention storage configuration is addressed by this request.</p>
5484
5487
  * @public
5485
5488
  */
5486
- nextToken?: string | undefined;
5489
+ modelProvider: DataRetentionStorageModelProvider | undefined;
5487
5490
  }
5488
5491
  /**
5492
+ * <p>A successful deletion returns no response fields.</p>
5489
5493
  * @public
5490
5494
  */
5491
- export interface ListEnforcedGuardrailsConfigurationResponse {
5495
+ export interface DeleteOrganizationDataRetentionStorageResponse {
5496
+ }
5497
+ /**
5498
+ * <p>Identifies the project and model provider whose retention storage configuration to delete.</p>
5499
+ * @public
5500
+ */
5501
+ export interface DeleteProjectDataRetentionStorageRequest {
5492
5502
  /**
5493
- * <p>Array of AccountEnforcedGuardrailOutputConfiguration objects.</p>
5503
+ * <p>The ID or ARN of a named project owned by the calling account in this AWS Region. The default project is not supported; use the account-level retention storage operations instead.</p>
5494
5504
  * @public
5495
5505
  */
5496
- guardrailsConfig: AccountEnforcedGuardrailOutputConfiguration[] | undefined;
5506
+ projectIdentifier: string | undefined;
5497
5507
  /**
5498
- * <p>Opaque continuation token of previous paginated response.</p>
5508
+ * <p>The model provider whose retention storage configuration is addressed by this request.</p>
5499
5509
  * @public
5500
5510
  */
5501
- nextToken?: string | undefined;
5511
+ modelProvider: DataRetentionStorageModelProvider | undefined;
5502
5512
  }
5503
5513
  /**
5514
+ * <p>A successful deletion returns no response fields.</p>
5504
5515
  * @public
5505
5516
  */
5506
- export interface PutEnforcedGuardrailConfigurationRequest {
5517
+ export interface DeleteProjectDataRetentionStorageResponse {
5518
+ }
5519
+ /**
5520
+ * <p>Identifies the model provider whose account retention storage configuration to retrieve.</p>
5521
+ * @public
5522
+ */
5523
+ export interface GetAccountDataRetentionStorageRequest {
5507
5524
  /**
5508
- * <p>Unique ID for the account enforced configuration.</p>
5525
+ * <p>The model provider whose retention storage configuration is addressed by this request.</p>
5509
5526
  * @public
5510
5527
  */
5511
- configId?: string | undefined;
5528
+ modelProvider: DataRetentionStorageModelProvider | undefined;
5529
+ }
5530
+ /**
5531
+ * <p>You provide the Amazon S3 destination and AWS Key Management Service (AWS KMS) key for retained data.</p> <p>Before saving a customer-managed destination, Amazon Bedrock validates that you can use the bucket and key and that their resource policies permit the required Amazon Bedrock access. If validation fails, Amazon Bedrock rejects the configuration without saving it.</p> <p>You need <code>s3:PutObject</code>, <code>s3:GetObject</code>, <code>kms:GenerateDataKey</code>, and <code>kms:Decrypt</code> permissions. The Amazon S3 bucket policy must allow the Amazon Bedrock service principal, <code>bedrock.amazonaws.com</code>, to put, get, and delete objects with conditions appropriate to the configuration scope.</p> <p>Use <code>aws:SourceAccount</code> for account scope, <code>aws:SourceOrgID</code> for organization scope, and both <code>aws:SourceAccount</code> and the project's <code>aws:SourceArn</code> for project scope. Validation rejects resource policies that allow the service principal to access the destination without the required scope conditions.</p> <p>The key policy must permit <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> for both uses of the key: direct use by Amazon Bedrock with the scope conditions, and use through Amazon S3 with a <code>kms:ViaService</code> condition for the bucket's Region and <code>kms:EncryptionContext:aws:s3:arn</code> scoped to the bucket.</p>
5532
+ * @public
5533
+ */
5534
+ export interface DataRetentionStorageConfiguration {
5512
5535
  /**
5513
- * <p>Account-level enforced guardrail input configuration.</p>
5536
+ * <p>The Amazon Resource Name (ARN) of the customer managed AWS Key Management Service (AWS KMS) key you use to encrypt retained data. Specify an enabled symmetric encryption key in the AWS Region where you register the configuration. You cannot specify a key alias.</p>
5514
5537
  * @public
5515
5538
  */
5516
- guardrailInferenceConfig: AccountEnforcedGuardrailInferenceInputConfiguration | undefined;
5539
+ kmsKeyArn: string | undefined;
5540
+ /**
5541
+ * <p>The Amazon Resource Name (ARN) of the Amazon S3 bucket that receives retained data. The bucket must be in the AWS Region where you register the configuration.</p>
5542
+ * @public
5543
+ */
5544
+ s3BucketArn: string | undefined;
5545
+ /**
5546
+ * <p>The AWS account ID of the destination bucket's owner. You must specify the owner, even when the bucket belongs to another account. Amazon Bedrock uses this ID to verify bucket ownership for each delivery request.</p>
5547
+ * @public
5548
+ */
5549
+ s3BucketOwner: string | undefined;
5517
5550
  }
5518
5551
  /**
5552
+ * <p>The calling account's stored retention storage configuration for the requested model provider.</p>
5519
5553
  * @public
5520
5554
  */
5521
- export interface PutEnforcedGuardrailConfigurationResponse {
5555
+ export interface GetAccountDataRetentionStorageResponse {
5522
5556
  /**
5523
- * <p>Unique ID for the account enforced configuration.</p>
5557
+ * <p>Scope addressed by the operation that returned this record.</p>
5524
5558
  * @public
5525
5559
  */
5526
- configId?: string | undefined;
5560
+ scope: DataRetentionStorageScope | undefined;
5527
5561
  /**
5528
- * <p>Timestamp.</p>
5562
+ * <p>Model provider this configuration applies to.</p>
5529
5563
  * @public
5530
5564
  */
5531
- updatedAt?: Date | undefined;
5565
+ modelProvider: DataRetentionStorageModelProvider | undefined;
5532
5566
  /**
5533
- * <p>The ARN of the role used to update the configuration.</p>
5567
+ * <p>Where this record delivers retained data.</p>
5534
5568
  * @public
5535
5569
  */
5536
- updatedBy?: string | undefined;
5570
+ storageDestination: DataRetentionStorageDestination | undefined;
5571
+ /**
5572
+ * <p>The stored destination and key. Present only when storageDestination is customer_managed.</p>
5573
+ * @public
5574
+ */
5575
+ storageConfiguration?: DataRetentionStorageConfiguration | undefined;
5576
+ /**
5577
+ * <p>Time the stored record last changed.</p>
5578
+ * @public
5579
+ */
5580
+ updatedAt: Date | undefined;
5581
+ /**
5582
+ * <p>Validation state of the KMS key. Present only when storageDestination is customer_managed.</p>
5583
+ * @public
5584
+ */
5585
+ kmsKeyStatus?: DataRetentionStorageResourceStatus | undefined;
5586
+ /**
5587
+ * <p>Validation state of the bucket. Present only when storageDestination is customer_managed.</p>
5588
+ * @public
5589
+ */
5590
+ s3BucketStatus?: DataRetentionStorageResourceStatus | undefined;
5537
5591
  }
5538
5592
  /**
5593
+ * <p>Identifies the model provider whose organization retention storage configuration to retrieve.</p>
5539
5594
  * @public
5540
5595
  */
5541
- export interface BatchDeleteEvaluationJobRequest {
5596
+ export interface GetOrganizationDataRetentionStorageRequest {
5542
5597
  /**
5543
- * <p>A list of one or more evaluation job Amazon Resource Names (ARNs) you want to delete.</p>
5598
+ * <p>The model provider whose retention storage configuration is addressed by this request.</p>
5544
5599
  * @public
5545
5600
  */
5546
- jobIdentifiers: string[] | undefined;
5601
+ modelProvider: DataRetentionStorageModelProvider | undefined;
5547
5602
  }
5548
5603
  /**
5549
- * <p>A JSON array that provides the status of the evaluation jobs being deleted.</p>
5604
+ * <p>The organization's stored retention storage configuration for the requested model provider.</p>
5550
5605
  * @public
5551
5606
  */
5552
- export interface BatchDeleteEvaluationJobError {
5607
+ export interface GetOrganizationDataRetentionStorageResponse {
5553
5608
  /**
5554
- * <p>The ARN of the evaluation job being deleted.</p>
5609
+ * <p>Scope addressed by the operation that returned this record.</p>
5555
5610
  * @public
5556
5611
  */
5557
- jobIdentifier: string | undefined;
5612
+ scope: DataRetentionStorageScope | undefined;
5558
5613
  /**
5559
- * <p>A HTTP status code of the evaluation job being deleted.</p>
5614
+ * <p>Model provider this configuration applies to.</p>
5560
5615
  * @public
5561
5616
  */
5562
- code: string | undefined;
5617
+ modelProvider: DataRetentionStorageModelProvider | undefined;
5563
5618
  /**
5564
- * <p>A status message about the evaluation job deletion.</p>
5619
+ * <p>Where this record delivers retained data.</p>
5565
5620
  * @public
5566
5621
  */
5567
- message?: string | undefined;
5568
- }
5569
- /**
5570
- * <p>An evaluation job for deletion, and it’s current status.</p>
5571
- * @public
5572
- */
5573
- export interface BatchDeleteEvaluationJobItem {
5622
+ storageDestination: DataRetentionStorageDestination | undefined;
5574
5623
  /**
5575
- * <p>The Amazon Resource Name (ARN) of the evaluation job for deletion.</p>
5624
+ * <p>The stored destination and key. Present only when storageDestination is customer_managed.</p>
5576
5625
  * @public
5577
5626
  */
5578
- jobIdentifier: string | undefined;
5627
+ storageConfiguration?: DataRetentionStorageConfiguration | undefined;
5579
5628
  /**
5580
- * <p>The status of the evaluation job for deletion.</p>
5629
+ * <p>Time the stored record last changed.</p>
5581
5630
  * @public
5582
5631
  */
5583
- jobStatus: EvaluationJobStatus | undefined;
5632
+ updatedAt: Date | undefined;
5633
+ /**
5634
+ * <p>Validation state of the KMS key. Present only when storageDestination is customer_managed.</p>
5635
+ * @public
5636
+ */
5637
+ kmsKeyStatus?: DataRetentionStorageResourceStatus | undefined;
5638
+ /**
5639
+ * <p>Validation state of the bucket. Present only when storageDestination is customer_managed.</p>
5640
+ * @public
5641
+ */
5642
+ s3BucketStatus?: DataRetentionStorageResourceStatus | undefined;
5584
5643
  }
5585
5644
  /**
5645
+ * <p>Identifies the project and model provider whose retention storage configuration to retrieve.</p>
5586
5646
  * @public
5587
5647
  */
5588
- export interface BatchDeleteEvaluationJobResponse {
5648
+ export interface GetProjectDataRetentionStorageRequest {
5589
5649
  /**
5590
- * <p>A JSON object containing the HTTP status codes and the ARNs of evaluation jobs that failed to be deleted.</p>
5650
+ * <p>The ID or ARN of a named project owned by the calling account in this AWS Region. The default project is not supported; use the account-level retention storage operations instead.</p>
5591
5651
  * @public
5592
5652
  */
5593
- errors: BatchDeleteEvaluationJobError[] | undefined;
5653
+ projectIdentifier: string | undefined;
5594
5654
  /**
5595
- * <p>The list of evaluation jobs for deletion.</p>
5655
+ * <p>The model provider whose retention storage configuration is addressed by this request.</p>
5596
5656
  * @public
5597
5657
  */
5598
- evaluationJobs: BatchDeleteEvaluationJobItem[] | undefined;
5658
+ modelProvider: DataRetentionStorageModelProvider | undefined;
5599
5659
  }
5600
5660
  /**
5601
- * <p>Defines the value for one rating in a custom metric rating scale.</p>
5602
- * @public
5603
- */
5604
- export type RatingScaleItemValue = RatingScaleItemValue.FloatValueMember | RatingScaleItemValue.StringValueMember | RatingScaleItemValue.$UnknownMember;
5605
- /**
5661
+ * <p>The project's stored retention storage configuration for the requested model provider.</p>
5606
5662
  * @public
5607
5663
  */
5608
- export declare namespace RatingScaleItemValue {
5664
+ export interface GetProjectDataRetentionStorageResponse {
5609
5665
  /**
5610
- * <p>A string representing the value for a rating in a custom metric rating scale.</p>
5666
+ * <p>Scope addressed by the operation that returned this record.</p>
5611
5667
  * @public
5612
5668
  */
5613
- interface StringValueMember {
5614
- stringValue: string;
5615
- floatValue?: never;
5616
- $unknown?: never;
5617
- }
5669
+ scope: DataRetentionStorageScope | undefined;
5618
5670
  /**
5619
- * <p>A floating point number representing the value for a rating in a custom metric rating scale.</p>
5671
+ * <p>Model provider this configuration applies to.</p>
5620
5672
  * @public
5621
5673
  */
5622
- interface FloatValueMember {
5623
- stringValue?: never;
5624
- floatValue: number;
5625
- $unknown?: never;
5626
- }
5674
+ modelProvider: DataRetentionStorageModelProvider | undefined;
5627
5675
  /**
5676
+ * <p>Where this record delivers retained data.</p>
5628
5677
  * @public
5629
5678
  */
5630
- interface $UnknownMember {
5631
- stringValue?: never;
5632
- floatValue?: never;
5633
- $unknown: [string, any];
5634
- }
5679
+ storageDestination: DataRetentionStorageDestination | undefined;
5635
5680
  /**
5636
- * @deprecated unused in schema-serde mode.
5637
- *
5681
+ * <p>The stored destination and key. Present only when storageDestination is customer_managed.</p>
5682
+ * @public
5638
5683
  */
5639
- interface Visitor<T> {
5640
- stringValue: (value: string) => T;
5641
- floatValue: (value: number) => T;
5642
- _: (name: string, value: any) => T;
5643
- }
5644
- }
5645
- /**
5646
- * <p>Defines the value and corresponding definition for one rating in a custom metric rating scale.</p>
5647
- * @public
5648
- */
5649
- export interface RatingScaleItem {
5684
+ storageConfiguration?: DataRetentionStorageConfiguration | undefined;
5650
5685
  /**
5651
- * <p>Defines the definition for one rating in a custom metric rating scale.</p>
5686
+ * <p>Time the stored record last changed.</p>
5652
5687
  * @public
5653
5688
  */
5654
- definition: string | undefined;
5689
+ updatedAt: Date | undefined;
5655
5690
  /**
5656
- * <p>Defines the value for one rating in a custom metric rating scale.</p>
5691
+ * <p>Validation state of the KMS key. Present only when storageDestination is customer_managed.</p>
5657
5692
  * @public
5658
5693
  */
5659
- value: RatingScaleItemValue | undefined;
5694
+ kmsKeyStatus?: DataRetentionStorageResourceStatus | undefined;
5695
+ /**
5696
+ * <p>Validation state of the bucket. Present only when storageDestination is customer_managed.</p>
5697
+ * @public
5698
+ */
5699
+ s3BucketStatus?: DataRetentionStorageResourceStatus | undefined;
5700
+ /**
5701
+ * <p>ARN of the configured project.</p>
5702
+ * @public
5703
+ */
5704
+ projectArn: string | undefined;
5660
5705
  }
5661
5706
  /**
5662
- * <p>The definition of a custom metric for use in an Amazon Bedrock evaluation job. A custom metric definition includes a metric name, prompt (instructions) and optionally, a rating scale. Your prompt must include a task description and input variables. The required input variables are different for model-as-a-judge and RAG evaluations.</p> <p>For more information about how to define a custom metric in Amazon Bedrock, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-custom-metrics-prompt-formats.html">Create a prompt for a custom metrics (LLM-as-a-judge model evaluations)</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-evaluation-custom-metrics-prompt-formats.html">Create a prompt for a custom metrics (RAG evaluations)</a>.</p>
5707
+ * <p>The model provider and retention storage destination to configure for the calling account.</p>
5663
5708
  * @public
5664
5709
  */
5665
- export interface CustomMetricDefinition {
5710
+ export interface PutAccountDataRetentionStorageRequest {
5666
5711
  /**
5667
- * <p>The name for a custom metric. Names must be unique in your Amazon Web Services region.</p>
5712
+ * <p>The model provider whose retention storage configuration is addressed by this request.</p>
5668
5713
  * @public
5669
5714
  */
5670
- name: string | undefined;
5715
+ modelProvider: DataRetentionStorageModelProvider | undefined;
5671
5716
  /**
5672
- * <p>The prompt for a custom metric that instructs the evaluator model how to rate the model or RAG source under evaluation.</p>
5717
+ * <p>Where retained data is delivered for this scope. customer_managed requires storageConfiguration; amazon_managed forbids it.</p>
5673
5718
  * @public
5674
5719
  */
5675
- instructions: string | undefined;
5720
+ storageDestination: DataRetentionStorageDestination | undefined;
5676
5721
  /**
5677
- * <p>Defines the rating scale to be used for a custom metric. We recommend that you always define a ratings scale when creating a custom metric. If you don't define a scale, Amazon Bedrock won't be able to visually display the results of the evaluation in the console or calculate average values of numerical scores. For more information on specifying a rating scale, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-custom-metrics-prompt-formats.html#model-evaluation-custom-metrics-prompt-formats-schema">Specifying an output schema (rating scale)</a>.</p>
5722
+ * <p>Destination bucket and key. Required when storageDestination is customer_managed; rejected with ValidationException when amazon_managed.</p>
5678
5723
  * @public
5679
5724
  */
5680
- ratingScale?: RatingScaleItem[] | undefined;
5725
+ storageConfiguration?: DataRetentionStorageConfiguration | undefined;
5681
5726
  }
5682
5727
  /**
5683
- * <p>An array item definining a single custom metric for use in an Amazon Bedrock evaluation job.</p>
5684
- * @public
5685
- */
5686
- export type AutomatedEvaluationCustomMetricSource = AutomatedEvaluationCustomMetricSource.CustomMetricDefinitionMember | AutomatedEvaluationCustomMetricSource.$UnknownMember;
5687
- /**
5728
+ * <p>The stored configuration after the write.</p>
5688
5729
  * @public
5689
5730
  */
5690
- export declare namespace AutomatedEvaluationCustomMetricSource {
5731
+ export interface PutAccountDataRetentionStorageResponse {
5691
5732
  /**
5692
- * <p>The definition of a custom metric for use in an Amazon Bedrock evaluation job.</p>
5733
+ * <p>Scope addressed by the operation that returned this record.</p>
5693
5734
  * @public
5694
5735
  */
5695
- interface CustomMetricDefinitionMember {
5696
- customMetricDefinition: CustomMetricDefinition;
5697
- $unknown?: never;
5698
- }
5736
+ scope: DataRetentionStorageScope | undefined;
5699
5737
  /**
5738
+ * <p>Model provider this configuration applies to.</p>
5700
5739
  * @public
5701
5740
  */
5702
- interface $UnknownMember {
5703
- customMetricDefinition?: never;
5704
- $unknown: [string, any];
5705
- }
5741
+ modelProvider: DataRetentionStorageModelProvider | undefined;
5706
5742
  /**
5707
- * @deprecated unused in schema-serde mode.
5708
- *
5743
+ * <p>Where this record delivers retained data.</p>
5744
+ * @public
5709
5745
  */
5710
- interface Visitor<T> {
5711
- customMetricDefinition: (value: CustomMetricDefinition) => T;
5712
- _: (name: string, value: any) => T;
5713
- }
5714
- }
5715
- /**
5716
- * <p>Defines the model you want to evaluate custom metrics in an Amazon Bedrock evaluation job.</p>
5717
- * @public
5718
- */
5719
- export interface CustomMetricBedrockEvaluatorModel {
5746
+ storageDestination: DataRetentionStorageDestination | undefined;
5720
5747
  /**
5721
- * <p>The Amazon Resource Name (ARN) of the evaluator model for custom metrics. For a list of supported evaluator models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/evaluation-judge.html">Evaluate model performance using another LLM as a judge</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/evaluation-kb.html">Evaluate the performance of RAG sources using Amazon Bedrock evaluations</a>.</p>
5748
+ * <p>The stored destination and key. Present only when storageDestination is customer_managed.</p>
5722
5749
  * @public
5723
5750
  */
5724
- modelIdentifier: string | undefined;
5725
- }
5726
- /**
5727
- * <p>Configuration of the evaluator model you want to use to evaluate custom metrics in an Amazon Bedrock evaluation job.</p>
5728
- * @public
5729
- */
5730
- export interface CustomMetricEvaluatorModelConfig {
5751
+ storageConfiguration?: DataRetentionStorageConfiguration | undefined;
5731
5752
  /**
5732
- * <p>Defines the model you want to evaluate custom metrics in an Amazon Bedrock evaluation job.</p>
5753
+ * <p>Time the stored record last changed.</p>
5733
5754
  * @public
5734
5755
  */
5735
- bedrockEvaluatorModels: CustomMetricBedrockEvaluatorModel[] | undefined;
5736
- }
5737
- /**
5738
- * <p>Defines the configuration of custom metrics to be used in an evaluation job. To learn more about using custom metrics in Amazon Bedrock evaluation jobs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-custom-metrics-prompt-formats.html">Create a prompt for a custom metrics (LLM-as-a-judge model evaluations)</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-evaluation-custom-metrics-prompt-formats.html">Create a prompt for a custom metrics (RAG evaluations)</a>.</p>
5739
- * @public
5740
- */
5741
- export interface AutomatedEvaluationCustomMetricConfig {
5756
+ updatedAt: Date | undefined;
5742
5757
  /**
5743
- * <p>Defines a list of custom metrics to be used in an Amazon Bedrock evaluation job.</p>
5758
+ * <p>Validation state of the KMS key. Present only when storageDestination is customer_managed.</p>
5744
5759
  * @public
5745
5760
  */
5746
- customMetrics: AutomatedEvaluationCustomMetricSource[] | undefined;
5761
+ kmsKeyStatus?: DataRetentionStorageResourceStatus | undefined;
5747
5762
  /**
5748
- * <p>Configuration of the evaluator model you want to use to evaluate custom metrics in an Amazon Bedrock evaluation job.</p>
5763
+ * <p>Validation state of the bucket. Present only when storageDestination is customer_managed.</p>
5749
5764
  * @public
5750
5765
  */
5751
- evaluatorModelConfig: CustomMetricEvaluatorModelConfig | undefined;
5766
+ s3BucketStatus?: DataRetentionStorageResourceStatus | undefined;
5752
5767
  }
5753
5768
  /**
5754
- * <p>The location in Amazon S3 where your prompt dataset is stored.</p>
5755
- * @public
5756
- */
5757
- export type EvaluationDatasetLocation = EvaluationDatasetLocation.S3UriMember | EvaluationDatasetLocation.$UnknownMember;
5758
- /**
5769
+ * <p>The model provider and retention storage destination to configure for the organization.</p>
5759
5770
  * @public
5760
5771
  */
5761
- export declare namespace EvaluationDatasetLocation {
5772
+ export interface PutOrganizationDataRetentionStorageRequest {
5762
5773
  /**
5763
- * <p>The S3 URI of the S3 bucket specified in the job.</p>
5774
+ * <p>The model provider whose retention storage configuration is addressed by this request.</p>
5764
5775
  * @public
5765
5776
  */
5766
- interface S3UriMember {
5767
- s3Uri: string;
5768
- $unknown?: never;
5769
- }
5777
+ modelProvider: DataRetentionStorageModelProvider | undefined;
5770
5778
  /**
5779
+ * <p>Where retained data is delivered for this scope. customer_managed requires storageConfiguration; amazon_managed forbids it.</p>
5771
5780
  * @public
5772
5781
  */
5773
- interface $UnknownMember {
5774
- s3Uri?: never;
5775
- $unknown: [string, any];
5776
- }
5782
+ storageDestination: DataRetentionStorageDestination | undefined;
5777
5783
  /**
5778
- * @deprecated unused in schema-serde mode.
5779
- *
5784
+ * <p>Destination bucket and key. Required when storageDestination is customer_managed; rejected with ValidationException when amazon_managed.</p>
5785
+ * @public
5780
5786
  */
5781
- interface Visitor<T> {
5782
- s3Uri: (value: string) => T;
5783
- _: (name: string, value: any) => T;
5784
- }
5787
+ storageConfiguration?: DataRetentionStorageConfiguration | undefined;
5785
5788
  }
5786
5789
  /**
5787
- * <p>Used to specify the name of a built-in prompt dataset and optionally, the Amazon S3 bucket where a custom prompt dataset is saved.</p>
5790
+ * <p>The organization's stored retention storage configuration after the write.</p>
5788
5791
  * @public
5789
5792
  */
5790
- export interface EvaluationDataset {
5793
+ export interface PutOrganizationDataRetentionStorageResponse {
5791
5794
  /**
5792
- * <p>Used to specify supported built-in prompt datasets. Valid values are <code>Builtin.Bold</code>, <code>Builtin.BoolQ</code>, <code>Builtin.NaturalQuestions</code>, <code>Builtin.Gigaword</code>, <code>Builtin.RealToxicityPrompts</code>, <code>Builtin.TriviaQA</code>, <code>Builtin.T-Rex</code>, <code>Builtin.WomensEcommerceClothingReviews</code> and <code>Builtin.Wikitext2</code>.</p>
5795
+ * <p>Scope addressed by the operation that returned this record.</p>
5793
5796
  * @public
5794
5797
  */
5795
- name: string | undefined;
5798
+ scope: DataRetentionStorageScope | undefined;
5796
5799
  /**
5797
- * <p>For custom prompt datasets, you must specify the location in Amazon S3 where the prompt dataset is saved.</p>
5800
+ * <p>Model provider this configuration applies to.</p>
5798
5801
  * @public
5799
5802
  */
5800
- datasetLocation?: EvaluationDatasetLocation | undefined;
5801
- }
5802
- /**
5803
- * <p>Defines the prompt datasets, built-in metric names and custom metric names, and the task type.</p>
5804
- * @public
5805
- */
5806
- export interface EvaluationDatasetMetricConfig {
5803
+ modelProvider: DataRetentionStorageModelProvider | undefined;
5807
5804
  /**
5808
- * <p>The the type of task you want to evaluate for your evaluation job. This applies only to model evaluation jobs and is ignored for knowledge base evaluation jobs.</p>
5805
+ * <p>Where this record delivers retained data.</p>
5809
5806
  * @public
5810
5807
  */
5811
- taskType: EvaluationTaskType | undefined;
5808
+ storageDestination: DataRetentionStorageDestination | undefined;
5812
5809
  /**
5813
- * <p>Specifies the prompt dataset.</p>
5810
+ * <p>The stored destination and key. Present only when storageDestination is customer_managed.</p>
5814
5811
  * @public
5815
5812
  */
5816
- dataset: EvaluationDataset | undefined;
5813
+ storageConfiguration?: DataRetentionStorageConfiguration | undefined;
5817
5814
  /**
5818
- * <p>The names of the metrics you want to use for your evaluation job.</p> <p>For knowledge base evaluation jobs that evaluate retrieval only, valid values are "<code>Builtin.ContextRelevance</code>", "<code>Builtin.ContextCoverage</code>".</p> <p>For knowledge base evaluation jobs that evaluate retrieval with response generation, valid values are "<code>Builtin.Correctness</code>", "<code>Builtin.Completeness</code>", "<code>Builtin.Helpfulness</code>", "<code>Builtin.LogicalCoherence</code>", "<code>Builtin.Faithfulness</code>", "<code>Builtin.Harmfulness</code>", "<code>Builtin.Stereotyping</code>", "<code>Builtin.Refusal</code>".</p> <p>For automated model evaluation jobs, valid values are "<code>Builtin.Accuracy</code>", "<code>Builtin.Robustness</code>", and "<code>Builtin.Toxicity</code>". In model evaluation jobs that use a LLM as judge you can specify "<code>Builtin.Correctness</code>", "<code>Builtin.Completeness"</code>, "<code>Builtin.Faithfulness"</code>, "<code>Builtin.Helpfulness</code>", "<code>Builtin.Coherence</code>", "<code>Builtin.Relevance</code>", "<code>Builtin.FollowingInstructions</code>", "<code>Builtin.ProfessionalStyleAndTone</code>", You can also specify the following responsible AI related metrics only for model evaluation job that use a LLM as judge "<code>Builtin.Harmfulness</code>", "<code>Builtin.Stereotyping</code>", and "<code>Builtin.Refusal</code>".</p> <p>For human-based model evaluation jobs, the list of strings must match the <code>name</code> parameter specified in <code>HumanEvaluationCustomMetric</code>.</p>
5815
+ * <p>Time the stored record last changed.</p>
5819
5816
  * @public
5820
5817
  */
5821
- metricNames: string[] | undefined;
5822
- }
5823
- /**
5824
- * <p>The evaluator model used in knowledge base evaluation job or in model evaluation job that use a model as judge. This model computes all evaluation related metrics.</p>
5825
- * @public
5826
- */
5827
- export interface BedrockEvaluatorModel {
5818
+ updatedAt: Date | undefined;
5828
5819
  /**
5829
- * <p>The Amazon Resource Name (ARN) of the evaluator model used used in knowledge base evaluation job or in model evaluation job that use a model as judge.</p>
5820
+ * <p>Validation state of the KMS key. Present only when storageDestination is customer_managed.</p>
5830
5821
  * @public
5831
5822
  */
5832
- modelIdentifier: string | undefined;
5823
+ kmsKeyStatus?: DataRetentionStorageResourceStatus | undefined;
5824
+ /**
5825
+ * <p>Validation state of the bucket. Present only when storageDestination is customer_managed.</p>
5826
+ * @public
5827
+ */
5828
+ s3BucketStatus?: DataRetentionStorageResourceStatus | undefined;
5833
5829
  }
5834
5830
  /**
5835
- * <p>Specifies the model configuration for the evaluator model. <code>EvaluatorModelConfig</code> is required for evaluation jobs that use a knowledge base or in model evaluation job that use a model as judge. This model computes all evaluation related metrics.</p>
5836
- * @public
5837
- */
5838
- export type EvaluatorModelConfig = EvaluatorModelConfig.BedrockEvaluatorModelsMember | EvaluatorModelConfig.$UnknownMember;
5839
- /**
5831
+ * <p>The project, model provider, and retention storage destination to configure.</p>
5840
5832
  * @public
5841
5833
  */
5842
- export declare namespace EvaluatorModelConfig {
5834
+ export interface PutProjectDataRetentionStorageRequest {
5843
5835
  /**
5844
- * <p>The evaluator model used in knowledge base evaluation job or in model evaluation job that use a model as judge. This model computes all evaluation related metrics.</p>
5836
+ * <p>The ID or ARN of a named project owned by the calling account in this AWS Region. The default project is not supported; use the account-level retention storage operations instead.</p>
5845
5837
  * @public
5846
5838
  */
5847
- interface BedrockEvaluatorModelsMember {
5848
- bedrockEvaluatorModels: BedrockEvaluatorModel[];
5849
- $unknown?: never;
5850
- }
5839
+ projectIdentifier: string | undefined;
5851
5840
  /**
5841
+ * <p>The model provider whose retention storage configuration is addressed by this request.</p>
5852
5842
  * @public
5853
5843
  */
5854
- interface $UnknownMember {
5855
- bedrockEvaluatorModels?: never;
5856
- $unknown: [string, any];
5857
- }
5844
+ modelProvider: DataRetentionStorageModelProvider | undefined;
5858
5845
  /**
5859
- * @deprecated unused in schema-serde mode.
5860
- *
5846
+ * <p>Where retained data is delivered for this scope. customer_managed requires storageConfiguration; amazon_managed forbids it.</p>
5847
+ * @public
5861
5848
  */
5862
- interface Visitor<T> {
5863
- bedrockEvaluatorModels: (value: BedrockEvaluatorModel[]) => T;
5864
- _: (name: string, value: any) => T;
5865
- }
5849
+ storageDestination: DataRetentionStorageDestination | undefined;
5850
+ /**
5851
+ * <p>Destination bucket and key. Required when storageDestination is customer_managed; rejected with ValidationException when amazon_managed.</p>
5852
+ * @public
5853
+ */
5854
+ storageConfiguration?: DataRetentionStorageConfiguration | undefined;
5866
5855
  }
5867
5856
  /**
5868
- * <p>The configuration details of an automated evaluation job. The <code>EvaluationDatasetMetricConfig</code> object is used to specify the prompt datasets, task type, and metric names.</p>
5857
+ * <p>The project's stored retention storage configuration after the write.</p>
5869
5858
  * @public
5870
5859
  */
5871
- export interface AutomatedEvaluationConfig {
5860
+ export interface PutProjectDataRetentionStorageResponse {
5872
5861
  /**
5873
- * <p>Configuration details of the prompt datasets and metrics you want to use for your evaluation job.</p>
5862
+ * <p>Scope addressed by the operation that returned this record.</p>
5874
5863
  * @public
5875
5864
  */
5876
- datasetMetricConfigs: EvaluationDatasetMetricConfig[] | undefined;
5865
+ scope: DataRetentionStorageScope | undefined;
5877
5866
  /**
5878
- * <p>Contains the evaluator model configuration details. <code>EvaluatorModelConfig</code> is required for evaluation jobs that use a knowledge base or in model evaluation job that use a model as judge. This model computes all evaluation related metrics.</p>
5867
+ * <p>Model provider this configuration applies to.</p>
5879
5868
  * @public
5880
5869
  */
5881
- evaluatorModelConfig?: EvaluatorModelConfig | undefined;
5870
+ modelProvider: DataRetentionStorageModelProvider | undefined;
5882
5871
  /**
5883
- * <p>Defines the configuration of custom metrics to be used in an evaluation job.</p>
5872
+ * <p>Where this record delivers retained data.</p>
5884
5873
  * @public
5885
5874
  */
5886
- customMetricConfig?: AutomatedEvaluationCustomMetricConfig | undefined;
5887
- }
5888
- /**
5889
- * <p>In a model evaluation job that uses human workers you must define the name of the metric, and how you want that metric rated <code>ratingMethod</code>, and an optional description of the metric.</p>
5890
- * @public
5891
- */
5892
- export interface HumanEvaluationCustomMetric {
5875
+ storageDestination: DataRetentionStorageDestination | undefined;
5893
5876
  /**
5894
- * <p>The name of the metric. Your human evaluators will see this name in the evaluation UI.</p>
5877
+ * <p>The stored destination and key. Present only when storageDestination is customer_managed.</p>
5895
5878
  * @public
5896
5879
  */
5897
- name: string | undefined;
5880
+ storageConfiguration?: DataRetentionStorageConfiguration | undefined;
5898
5881
  /**
5899
- * <p>An optional description of the metric. Use this parameter to provide more details about the metric.</p>
5882
+ * <p>Time the stored record last changed.</p>
5900
5883
  * @public
5901
5884
  */
5902
- description?: string | undefined;
5885
+ updatedAt: Date | undefined;
5903
5886
  /**
5904
- * <p>Choose how you want your human workers to evaluation your model. Valid values for rating methods are <code>ThumbsUpDown</code>, <code>IndividualLikertScale</code>,<code>ComparisonLikertScale</code>, <code>ComparisonChoice</code>, and <code>ComparisonRank</code> </p>
5887
+ * <p>Validation state of the KMS key. Present only when storageDestination is customer_managed.</p>
5905
5888
  * @public
5906
5889
  */
5907
- ratingMethod: string | undefined;
5908
- }
5909
- /**
5910
- * <p>Contains <code>SageMakerFlowDefinition</code> object. The object is used to specify the prompt dataset, task type, rating method and metric names.</p>
5911
- * @public
5912
- */
5913
- export interface HumanWorkflowConfig {
5890
+ kmsKeyStatus?: DataRetentionStorageResourceStatus | undefined;
5914
5891
  /**
5915
- * <p>The Amazon Resource Number (ARN) for the flow definition</p>
5892
+ * <p>Validation state of the bucket. Present only when storageDestination is customer_managed.</p>
5916
5893
  * @public
5917
5894
  */
5918
- flowDefinitionArn: string | undefined;
5895
+ s3BucketStatus?: DataRetentionStorageResourceStatus | undefined;
5919
5896
  /**
5920
- * <p>Instructions for the flow definition</p>
5897
+ * <p>ARN of the configured project.</p>
5921
5898
  * @public
5922
5899
  */
5923
- instructions?: string | undefined;
5900
+ projectArn: string | undefined;
5924
5901
  }
5925
5902
  /**
5926
- * <p>Specifies the custom metrics, how tasks will be rated, the flow definition ARN, and your custom prompt datasets. Model evaluation jobs use human workers <i>only</i> support the use of custom prompt datasets. To learn more about custom prompt datasets and the required format, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-prompt-datasets-custom.html">Custom prompt datasets</a>.</p> <p>When you create custom metrics in <code>HumanEvaluationCustomMetric</code> you must specify the metric's <code>name</code>. The list of <code>names</code> specified in the <code>HumanEvaluationCustomMetric</code> array, must match the <code>metricNames</code> array of strings specified in <code>EvaluationDatasetMetricConfig</code>. For example, if in the <code>HumanEvaluationCustomMetric</code> array your specified the names <code>"accuracy", "toxicity", "readability"</code> as custom metrics <i>then</i> the <code>metricNames</code> array would need to look like the following <code>["accuracy", "toxicity", "readability"]</code> in <code>EvaluationDatasetMetricConfig</code>.</p>
5927
5903
  * @public
5928
5904
  */
5929
- export interface HumanEvaluationConfig {
5930
- /**
5931
- * <p>The parameters of the human workflow.</p>
5932
- * @public
5933
- */
5934
- humanWorkflowConfig?: HumanWorkflowConfig | undefined;
5935
- /**
5936
- * <p>A <code>HumanEvaluationCustomMetric</code> object. It contains the names the metrics, how the metrics are to be evaluated, an optional description.</p>
5937
- * @public
5938
- */
5939
- customMetrics?: HumanEvaluationCustomMetric[] | undefined;
5905
+ export interface DeleteEnforcedGuardrailConfigurationRequest {
5940
5906
  /**
5941
- * <p>Use to specify the metrics, task, and prompt dataset to be used in your model evaluation job.</p>
5907
+ * <p>Unique ID for the account enforced configuration.</p>
5942
5908
  * @public
5943
5909
  */
5944
- datasetMetricConfigs: EvaluationDatasetMetricConfig[] | undefined;
5910
+ configId: string | undefined;
5945
5911
  }
5946
5912
  /**
5947
- * <p>The configuration details of either an automated or human-based evaluation job.</p>
5948
5913
  * @public
5949
5914
  */
5950
- export type EvaluationConfig = EvaluationConfig.AutomatedMember | EvaluationConfig.HumanMember | EvaluationConfig.$UnknownMember;
5915
+ export interface DeleteEnforcedGuardrailConfigurationResponse {
5916
+ }
5951
5917
  /**
5952
5918
  * @public
5953
5919
  */
5954
- export declare namespace EvaluationConfig {
5920
+ export interface ListEnforcedGuardrailsConfigurationRequest {
5955
5921
  /**
5956
- * <p>Contains the configuration details of an automated evaluation job that computes metrics.</p>
5922
+ * <p>Opaque continuation token of previous paginated response.</p>
5957
5923
  * @public
5958
5924
  */
5959
- interface AutomatedMember {
5960
- automated: AutomatedEvaluationConfig;
5961
- human?: never;
5962
- $unknown?: never;
5963
- }
5925
+ nextToken?: string | undefined;
5926
+ }
5927
+ /**
5928
+ * @public
5929
+ */
5930
+ export interface ListEnforcedGuardrailsConfigurationResponse {
5964
5931
  /**
5965
- * <p>Contains the configuration details of an evaluation job that uses human workers.</p>
5932
+ * <p>Array of AccountEnforcedGuardrailOutputConfiguration objects.</p>
5966
5933
  * @public
5967
5934
  */
5968
- interface HumanMember {
5969
- automated?: never;
5970
- human: HumanEvaluationConfig;
5971
- $unknown?: never;
5972
- }
5935
+ guardrailsConfig: AccountEnforcedGuardrailOutputConfiguration[] | undefined;
5973
5936
  /**
5937
+ * <p>Opaque continuation token of previous paginated response.</p>
5974
5938
  * @public
5975
5939
  */
5976
- interface $UnknownMember {
5977
- automated?: never;
5978
- human?: never;
5979
- $unknown: [string, any];
5980
- }
5981
- /**
5982
- * @deprecated unused in schema-serde mode.
5983
- *
5984
- */
5985
- interface Visitor<T> {
5986
- automated: (value: AutomatedEvaluationConfig) => T;
5987
- human: (value: HumanEvaluationConfig) => T;
5988
- _: (name: string, value: any) => T;
5989
- }
5940
+ nextToken?: string | undefined;
5990
5941
  }
5991
5942
  /**
5992
- * <p>Contains performance settings for a model.</p>
5993
5943
  * @public
5994
5944
  */
5995
- export interface PerformanceConfiguration {
5945
+ export interface PutEnforcedGuardrailConfigurationRequest {
5996
5946
  /**
5997
- * <p>Specifies whether to use the latency-optimized or standard version of a model or inference profile.</p>
5947
+ * <p>Unique ID for the account enforced configuration.</p>
5998
5948
  * @public
5999
5949
  */
6000
- latency?: PerformanceConfigLatency | undefined;
5950
+ configId?: string | undefined;
5951
+ /**
5952
+ * <p>Account-level enforced guardrail input configuration.</p>
5953
+ * @public
5954
+ */
5955
+ guardrailInferenceConfig: AccountEnforcedGuardrailInferenceInputConfiguration | undefined;
6001
5956
  }
6002
5957
  /**
6003
- * <p>Contains the ARN of the Amazon Bedrock model or <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html">inference profile</a> specified in your evaluation job. Each Amazon Bedrock model supports different <code>inferenceParams</code>. To learn more about supported inference parameters for Amazon Bedrock models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters for foundation models</a>.</p> <p>The <code>inferenceParams</code> are specified using JSON. To successfully insert JSON as string make sure that all quotations are properly escaped. For example, <code>"temperature":"0.25"</code> key value pair would need to be formatted as <code>\"temperature\":\"0.25\"</code> to successfully accepted in the request.</p>
6004
5958
  * @public
6005
5959
  */
6006
- export interface EvaluationBedrockModel {
5960
+ export interface PutEnforcedGuardrailConfigurationResponse {
6007
5961
  /**
6008
- * <p>The ARN of the Amazon Bedrock model or inference profile specified.</p>
5962
+ * <p>Unique ID for the account enforced configuration.</p>
6009
5963
  * @public
6010
5964
  */
6011
- modelIdentifier: string | undefined;
5965
+ configId?: string | undefined;
6012
5966
  /**
6013
- * <p>Each Amazon Bedrock support different inference parameters that change how the model behaves during inference.</p>
5967
+ * <p>Timestamp.</p>
6014
5968
  * @public
6015
5969
  */
6016
- inferenceParams?: string | undefined;
5970
+ updatedAt?: Date | undefined;
6017
5971
  /**
6018
- * <p>Specifies performance settings for the model or inference profile.</p>
5972
+ * <p>The ARN of the role used to update the configuration.</p>
6019
5973
  * @public
6020
5974
  */
6021
- performanceConfig?: PerformanceConfiguration | undefined;
5975
+ updatedBy?: string | undefined;
6022
5976
  }
6023
5977
  /**
6024
- * <p>A summary of a model used for a model evaluation job where you provide your own inference response data.</p>
6025
5978
  * @public
6026
5979
  */
6027
- export interface EvaluationPrecomputedInferenceSource {
5980
+ export interface BatchDeleteEvaluationJobRequest {
6028
5981
  /**
6029
- * <p>A label that identifies a model used in a model evaluation job where you provide your own inference response data.</p>
5982
+ * <p>A list of one or more evaluation job Amazon Resource Names (ARNs) you want to delete.</p>
6030
5983
  * @public
6031
5984
  */
6032
- inferenceSourceIdentifier: string | undefined;
5985
+ jobIdentifiers: string[] | undefined;
6033
5986
  }
6034
5987
  /**
6035
- * <p>Defines the models used in the model evaluation job.</p>
6036
- * @public
6037
- */
6038
- export type EvaluationModelConfig = EvaluationModelConfig.BedrockModelMember | EvaluationModelConfig.PrecomputedInferenceSourceMember | EvaluationModelConfig.$UnknownMember;
6039
- /**
5988
+ * <p>A JSON array that provides the status of the evaluation jobs being deleted.</p>
6040
5989
  * @public
6041
5990
  */
6042
- export declare namespace EvaluationModelConfig {
5991
+ export interface BatchDeleteEvaluationJobError {
6043
5992
  /**
6044
- * <p>Defines the Amazon Bedrock model or inference profile and inference parameters you want used.</p>
5993
+ * <p>The ARN of the evaluation job being deleted.</p>
6045
5994
  * @public
6046
5995
  */
6047
- interface BedrockModelMember {
6048
- bedrockModel: EvaluationBedrockModel;
6049
- precomputedInferenceSource?: never;
6050
- $unknown?: never;
6051
- }
5996
+ jobIdentifier: string | undefined;
6052
5997
  /**
6053
- * <p>Defines the model used to generate inference response data for a model evaluation job where you provide your own inference response data.</p>
5998
+ * <p>A HTTP status code of the evaluation job being deleted.</p>
6054
5999
  * @public
6055
6000
  */
6056
- interface PrecomputedInferenceSourceMember {
6057
- bedrockModel?: never;
6058
- precomputedInferenceSource: EvaluationPrecomputedInferenceSource;
6059
- $unknown?: never;
6060
- }
6001
+ code: string | undefined;
6061
6002
  /**
6003
+ * <p>A status message about the evaluation job deletion.</p>
6062
6004
  * @public
6063
6005
  */
6064
- interface $UnknownMember {
6065
- bedrockModel?: never;
6066
- precomputedInferenceSource?: never;
6067
- $unknown: [string, any];
6068
- }
6069
- /**
6070
- * @deprecated unused in schema-serde mode.
6071
- *
6072
- */
6073
- interface Visitor<T> {
6074
- bedrockModel: (value: EvaluationBedrockModel) => T;
6075
- precomputedInferenceSource: (value: EvaluationPrecomputedInferenceSource) => T;
6076
- _: (name: string, value: any) => T;
6077
- }
6006
+ message?: string | undefined;
6078
6007
  }
6079
6008
  /**
6080
- * <p>The configuration details for the guardrail.</p>
6009
+ * <p>An evaluation job for deletion, and it’s current status.</p>
6081
6010
  * @public
6082
6011
  */
6083
- export interface GuardrailConfiguration {
6012
+ export interface BatchDeleteEvaluationJobItem {
6084
6013
  /**
6085
- * <p>The unique identifier for the guardrail.</p>
6014
+ * <p>The Amazon Resource Name (ARN) of the evaluation job for deletion.</p>
6086
6015
  * @public
6087
6016
  */
6088
- guardrailId: string | undefined;
6017
+ jobIdentifier: string | undefined;
6089
6018
  /**
6090
- * <p>The version of the guardrail.</p>
6019
+ * <p>The status of the evaluation job for deletion.</p>
6091
6020
  * @public
6092
6021
  */
6093
- guardrailVersion: string | undefined;
6022
+ jobStatus: EvaluationJobStatus | undefined;
6094
6023
  }
6095
6024
  /**
6096
- * <p>The configuration details for text generation using a language model via the <code>RetrieveAndGenerate</code> function.</p>
6097
6025
  * @public
6098
6026
  */
6099
- export interface TextInferenceConfig {
6100
- /**
6101
- * <p>Controls the random-ness of text generated by the language model, influencing how much the model sticks to the most predictable next words versus exploring more surprising options. A lower temperature value (e.g. 0.2 or 0.3) makes model outputs more deterministic or predictable, while a higher temperature (e.g. 0.8 or 0.9) makes the outputs more creative or unpredictable.</p>
6102
- * @public
6103
- */
6104
- temperature?: number | undefined;
6105
- /**
6106
- * <p>A probability distribution threshold which controls what the model considers for the set of possible next tokens. The model will only consider the top p% of the probability distribution when generating the next token.</p>
6107
- * @public
6108
- */
6109
- topP?: number | undefined;
6027
+ export interface BatchDeleteEvaluationJobResponse {
6110
6028
  /**
6111
- * <p>The maximum number of tokens to generate in the output text. Do not use the minimum of 0 or the maximum of 65536. The limit values described here are arbitrary values, for actual values consult the limits defined by your specific model.</p>
6029
+ * <p>A JSON object containing the HTTP status codes and the ARNs of evaluation jobs that failed to be deleted.</p>
6112
6030
  * @public
6113
6031
  */
6114
- maxTokens?: number | undefined;
6032
+ errors: BatchDeleteEvaluationJobError[] | undefined;
6115
6033
  /**
6116
- * <p>A list of sequences of characters that, if generated, will cause the model to stop generating further tokens. Do not use a minimum length of 1 or a maximum length of 1000. The limit values described here are arbitrary values, for actual values consult the limits defined by your specific model.</p>
6034
+ * <p>The list of evaluation jobs for deletion.</p>
6117
6035
  * @public
6118
6036
  */
6119
- stopSequences?: string[] | undefined;
6037
+ evaluationJobs: BatchDeleteEvaluationJobItem[] | undefined;
6120
6038
  }
6121
6039
  /**
6122
- * <p>Contains configuration details of the inference for knowledge base retrieval and response generation.</p>
6040
+ * <p>Defines the value for one rating in a custom metric rating scale.</p>
6123
6041
  * @public
6124
6042
  */
6125
- export interface KbInferenceConfig {
6126
- /**
6127
- * <p>Contains configuration details for text generation using a language model via the <code>RetrieveAndGenerate</code> function.</p>
6128
- * @public
6129
- */
6130
- textInferenceConfig?: TextInferenceConfig | undefined;
6131
- }
6043
+ export type RatingScaleItemValue = RatingScaleItemValue.FloatValueMember | RatingScaleItemValue.StringValueMember | RatingScaleItemValue.$UnknownMember;
6132
6044
  /**
6133
- * <p>The template for the prompt that's sent to the model for response generation.</p>
6134
6045
  * @public
6135
6046
  */
6136
- export interface PromptTemplate {
6047
+ export declare namespace RatingScaleItemValue {
6137
6048
  /**
6138
- * <p>The template for the prompt that's sent to the model for response generation. You can include prompt placeholders, which become replaced before the prompt is sent to the model to provide instructions and context to the model. In addition, you can include XML tags to delineate meaningful sections of the prompt template.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Knowledge base prompt template</a> and <a href="https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/use-xml-tags">Use XML tags with Anthropic Claude models</a>.</p>
6049
+ * <p>A string representing the value for a rating in a custom metric rating scale.</p>
6139
6050
  * @public
6140
6051
  */
6141
- textPromptTemplate?: string | undefined;
6142
- }
6143
- /**
6144
- * <p>The response generation configuration of the external source wrapper object.</p>
6145
- * @public
6146
- */
6147
- export interface ExternalSourcesGenerationConfiguration {
6052
+ interface StringValueMember {
6053
+ stringValue: string;
6054
+ floatValue?: never;
6055
+ $unknown?: never;
6056
+ }
6148
6057
  /**
6149
- * <p>Contains the template for the prompt for the external source wrapper object.</p>
6058
+ * <p>A floating point number representing the value for a rating in a custom metric rating scale.</p>
6150
6059
  * @public
6151
6060
  */
6152
- promptTemplate?: PromptTemplate | undefined;
6061
+ interface FloatValueMember {
6062
+ stringValue?: never;
6063
+ floatValue: number;
6064
+ $unknown?: never;
6065
+ }
6153
6066
  /**
6154
- * <p>Configuration details for the guardrail.</p>
6155
6067
  * @public
6156
6068
  */
6157
- guardrailConfiguration?: GuardrailConfiguration | undefined;
6069
+ interface $UnknownMember {
6070
+ stringValue?: never;
6071
+ floatValue?: never;
6072
+ $unknown: [string, any];
6073
+ }
6158
6074
  /**
6159
- * <p>Configuration details for inference when using <code>RetrieveAndGenerate</code> to generate responses while using an external source.</p>
6075
+ * @deprecated unused in schema-serde mode.
6076
+ *
6077
+ */
6078
+ interface Visitor<T> {
6079
+ stringValue: (value: string) => T;
6080
+ floatValue: (value: number) => T;
6081
+ _: (name: string, value: any) => T;
6082
+ }
6083
+ }
6084
+ /**
6085
+ * <p>Defines the value and corresponding definition for one rating in a custom metric rating scale.</p>
6086
+ * @public
6087
+ */
6088
+ export interface RatingScaleItem {
6089
+ /**
6090
+ * <p>Defines the definition for one rating in a custom metric rating scale.</p>
6160
6091
  * @public
6161
6092
  */
6162
- kbInferenceConfig?: KbInferenceConfig | undefined;
6093
+ definition: string | undefined;
6163
6094
  /**
6164
- * <p>Additional model parameters and their corresponding values not included in the text inference configuration for an external source. Takes in custom model parameters specific to the language model being used.</p>
6095
+ * <p>Defines the value for one rating in a custom metric rating scale.</p>
6165
6096
  * @public
6166
6097
  */
6167
- additionalModelRequestFields?: Record<string, __DocumentType> | undefined;
6098
+ value: RatingScaleItemValue | undefined;
6168
6099
  }
6169
6100
  /**
6170
- * <p>Contains the document contained in the wrapper object, along with its attributes/fields.</p>
6101
+ * <p>The definition of a custom metric for use in an Amazon Bedrock evaluation job. A custom metric definition includes a metric name, prompt (instructions) and optionally, a rating scale. Your prompt must include a task description and input variables. The required input variables are different for model-as-a-judge and RAG evaluations.</p> <p>For more information about how to define a custom metric in Amazon Bedrock, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-custom-metrics-prompt-formats.html">Create a prompt for a custom metrics (LLM-as-a-judge model evaluations)</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-evaluation-custom-metrics-prompt-formats.html">Create a prompt for a custom metrics (RAG evaluations)</a>.</p>
6171
6102
  * @public
6172
6103
  */
6173
- export interface ByteContentDoc {
6104
+ export interface CustomMetricDefinition {
6174
6105
  /**
6175
- * <p>The file name of the document contained in the wrapper object.</p>
6106
+ * <p>The name for a custom metric. Names must be unique in your Amazon Web Services region.</p>
6176
6107
  * @public
6177
6108
  */
6178
- identifier: string | undefined;
6109
+ name: string | undefined;
6179
6110
  /**
6180
- * <p>The MIME type of the document contained in the wrapper object.</p>
6111
+ * <p>The prompt for a custom metric that instructs the evaluator model how to rate the model or RAG source under evaluation.</p>
6181
6112
  * @public
6182
6113
  */
6183
- contentType: string | undefined;
6114
+ instructions: string | undefined;
6184
6115
  /**
6185
- * <p>The byte value of the file to upload, encoded as a Base-64 string.</p>
6116
+ * <p>Defines the rating scale to be used for a custom metric. We recommend that you always define a ratings scale when creating a custom metric. If you don't define a scale, Amazon Bedrock won't be able to visually display the results of the evaluation in the console or calculate average values of numerical scores. For more information on specifying a rating scale, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-custom-metrics-prompt-formats.html#model-evaluation-custom-metrics-prompt-formats-schema">Specifying an output schema (rating scale)</a>.</p>
6186
6117
  * @public
6187
6118
  */
6188
- data: Uint8Array | undefined;
6119
+ ratingScale?: RatingScaleItem[] | undefined;
6189
6120
  }
6190
6121
  /**
6191
- * <p>The unique wrapper object of the document from the S3 location.</p>
6122
+ * <p>An array item definining a single custom metric for use in an Amazon Bedrock evaluation job.</p>
6192
6123
  * @public
6193
6124
  */
6194
- export interface S3ObjectDoc {
6195
- /**
6196
- * <p>The S3 URI location for the wrapper object of the document.</p>
6197
- * @public
6198
- */
6199
- uri: string | undefined;
6200
- }
6125
+ export type AutomatedEvaluationCustomMetricSource = AutomatedEvaluationCustomMetricSource.CustomMetricDefinitionMember | AutomatedEvaluationCustomMetricSource.$UnknownMember;
6201
6126
  /**
6202
- * <p>The unique external source of the content contained in the wrapper object.</p>
6203
6127
  * @public
6204
6128
  */
6205
- export interface ExternalSource {
6129
+ export declare namespace AutomatedEvaluationCustomMetricSource {
6206
6130
  /**
6207
- * <p>The source type of the external source wrapper object.</p>
6131
+ * <p>The definition of a custom metric for use in an Amazon Bedrock evaluation job.</p>
6208
6132
  * @public
6209
6133
  */
6210
- sourceType: ExternalSourceType | undefined;
6134
+ interface CustomMetricDefinitionMember {
6135
+ customMetricDefinition: CustomMetricDefinition;
6136
+ $unknown?: never;
6137
+ }
6211
6138
  /**
6212
- * <p>The S3 location of the external source wrapper object.</p>
6213
6139
  * @public
6214
6140
  */
6215
- s3Location?: S3ObjectDoc | undefined;
6141
+ interface $UnknownMember {
6142
+ customMetricDefinition?: never;
6143
+ $unknown: [string, any];
6144
+ }
6216
6145
  /**
6217
- * <p>The identifier, content type, and data of the external source wrapper object.</p>
6218
- * @public
6146
+ * @deprecated unused in schema-serde mode.
6147
+ *
6219
6148
  */
6220
- byteContent?: ByteContentDoc | undefined;
6149
+ interface Visitor<T> {
6150
+ customMetricDefinition: (value: CustomMetricDefinition) => T;
6151
+ _: (name: string, value: any) => T;
6152
+ }
6221
6153
  }
6222
6154
  /**
6223
- * <p>The configuration of the external source wrapper object in the <code>retrieveAndGenerate</code> function.</p>
6155
+ * <p>Defines the model you want to evaluate custom metrics in an Amazon Bedrock evaluation job.</p>
6224
6156
  * @public
6225
6157
  */
6226
- export interface ExternalSourcesRetrieveAndGenerateConfiguration {
6227
- /**
6228
- * <p>The Amazon Resource Name (ARN) of the foundation model or <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html">inference profile</a> used to generate responses. </p>
6229
- * @public
6230
- */
6231
- modelArn: string | undefined;
6232
- /**
6233
- * <p>The document for the external source wrapper object in the <code>retrieveAndGenerate</code> function.</p>
6234
- * @public
6235
- */
6236
- sources: ExternalSource[] | undefined;
6158
+ export interface CustomMetricBedrockEvaluatorModel {
6237
6159
  /**
6238
- * <p>Contains configurations details for response generation based on retrieved text chunks.</p>
6160
+ * <p>The Amazon Resource Name (ARN) of the evaluator model for custom metrics. For a list of supported evaluator models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/evaluation-judge.html">Evaluate model performance using another LLM as a judge</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/evaluation-kb.html">Evaluate the performance of RAG sources using Amazon Bedrock evaluations</a>.</p>
6239
6161
  * @public
6240
6162
  */
6241
- generationConfiguration?: ExternalSourcesGenerationConfiguration | undefined;
6163
+ modelIdentifier: string | undefined;
6242
6164
  }
6243
6165
  /**
6244
- * <p>The configuration details for response generation based on retrieved text chunks.</p>
6166
+ * <p>Configuration of the evaluator model you want to use to evaluate custom metrics in an Amazon Bedrock evaluation job.</p>
6245
6167
  * @public
6246
6168
  */
6247
- export interface GenerationConfiguration {
6248
- /**
6249
- * <p>Contains the template for the prompt that's sent to the model for response generation.</p>
6250
- * @public
6251
- */
6252
- promptTemplate?: PromptTemplate | undefined;
6169
+ export interface CustomMetricEvaluatorModelConfig {
6253
6170
  /**
6254
- * <p>Contains configuration details for the guardrail.</p>
6171
+ * <p>Defines the model you want to evaluate custom metrics in an Amazon Bedrock evaluation job.</p>
6255
6172
  * @public
6256
6173
  */
6257
- guardrailConfiguration?: GuardrailConfiguration | undefined;
6174
+ bedrockEvaluatorModels: CustomMetricBedrockEvaluatorModel[] | undefined;
6175
+ }
6176
+ /**
6177
+ * <p>Defines the configuration of custom metrics to be used in an evaluation job. To learn more about using custom metrics in Amazon Bedrock evaluation jobs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-custom-metrics-prompt-formats.html">Create a prompt for a custom metrics (LLM-as-a-judge model evaluations)</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-evaluation-custom-metrics-prompt-formats.html">Create a prompt for a custom metrics (RAG evaluations)</a>.</p>
6178
+ * @public
6179
+ */
6180
+ export interface AutomatedEvaluationCustomMetricConfig {
6258
6181
  /**
6259
- * <p>Contains configuration details for inference for knowledge base retrieval and response generation.</p>
6182
+ * <p>Defines a list of custom metrics to be used in an Amazon Bedrock evaluation job.</p>
6260
6183
  * @public
6261
6184
  */
6262
- kbInferenceConfig?: KbInferenceConfig | undefined;
6185
+ customMetrics: AutomatedEvaluationCustomMetricSource[] | undefined;
6263
6186
  /**
6264
- * <p>Additional model parameters and corresponding values not included in the <code>textInferenceConfig</code> structure for a knowledge base. This allows you to provide custom model parameters specific to the language model being used.</p>
6187
+ * <p>Configuration of the evaluator model you want to use to evaluate custom metrics in an Amazon Bedrock evaluation job.</p>
6265
6188
  * @public
6266
6189
  */
6267
- additionalModelRequestFields?: Record<string, __DocumentType> | undefined;
6190
+ evaluatorModelConfig: CustomMetricEvaluatorModelConfig | undefined;
6268
6191
  }
6269
6192
  /**
6270
- * <p>The configuration details for transforming the prompt.</p>
6193
+ * <p>The location in Amazon S3 where your prompt dataset is stored.</p>
6271
6194
  * @public
6272
6195
  */
6273
- export interface QueryTransformationConfiguration {
6274
- /**
6275
- * <p>The type of transformation to apply to the prompt.</p>
6276
- * @public
6277
- */
6278
- type: QueryTransformationType | undefined;
6279
- }
6196
+ export type EvaluationDatasetLocation = EvaluationDatasetLocation.S3UriMember | EvaluationDatasetLocation.$UnknownMember;
6280
6197
  /**
6281
- * <p>The configuration details for the model to process the prompt prior to retrieval and response generation.</p>
6282
6198
  * @public
6283
6199
  */
6284
- export interface OrchestrationConfiguration {
6200
+ export declare namespace EvaluationDatasetLocation {
6285
6201
  /**
6286
- * <p>Contains configuration details for transforming the prompt.</p>
6202
+ * <p>The S3 URI of the S3 bucket specified in the job.</p>
6287
6203
  * @public
6288
6204
  */
6289
- queryTransformationConfiguration: QueryTransformationConfiguration | undefined;
6290
- }
6291
- /**
6292
- * <p>Specifies the name of the metadata attribute/field to apply filters. You must match the name of the attribute/field in your data source/document metadata.</p>
6293
- * @public
6294
- */
6295
- export interface FilterAttribute {
6205
+ interface S3UriMember {
6206
+ s3Uri: string;
6207
+ $unknown?: never;
6208
+ }
6296
6209
  /**
6297
- * <p>The name of metadata attribute/field, which must match the name in your data source/document metadata.</p>
6298
6210
  * @public
6299
6211
  */
6300
- key: string | undefined;
6212
+ interface $UnknownMember {
6213
+ s3Uri?: never;
6214
+ $unknown: [string, any];
6215
+ }
6301
6216
  /**
6302
- * <p>The value of the metadata attribute/field.</p>
6303
- * @public
6217
+ * @deprecated unused in schema-serde mode.
6218
+ *
6304
6219
  */
6305
- value: __DocumentType | undefined;
6220
+ interface Visitor<T> {
6221
+ s3Uri: (value: string) => T;
6222
+ _: (name: string, value: any) => T;
6223
+ }
6306
6224
  }
6307
6225
  /**
6308
- * <p>Defines the schema for a metadata attribute used in Knowledge Base vector searches. Metadata attributes provide additional context for documents and can be used for filtering and reranking search results.</p>
6226
+ * <p>Used to specify the name of a built-in prompt dataset and optionally, the Amazon S3 bucket where a custom prompt dataset is saved.</p>
6309
6227
  * @public
6310
6228
  */
6311
- export interface MetadataAttributeSchema {
6312
- /**
6313
- * <p>The unique identifier for the metadata attribute. This key is used to reference the attribute in filter expressions and reranking configurations.</p>
6314
- * @public
6315
- */
6316
- key: string | undefined;
6229
+ export interface EvaluationDataset {
6317
6230
  /**
6318
- * <p>The data type of the metadata attribute. The type determines how the attribute can be used in filter expressions and reranking.</p>
6231
+ * <p>Used to specify supported built-in prompt datasets. Valid values are <code>Builtin.Bold</code>, <code>Builtin.BoolQ</code>, <code>Builtin.NaturalQuestions</code>, <code>Builtin.Gigaword</code>, <code>Builtin.RealToxicityPrompts</code>, <code>Builtin.TriviaQA</code>, <code>Builtin.T-Rex</code>, <code>Builtin.WomensEcommerceClothingReviews</code> and <code>Builtin.Wikitext2</code>.</p>
6319
6232
  * @public
6320
6233
  */
6321
- type: AttributeType | undefined;
6234
+ name: string | undefined;
6322
6235
  /**
6323
- * <p>An optional description of the metadata attribute that provides additional context about its purpose and usage.</p>
6236
+ * <p>For custom prompt datasets, you must specify the location in Amazon S3 where the prompt dataset is saved.</p>
6324
6237
  * @public
6325
6238
  */
6326
- description: string | undefined;
6239
+ datasetLocation?: EvaluationDatasetLocation | undefined;
6327
6240
  }
6328
6241
  /**
6329
- * <p>Configuration for implicit filtering in Knowledge Base vector searches. Implicit filtering allows you to automatically filter search results based on metadata attributes without requiring explicit filter expressions in each query.</p>
6242
+ * <p>Defines the prompt datasets, built-in metric names and custom metric names, and the task type.</p>
6330
6243
  * @public
6331
6244
  */
6332
- export interface ImplicitFilterConfiguration {
6245
+ export interface EvaluationDatasetMetricConfig {
6333
6246
  /**
6334
- * <p>A list of metadata attribute schemas that define the structure and properties of metadata fields used for implicit filtering. Each attribute defines a key, type, and optional description.</p>
6247
+ * <p>The the type of task you want to evaluate for your evaluation job. This applies only to model evaluation jobs and is ignored for knowledge base evaluation jobs.</p>
6335
6248
  * @public
6336
6249
  */
6337
- metadataAttributes: MetadataAttributeSchema[] | undefined;
6250
+ taskType: EvaluationTaskType | undefined;
6338
6251
  /**
6339
- * <p>The Amazon Resource Name (ARN) of the foundation model used for implicit filtering. This model processes the query to extract relevant filtering criteria.</p>
6252
+ * <p>Specifies the prompt dataset.</p>
6340
6253
  * @public
6341
6254
  */
6342
- modelArn: string | undefined;
6255
+ dataset: EvaluationDataset | undefined;
6256
+ /**
6257
+ * <p>The names of the metrics you want to use for your evaluation job.</p> <p>For knowledge base evaluation jobs that evaluate retrieval only, valid values are "<code>Builtin.ContextRelevance</code>", "<code>Builtin.ContextCoverage</code>".</p> <p>For knowledge base evaluation jobs that evaluate retrieval with response generation, valid values are "<code>Builtin.Correctness</code>", "<code>Builtin.Completeness</code>", "<code>Builtin.Helpfulness</code>", "<code>Builtin.LogicalCoherence</code>", "<code>Builtin.Faithfulness</code>", "<code>Builtin.Harmfulness</code>", "<code>Builtin.Stereotyping</code>", "<code>Builtin.Refusal</code>".</p> <p>For automated model evaluation jobs, valid values are "<code>Builtin.Accuracy</code>", "<code>Builtin.Robustness</code>", and "<code>Builtin.Toxicity</code>". In model evaluation jobs that use a LLM as judge you can specify "<code>Builtin.Correctness</code>", "<code>Builtin.Completeness"</code>, "<code>Builtin.Faithfulness"</code>, "<code>Builtin.Helpfulness</code>", "<code>Builtin.Coherence</code>", "<code>Builtin.Relevance</code>", "<code>Builtin.FollowingInstructions</code>", "<code>Builtin.ProfessionalStyleAndTone</code>", You can also specify the following responsible AI related metrics only for model evaluation job that use a LLM as judge "<code>Builtin.Harmfulness</code>", "<code>Builtin.Stereotyping</code>", and "<code>Builtin.Refusal</code>".</p> <p>For human-based model evaluation jobs, the list of strings must match the <code>name</code> parameter specified in <code>HumanEvaluationCustomMetric</code>.</p>
6258
+ * @public
6259
+ */
6260
+ metricNames: string[] | undefined;
6343
6261
  }
6344
6262
  /**
6345
- * <p>Specifies a field to be used during the reranking process in a Knowledge Base vector search. This structure identifies metadata fields that should be considered when reordering search results to improve relevance.</p>
6263
+ * <p>The evaluator model used in knowledge base evaluation job or in model evaluation job that use a model as judge. This model computes all evaluation related metrics.</p>
6346
6264
  * @public
6347
6265
  */
6348
- export interface FieldForReranking {
6266
+ export interface BedrockEvaluatorModel {
6349
6267
  /**
6350
- * <p>The name of the metadata field to be used during the reranking process.</p>
6268
+ * <p>The Amazon Resource Name (ARN) of the evaluator model used used in knowledge base evaluation job or in model evaluation job that use a model as judge.</p>
6351
6269
  * @public
6352
6270
  */
6353
- fieldName: string | undefined;
6271
+ modelIdentifier: string | undefined;
6354
6272
  }
6355
6273
  /**
6356
- * <p>Configuration for selectively including or excluding metadata fields during the reranking process. This allows you to control which metadata attributes are considered when reordering search results.</p>
6274
+ * <p>Specifies the model configuration for the evaluator model. <code>EvaluatorModelConfig</code> is required for evaluation jobs that use a knowledge base or in model evaluation job that use a model as judge. This model computes all evaluation related metrics.</p>
6357
6275
  * @public
6358
6276
  */
6359
- export type RerankingMetadataSelectiveModeConfiguration = RerankingMetadataSelectiveModeConfiguration.FieldsToExcludeMember | RerankingMetadataSelectiveModeConfiguration.FieldsToIncludeMember | RerankingMetadataSelectiveModeConfiguration.$UnknownMember;
6277
+ export type EvaluatorModelConfig = EvaluatorModelConfig.BedrockEvaluatorModelsMember | EvaluatorModelConfig.$UnknownMember;
6360
6278
  /**
6361
6279
  * @public
6362
6280
  */
6363
- export declare namespace RerankingMetadataSelectiveModeConfiguration {
6364
- /**
6365
- * <p>A list of metadata field names to explicitly include in the reranking process. Only these fields will be considered when reordering search results. This parameter cannot be used together with fieldsToExclude.</p>
6366
- * @public
6367
- */
6368
- interface FieldsToIncludeMember {
6369
- fieldsToInclude: FieldForReranking[];
6370
- fieldsToExclude?: never;
6371
- $unknown?: never;
6372
- }
6281
+ export declare namespace EvaluatorModelConfig {
6373
6282
  /**
6374
- * <p>A list of metadata field names to explicitly exclude from the reranking process. All metadata fields except these will be considered when reordering search results. This parameter cannot be used together with fieldsToInclude.</p>
6283
+ * <p>The evaluator model used in knowledge base evaluation job or in model evaluation job that use a model as judge. This model computes all evaluation related metrics.</p>
6375
6284
  * @public
6376
6285
  */
6377
- interface FieldsToExcludeMember {
6378
- fieldsToInclude?: never;
6379
- fieldsToExclude: FieldForReranking[];
6286
+ interface BedrockEvaluatorModelsMember {
6287
+ bedrockEvaluatorModels: BedrockEvaluatorModel[];
6380
6288
  $unknown?: never;
6381
6289
  }
6382
6290
  /**
6383
6291
  * @public
6384
6292
  */
6385
6293
  interface $UnknownMember {
6386
- fieldsToInclude?: never;
6387
- fieldsToExclude?: never;
6294
+ bedrockEvaluatorModels?: never;
6388
6295
  $unknown: [string, any];
6389
6296
  }
6390
6297
  /**
@@ -6392,135 +6299,122 @@ export declare namespace RerankingMetadataSelectiveModeConfiguration {
6392
6299
  *
6393
6300
  */
6394
6301
  interface Visitor<T> {
6395
- fieldsToInclude: (value: FieldForReranking[]) => T;
6396
- fieldsToExclude: (value: FieldForReranking[]) => T;
6302
+ bedrockEvaluatorModels: (value: BedrockEvaluatorModel[]) => T;
6397
6303
  _: (name: string, value: any) => T;
6398
6304
  }
6399
6305
  }
6400
6306
  /**
6401
- * <p>Configuration for how metadata should be used during the reranking process in Knowledge Base vector searches. This determines which metadata fields are included or excluded when reordering search results.</p>
6307
+ * <p>The configuration details of an automated evaluation job. The <code>EvaluationDatasetMetricConfig</code> object is used to specify the prompt datasets, task type, and metric names.</p>
6402
6308
  * @public
6403
6309
  */
6404
- export interface MetadataConfigurationForReranking {
6405
- /**
6406
- * <p>The mode for selecting which metadata fields to include in the reranking process. Valid values are ALL (use all available metadata fields) or SELECTIVE (use only specified fields).</p>
6407
- * @public
6408
- */
6409
- selectionMode: RerankingMetadataSelectionMode | undefined;
6310
+ export interface AutomatedEvaluationConfig {
6410
6311
  /**
6411
- * <p>Configuration for selective mode, which allows you to explicitly include or exclude specific metadata fields during reranking. This is only used when selectionMode is set to SELECTIVE.</p>
6312
+ * <p>Configuration details of the prompt datasets and metrics you want to use for your evaluation job.</p>
6412
6313
  * @public
6413
6314
  */
6414
- selectiveModeConfiguration?: RerankingMetadataSelectiveModeConfiguration | undefined;
6415
- }
6416
- /**
6417
- * <p>Configuration for the Amazon Bedrock foundation model used for reranking vector search results. This specifies which model to use and any additional parameters required by the model.</p>
6418
- * @public
6419
- */
6420
- export interface VectorSearchBedrockRerankingModelConfiguration {
6315
+ datasetMetricConfigs: EvaluationDatasetMetricConfig[] | undefined;
6421
6316
  /**
6422
- * <p>The Amazon Resource Name (ARN) of the foundation model to use for reranking. This model processes the query and search results to determine a more relevant ordering.</p>
6317
+ * <p>Contains the evaluator model configuration details. <code>EvaluatorModelConfig</code> is required for evaluation jobs that use a knowledge base or in model evaluation job that use a model as judge. This model computes all evaluation related metrics.</p>
6423
6318
  * @public
6424
6319
  */
6425
- modelArn: string | undefined;
6320
+ evaluatorModelConfig?: EvaluatorModelConfig | undefined;
6426
6321
  /**
6427
- * <p>A list of additional fields to include in the model request during reranking. These fields provide extra context or configuration options specific to the selected foundation model.</p>
6322
+ * <p>Defines the configuration of custom metrics to be used in an evaluation job.</p>
6428
6323
  * @public
6429
6324
  */
6430
- additionalModelRequestFields?: Record<string, __DocumentType> | undefined;
6325
+ customMetricConfig?: AutomatedEvaluationCustomMetricConfig | undefined;
6431
6326
  }
6432
6327
  /**
6433
- * <p>Configuration for using Amazon Bedrock foundation models to rerank Knowledge Base vector search results. This enables more sophisticated relevance ranking using large language models.</p>
6328
+ * <p>In a model evaluation job that uses human workers you must define the name of the metric, and how you want that metric rated <code>ratingMethod</code>, and an optional description of the metric.</p>
6434
6329
  * @public
6435
6330
  */
6436
- export interface VectorSearchBedrockRerankingConfiguration {
6331
+ export interface HumanEvaluationCustomMetric {
6437
6332
  /**
6438
- * <p>Configuration for the Amazon Bedrock foundation model used for reranking. This includes the model ARN and any additional request fields required by the model.</p>
6333
+ * <p>The name of the metric. Your human evaluators will see this name in the evaluation UI.</p>
6439
6334
  * @public
6440
6335
  */
6441
- modelConfiguration: VectorSearchBedrockRerankingModelConfiguration | undefined;
6336
+ name: string | undefined;
6442
6337
  /**
6443
- * <p>The maximum number of results to rerank. This limits how many of the initial vector search results will be processed by the reranking model. A smaller number improves performance but may exclude potentially relevant results.</p>
6338
+ * <p>An optional description of the metric. Use this parameter to provide more details about the metric.</p>
6444
6339
  * @public
6445
6340
  */
6446
- numberOfRerankedResults?: number | undefined;
6341
+ description?: string | undefined;
6447
6342
  /**
6448
- * <p>Configuration for how document metadata should be used during the reranking process. This determines which metadata fields are included when reordering search results.</p>
6343
+ * <p>Choose how you want your human workers to evaluation your model. Valid values for rating methods are <code>ThumbsUpDown</code>, <code>IndividualLikertScale</code>,<code>ComparisonLikertScale</code>, <code>ComparisonChoice</code>, and <code>ComparisonRank</code> </p>
6449
6344
  * @public
6450
6345
  */
6451
- metadataConfiguration?: MetadataConfigurationForReranking | undefined;
6346
+ ratingMethod: string | undefined;
6452
6347
  }
6453
6348
  /**
6454
- * <p>Configuration for reranking vector search results to improve relevance. Reranking applies additional relevance models to reorder the initial vector search results based on more sophisticated criteria.</p>
6349
+ * <p>Contains <code>SageMakerFlowDefinition</code> object. The object is used to specify the prompt dataset, task type, rating method and metric names.</p>
6455
6350
  * @public
6456
6351
  */
6457
- export interface VectorSearchRerankingConfiguration {
6352
+ export interface HumanWorkflowConfig {
6458
6353
  /**
6459
- * <p>The type of reranking to apply to vector search results. Currently, the only supported value is BEDROCK, which uses Amazon Bedrock foundation models for reranking.</p>
6354
+ * <p>The Amazon Resource Number (ARN) for the flow definition</p>
6460
6355
  * @public
6461
6356
  */
6462
- type: VectorSearchRerankingConfigurationType | undefined;
6357
+ flowDefinitionArn: string | undefined;
6463
6358
  /**
6464
- * <p>Configuration for using Amazon Bedrock foundation models to rerank search results. This is required when the reranking type is set to BEDROCK.</p>
6359
+ * <p>Instructions for the flow definition</p>
6465
6360
  * @public
6466
6361
  */
6467
- bedrockRerankingConfiguration?: VectorSearchBedrockRerankingConfiguration | undefined;
6362
+ instructions?: string | undefined;
6468
6363
  }
6469
6364
  /**
6470
- * <p>A summary of a RAG source used for a retrieve-and-generate Knowledge Base evaluation job where you provide your own inference response data.</p>
6365
+ * <p>Specifies the custom metrics, how tasks will be rated, the flow definition ARN, and your custom prompt datasets. Model evaluation jobs use human workers <i>only</i> support the use of custom prompt datasets. To learn more about custom prompt datasets and the required format, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-prompt-datasets-custom.html">Custom prompt datasets</a>.</p> <p>When you create custom metrics in <code>HumanEvaluationCustomMetric</code> you must specify the metric's <code>name</code>. The list of <code>names</code> specified in the <code>HumanEvaluationCustomMetric</code> array, must match the <code>metricNames</code> array of strings specified in <code>EvaluationDatasetMetricConfig</code>. For example, if in the <code>HumanEvaluationCustomMetric</code> array your specified the names <code>"accuracy", "toxicity", "readability"</code> as custom metrics <i>then</i> the <code>metricNames</code> array would need to look like the following <code>["accuracy", "toxicity", "readability"]</code> in <code>EvaluationDatasetMetricConfig</code>.</p>
6471
6366
  * @public
6472
6367
  */
6473
- export interface EvaluationPrecomputedRetrieveAndGenerateSourceConfig {
6368
+ export interface HumanEvaluationConfig {
6474
6369
  /**
6475
- * <p>A label that identifies the RAG source used for a retrieve-and-generate Knowledge Base evaluation job where you provide your own inference response data.</p>
6370
+ * <p>The parameters of the human workflow.</p>
6476
6371
  * @public
6477
6372
  */
6478
- ragSourceIdentifier: string | undefined;
6479
- }
6480
- /**
6481
- * <p>A summary of a RAG source used for a retrieve-only Knowledge Base evaluation job where you provide your own inference response data.</p>
6482
- * @public
6483
- */
6484
- export interface EvaluationPrecomputedRetrieveSourceConfig {
6373
+ humanWorkflowConfig?: HumanWorkflowConfig | undefined;
6485
6374
  /**
6486
- * <p>A label that identifies the RAG source used for a retrieve-only Knowledge Base evaluation job where you provide your own inference response data.</p>
6375
+ * <p>A <code>HumanEvaluationCustomMetric</code> object. It contains the names the metrics, how the metrics are to be evaluated, an optional description.</p>
6487
6376
  * @public
6488
6377
  */
6489
- ragSourceIdentifier: string | undefined;
6378
+ customMetrics?: HumanEvaluationCustomMetric[] | undefined;
6379
+ /**
6380
+ * <p>Use to specify the metrics, task, and prompt dataset to be used in your model evaluation job.</p>
6381
+ * @public
6382
+ */
6383
+ datasetMetricConfigs: EvaluationDatasetMetricConfig[] | undefined;
6490
6384
  }
6491
6385
  /**
6492
- * <p>A summary of a RAG source used for a Knowledge Base evaluation job where you provide your own inference response data.</p>
6386
+ * <p>The configuration details of either an automated or human-based evaluation job.</p>
6493
6387
  * @public
6494
6388
  */
6495
- export type EvaluationPrecomputedRagSourceConfig = EvaluationPrecomputedRagSourceConfig.RetrieveAndGenerateSourceConfigMember | EvaluationPrecomputedRagSourceConfig.RetrieveSourceConfigMember | EvaluationPrecomputedRagSourceConfig.$UnknownMember;
6389
+ export type EvaluationConfig = EvaluationConfig.AutomatedMember | EvaluationConfig.HumanMember | EvaluationConfig.$UnknownMember;
6496
6390
  /**
6497
6391
  * @public
6498
6392
  */
6499
- export declare namespace EvaluationPrecomputedRagSourceConfig {
6393
+ export declare namespace EvaluationConfig {
6500
6394
  /**
6501
- * <p>A summary of a RAG source used for a retrieve-only Knowledge Base evaluation job where you provide your own inference response data.</p>
6395
+ * <p>Contains the configuration details of an automated evaluation job that computes metrics.</p>
6502
6396
  * @public
6503
6397
  */
6504
- interface RetrieveSourceConfigMember {
6505
- retrieveSourceConfig: EvaluationPrecomputedRetrieveSourceConfig;
6506
- retrieveAndGenerateSourceConfig?: never;
6398
+ interface AutomatedMember {
6399
+ automated: AutomatedEvaluationConfig;
6400
+ human?: never;
6507
6401
  $unknown?: never;
6508
6402
  }
6509
6403
  /**
6510
- * <p>A summary of a RAG source used for a retrieve-and-generate Knowledge Base evaluation job where you provide your own inference response data.</p>
6404
+ * <p>Contains the configuration details of an evaluation job that uses human workers.</p>
6511
6405
  * @public
6512
6406
  */
6513
- interface RetrieveAndGenerateSourceConfigMember {
6514
- retrieveSourceConfig?: never;
6515
- retrieveAndGenerateSourceConfig: EvaluationPrecomputedRetrieveAndGenerateSourceConfig;
6407
+ interface HumanMember {
6408
+ automated?: never;
6409
+ human: HumanEvaluationConfig;
6516
6410
  $unknown?: never;
6517
6411
  }
6518
6412
  /**
6519
6413
  * @public
6520
6414
  */
6521
6415
  interface $UnknownMember {
6522
- retrieveSourceConfig?: never;
6523
- retrieveAndGenerateSourceConfig?: never;
6416
+ automated?: never;
6417
+ human?: never;
6524
6418
  $unknown: [string, any];
6525
6419
  }
6526
6420
  /**
@@ -6528,395 +6422,553 @@ export declare namespace EvaluationPrecomputedRagSourceConfig {
6528
6422
  *
6529
6423
  */
6530
6424
  interface Visitor<T> {
6531
- retrieveSourceConfig: (value: EvaluationPrecomputedRetrieveSourceConfig) => T;
6532
- retrieveAndGenerateSourceConfig: (value: EvaluationPrecomputedRetrieveAndGenerateSourceConfig) => T;
6425
+ automated: (value: AutomatedEvaluationConfig) => T;
6426
+ human: (value: HumanEvaluationConfig) => T;
6533
6427
  _: (name: string, value: any) => T;
6534
6428
  }
6535
6429
  }
6536
6430
  /**
6537
- * <p>The Amazon S3 location where the results of your evaluation job are saved.</p>
6431
+ * <p>Contains performance settings for a model.</p>
6538
6432
  * @public
6539
6433
  */
6540
- export interface EvaluationOutputDataConfig {
6434
+ export interface PerformanceConfiguration {
6541
6435
  /**
6542
- * <p>The Amazon S3 URI where the results of the evaluation job are saved.</p>
6436
+ * <p>Specifies whether to use the latency-optimized or standard version of a model or inference profile.</p>
6543
6437
  * @public
6544
6438
  */
6545
- s3Uri: string | undefined;
6439
+ latency?: PerformanceConfigLatency | undefined;
6546
6440
  }
6547
6441
  /**
6442
+ * <p>Contains the ARN of the Amazon Bedrock model or <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html">inference profile</a> specified in your evaluation job. Each Amazon Bedrock model supports different <code>inferenceParams</code>. To learn more about supported inference parameters for Amazon Bedrock models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters for foundation models</a>.</p> <p>The <code>inferenceParams</code> are specified using JSON. To successfully insert JSON as string make sure that all quotations are properly escaped. For example, <code>"temperature":"0.25"</code> key value pair would need to be formatted as <code>\"temperature\":\"0.25\"</code> to successfully accepted in the request.</p>
6548
6443
  * @public
6549
6444
  */
6550
- export interface CreateEvaluationJobResponse {
6445
+ export interface EvaluationBedrockModel {
6446
+ /**
6447
+ * <p>The ARN of the Amazon Bedrock model or inference profile specified.</p>
6448
+ * @public
6449
+ */
6450
+ modelIdentifier: string | undefined;
6551
6451
  /**
6552
- * <p>The Amazon Resource Name (ARN) of the evaluation job.</p>
6452
+ * <p>Each Amazon Bedrock support different inference parameters that change how the model behaves during inference.</p>
6553
6453
  * @public
6554
6454
  */
6555
- jobArn: string | undefined;
6455
+ inferenceParams?: string | undefined;
6456
+ /**
6457
+ * <p>Specifies performance settings for the model or inference profile.</p>
6458
+ * @public
6459
+ */
6460
+ performanceConfig?: PerformanceConfiguration | undefined;
6556
6461
  }
6557
6462
  /**
6463
+ * <p>A summary of a model used for a model evaluation job where you provide your own inference response data.</p>
6558
6464
  * @public
6559
6465
  */
6560
- export interface GetEvaluationJobRequest {
6466
+ export interface EvaluationPrecomputedInferenceSource {
6561
6467
  /**
6562
- * <p>The Amazon Resource Name (ARN) of the evaluation job you want get information on.</p>
6468
+ * <p>A label that identifies a model used in a model evaluation job where you provide your own inference response data.</p>
6563
6469
  * @public
6564
6470
  */
6565
- jobIdentifier: string | undefined;
6471
+ inferenceSourceIdentifier: string | undefined;
6566
6472
  }
6473
+ /**
6474
+ * <p>Defines the models used in the model evaluation job.</p>
6475
+ * @public
6476
+ */
6477
+ export type EvaluationModelConfig = EvaluationModelConfig.BedrockModelMember | EvaluationModelConfig.PrecomputedInferenceSourceMember | EvaluationModelConfig.$UnknownMember;
6567
6478
  /**
6568
6479
  * @public
6569
6480
  */
6570
- export interface ListEvaluationJobsRequest {
6481
+ export declare namespace EvaluationModelConfig {
6571
6482
  /**
6572
- * <p>A filter to only list evaluation jobs created after a specified time.</p>
6483
+ * <p>Defines the Amazon Bedrock model or inference profile and inference parameters you want used.</p>
6573
6484
  * @public
6574
6485
  */
6575
- creationTimeAfter?: Date | undefined;
6486
+ interface BedrockModelMember {
6487
+ bedrockModel: EvaluationBedrockModel;
6488
+ precomputedInferenceSource?: never;
6489
+ $unknown?: never;
6490
+ }
6576
6491
  /**
6577
- * <p>A filter to only list evaluation jobs created before a specified time.</p>
6492
+ * <p>Defines the model used to generate inference response data for a model evaluation job where you provide your own inference response data.</p>
6578
6493
  * @public
6579
6494
  */
6580
- creationTimeBefore?: Date | undefined;
6495
+ interface PrecomputedInferenceSourceMember {
6496
+ bedrockModel?: never;
6497
+ precomputedInferenceSource: EvaluationPrecomputedInferenceSource;
6498
+ $unknown?: never;
6499
+ }
6581
6500
  /**
6582
- * <p>A filter to only list evaluation jobs that are of a certain status.</p>
6583
6501
  * @public
6584
6502
  */
6585
- statusEquals?: EvaluationJobStatus | undefined;
6503
+ interface $UnknownMember {
6504
+ bedrockModel?: never;
6505
+ precomputedInferenceSource?: never;
6506
+ $unknown: [string, any];
6507
+ }
6508
+ /**
6509
+ * @deprecated unused in schema-serde mode.
6510
+ *
6511
+ */
6512
+ interface Visitor<T> {
6513
+ bedrockModel: (value: EvaluationBedrockModel) => T;
6514
+ precomputedInferenceSource: (value: EvaluationPrecomputedInferenceSource) => T;
6515
+ _: (name: string, value: any) => T;
6516
+ }
6517
+ }
6518
+ /**
6519
+ * <p>The configuration details for the guardrail.</p>
6520
+ * @public
6521
+ */
6522
+ export interface GuardrailConfiguration {
6586
6523
  /**
6587
- * <p>A filter to only list evaluation jobs that are either model evaluations or knowledge base evaluations.</p>
6524
+ * <p>The unique identifier for the guardrail.</p>
6588
6525
  * @public
6589
6526
  */
6590
- applicationTypeEquals?: ApplicationType | undefined;
6527
+ guardrailId: string | undefined;
6591
6528
  /**
6592
- * <p>A filter to only list evaluation jobs that contain a specified string in the job name.</p>
6529
+ * <p>The version of the guardrail.</p>
6593
6530
  * @public
6594
6531
  */
6595
- nameContains?: string | undefined;
6532
+ guardrailVersion: string | undefined;
6533
+ }
6534
+ /**
6535
+ * <p>The configuration details for text generation using a language model via the <code>RetrieveAndGenerate</code> function.</p>
6536
+ * @public
6537
+ */
6538
+ export interface TextInferenceConfig {
6596
6539
  /**
6597
- * <p>The maximum number of results to return.</p>
6540
+ * <p>Controls the random-ness of text generated by the language model, influencing how much the model sticks to the most predictable next words versus exploring more surprising options. A lower temperature value (e.g. 0.2 or 0.3) makes model outputs more deterministic or predictable, while a higher temperature (e.g. 0.8 or 0.9) makes the outputs more creative or unpredictable.</p>
6598
6541
  * @public
6599
6542
  */
6600
- maxResults?: number | undefined;
6543
+ temperature?: number | undefined;
6601
6544
  /**
6602
- * <p>Continuation token from the previous response, for Amazon Bedrock to list the next set of results.</p>
6545
+ * <p>A probability distribution threshold which controls what the model considers for the set of possible next tokens. The model will only consider the top p% of the probability distribution when generating the next token.</p>
6603
6546
  * @public
6604
6547
  */
6605
- nextToken?: string | undefined;
6548
+ topP?: number | undefined;
6606
6549
  /**
6607
- * <p>Specifies a creation time to sort the list of evaluation jobs by when they were created.</p>
6550
+ * <p>The maximum number of tokens to generate in the output text. Do not use the minimum of 0 or the maximum of 65536. The limit values described here are arbitrary values, for actual values consult the limits defined by your specific model.</p>
6608
6551
  * @public
6609
6552
  */
6610
- sortBy?: SortJobsBy | undefined;
6553
+ maxTokens?: number | undefined;
6611
6554
  /**
6612
- * <p>Specifies whether to sort the list of evaluation jobs by either ascending or descending order.</p>
6555
+ * <p>A list of sequences of characters that, if generated, will cause the model to stop generating further tokens. Do not use a minimum length of 1 or a maximum length of 1000. The limit values described here are arbitrary values, for actual values consult the limits defined by your specific model.</p>
6613
6556
  * @public
6614
6557
  */
6615
- sortOrder?: SortOrder | undefined;
6558
+ stopSequences?: string[] | undefined;
6616
6559
  }
6617
6560
  /**
6618
- * <p>A summary of the models used in an Amazon Bedrock model evaluation job. These resources can be models in Amazon Bedrock or models outside of Amazon Bedrock that you use to generate your own inference response data.</p>
6561
+ * <p>Contains configuration details of the inference for knowledge base retrieval and response generation.</p>
6619
6562
  * @public
6620
6563
  */
6621
- export interface EvaluationModelConfigSummary {
6564
+ export interface KbInferenceConfig {
6622
6565
  /**
6623
- * <p>The Amazon Resource Names (ARNs) of the models used for the evaluation job.</p>
6566
+ * <p>Contains configuration details for text generation using a language model via the <code>RetrieveAndGenerate</code> function.</p>
6624
6567
  * @public
6625
6568
  */
6626
- bedrockModelIdentifiers?: string[] | undefined;
6569
+ textInferenceConfig?: TextInferenceConfig | undefined;
6570
+ }
6571
+ /**
6572
+ * <p>The template for the prompt that's sent to the model for response generation.</p>
6573
+ * @public
6574
+ */
6575
+ export interface PromptTemplate {
6627
6576
  /**
6628
- * <p>A label that identifies the models used for a model evaluation job where you provide your own inference response data.</p>
6577
+ * <p>The template for the prompt that's sent to the model for response generation. You can include prompt placeholders, which become replaced before the prompt is sent to the model to provide instructions and context to the model. In addition, you can include XML tags to delineate meaningful sections of the prompt template.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Knowledge base prompt template</a> and <a href="https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/use-xml-tags">Use XML tags with Anthropic Claude models</a>.</p>
6629
6578
  * @public
6630
6579
  */
6631
- precomputedInferenceSourceIdentifiers?: string[] | undefined;
6580
+ textPromptTemplate?: string | undefined;
6632
6581
  }
6633
6582
  /**
6634
- * <p>A summary of the RAG resources used in an Amazon Bedrock Knowledge Base evaluation job. These resources can be Knowledge Bases in Amazon Bedrock or RAG sources outside of Amazon Bedrock that you use to generate your own inference response data.</p>
6583
+ * <p>The response generation configuration of the external source wrapper object.</p>
6635
6584
  * @public
6636
6585
  */
6637
- export interface EvaluationRagConfigSummary {
6586
+ export interface ExternalSourcesGenerationConfiguration {
6638
6587
  /**
6639
- * <p>The Amazon Resource Names (ARNs) of the Knowledge Base resources used for a Knowledge Base evaluation job where Amazon Bedrock invokes the Knowledge Base for you.</p>
6588
+ * <p>Contains the template for the prompt for the external source wrapper object.</p>
6640
6589
  * @public
6641
6590
  */
6642
- bedrockKnowledgeBaseIdentifiers?: string[] | undefined;
6591
+ promptTemplate?: PromptTemplate | undefined;
6643
6592
  /**
6644
- * <p>A label that identifies the RAG sources used for a Knowledge Base evaluation job where you provide your own inference response data.</p>
6593
+ * <p>Configuration details for the guardrail.</p>
6645
6594
  * @public
6646
6595
  */
6647
- precomputedRagSourceIdentifiers?: string[] | undefined;
6648
- }
6649
- /**
6650
- * <p>Identifies the models, Knowledge Bases, or other RAG sources evaluated in a model or Knowledge Base evaluation job.</p>
6651
- * @public
6652
- */
6653
- export interface EvaluationInferenceConfigSummary {
6596
+ guardrailConfiguration?: GuardrailConfiguration | undefined;
6654
6597
  /**
6655
- * <p>A summary of the models used in an Amazon Bedrock model evaluation job. These resources can be models in Amazon Bedrock or models outside of Amazon Bedrock that you use to generate your own inference response data.</p>
6598
+ * <p>Configuration details for inference when using <code>RetrieveAndGenerate</code> to generate responses while using an external source.</p>
6656
6599
  * @public
6657
6600
  */
6658
- modelConfigSummary?: EvaluationModelConfigSummary | undefined;
6601
+ kbInferenceConfig?: KbInferenceConfig | undefined;
6659
6602
  /**
6660
- * <p>A summary of the RAG resources used in an Amazon Bedrock Knowledge Base evaluation job. These resources can be Knowledge Bases in Amazon Bedrock or RAG sources outside of Amazon Bedrock that you use to generate your own inference response data.</p>
6603
+ * <p>Additional model parameters and their corresponding values not included in the text inference configuration for an external source. Takes in custom model parameters specific to the language model being used.</p>
6661
6604
  * @public
6662
6605
  */
6663
- ragConfigSummary?: EvaluationRagConfigSummary | undefined;
6606
+ additionalModelRequestFields?: Record<string, __DocumentType> | undefined;
6664
6607
  }
6665
6608
  /**
6666
- * <p>Summary information of an evaluation job.</p>
6609
+ * <p>Contains the document contained in the wrapper object, along with its attributes/fields.</p>
6667
6610
  * @public
6668
6611
  */
6669
- export interface EvaluationSummary {
6612
+ export interface ByteContentDoc {
6670
6613
  /**
6671
- * <p>The Amazon Resource Name (ARN) of the evaluation job.</p>
6614
+ * <p>The file name of the document contained in the wrapper object.</p>
6672
6615
  * @public
6673
6616
  */
6674
- jobArn: string | undefined;
6617
+ identifier: string | undefined;
6675
6618
  /**
6676
- * <p>The name for the evaluation job.</p>
6619
+ * <p>The MIME type of the document contained in the wrapper object.</p>
6677
6620
  * @public
6678
6621
  */
6679
- jobName: string | undefined;
6622
+ contentType: string | undefined;
6680
6623
  /**
6681
- * <p>The current status of the evaluation job.</p>
6624
+ * <p>The byte value of the file to upload, encoded as a Base-64 string.</p>
6682
6625
  * @public
6683
6626
  */
6684
- status: EvaluationJobStatus | undefined;
6627
+ data: Uint8Array | undefined;
6628
+ }
6629
+ /**
6630
+ * <p>The unique wrapper object of the document from the S3 location.</p>
6631
+ * @public
6632
+ */
6633
+ export interface S3ObjectDoc {
6685
6634
  /**
6686
- * <p>The time the evaluation job was created.</p>
6635
+ * <p>The S3 URI location for the wrapper object of the document.</p>
6687
6636
  * @public
6688
6637
  */
6689
- creationTime: Date | undefined;
6638
+ uri: string | undefined;
6639
+ }
6640
+ /**
6641
+ * <p>The unique external source of the content contained in the wrapper object.</p>
6642
+ * @public
6643
+ */
6644
+ export interface ExternalSource {
6690
6645
  /**
6691
- * <p>Specifies whether the evaluation job is automated or human-based.</p>
6646
+ * <p>The source type of the external source wrapper object.</p>
6692
6647
  * @public
6693
6648
  */
6694
- jobType: EvaluationJobType | undefined;
6649
+ sourceType: ExternalSourceType | undefined;
6695
6650
  /**
6696
- * <p>The type of task for model evaluation.</p>
6651
+ * <p>The S3 location of the external source wrapper object.</p>
6697
6652
  * @public
6698
6653
  */
6699
- evaluationTaskTypes: EvaluationTaskType[] | undefined;
6654
+ s3Location?: S3ObjectDoc | undefined;
6700
6655
  /**
6701
- * <p>The Amazon Resource Names (ARNs) of the model(s) used for the evaluation job.</p>
6702
- *
6703
- * @deprecated (since 2025-03-07) Inference identifiers should be retrieved from the inferenceConfigSummary.
6656
+ * <p>The identifier, content type, and data of the external source wrapper object.</p>
6704
6657
  * @public
6705
6658
  */
6706
- modelIdentifiers?: string[] | undefined;
6659
+ byteContent?: ByteContentDoc | undefined;
6660
+ }
6661
+ /**
6662
+ * <p>The configuration of the external source wrapper object in the <code>retrieveAndGenerate</code> function.</p>
6663
+ * @public
6664
+ */
6665
+ export interface ExternalSourcesRetrieveAndGenerateConfiguration {
6707
6666
  /**
6708
- * <p>The Amazon Resource Names (ARNs) of the knowledge base resources used for a knowledge base evaluation job.</p>
6709
- *
6710
- * @deprecated (since 2025-03-07) Inference identifiers should be retrieved from the inferenceConfigSummary.
6667
+ * <p>The Amazon Resource Name (ARN) of the foundation model or <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html">inference profile</a> used to generate responses. </p>
6711
6668
  * @public
6712
6669
  */
6713
- ragIdentifiers?: string[] | undefined;
6670
+ modelArn: string | undefined;
6714
6671
  /**
6715
- * <p>The Amazon Resource Names (ARNs) of the models used to compute the metrics for a knowledge base evaluation job.</p>
6672
+ * <p>The document for the external source wrapper object in the <code>retrieveAndGenerate</code> function.</p>
6716
6673
  * @public
6717
6674
  */
6718
- evaluatorModelIdentifiers?: string[] | undefined;
6675
+ sources: ExternalSource[] | undefined;
6719
6676
  /**
6720
- * <p>The Amazon Resource Names (ARNs) of the models used to compute custom metrics in an Amazon Bedrock evaluation job.</p>
6677
+ * <p>Contains configurations details for response generation based on retrieved text chunks.</p>
6721
6678
  * @public
6722
6679
  */
6723
- customMetricsEvaluatorModelIdentifiers?: string[] | undefined;
6680
+ generationConfiguration?: ExternalSourcesGenerationConfiguration | undefined;
6681
+ }
6682
+ /**
6683
+ * <p>The configuration details for response generation based on retrieved text chunks.</p>
6684
+ * @public
6685
+ */
6686
+ export interface GenerationConfiguration {
6724
6687
  /**
6725
- * <p>Identifies the models, Knowledge Bases, or other RAG sources evaluated in a model or Knowledge Base evaluation job.</p>
6688
+ * <p>Contains the template for the prompt that's sent to the model for response generation.</p>
6726
6689
  * @public
6727
6690
  */
6728
- inferenceConfigSummary?: EvaluationInferenceConfigSummary | undefined;
6691
+ promptTemplate?: PromptTemplate | undefined;
6729
6692
  /**
6730
- * <p>Specifies whether the evaluation job is for evaluating a model or evaluating a knowledge base (retrieval and response generation).</p>
6693
+ * <p>Contains configuration details for the guardrail.</p>
6731
6694
  * @public
6732
6695
  */
6733
- applicationType?: ApplicationType | undefined;
6734
- }
6735
- /**
6736
- * @public
6737
- */
6738
- export interface ListEvaluationJobsResponse {
6696
+ guardrailConfiguration?: GuardrailConfiguration | undefined;
6739
6697
  /**
6740
- * <p>Continuation token from the previous response, for Amazon Bedrock to list the next set of results.</p>
6698
+ * <p>Contains configuration details for inference for knowledge base retrieval and response generation.</p>
6741
6699
  * @public
6742
6700
  */
6743
- nextToken?: string | undefined;
6701
+ kbInferenceConfig?: KbInferenceConfig | undefined;
6744
6702
  /**
6745
- * <p>A list of summaries of the evaluation jobs.</p>
6703
+ * <p>Additional model parameters and corresponding values not included in the <code>textInferenceConfig</code> structure for a knowledge base. This allows you to provide custom model parameters specific to the language model being used.</p>
6746
6704
  * @public
6747
6705
  */
6748
- jobSummaries?: EvaluationSummary[] | undefined;
6706
+ additionalModelRequestFields?: Record<string, __DocumentType> | undefined;
6749
6707
  }
6750
6708
  /**
6709
+ * <p>The configuration details for transforming the prompt.</p>
6751
6710
  * @public
6752
6711
  */
6753
- export interface StopEvaluationJobRequest {
6712
+ export interface QueryTransformationConfiguration {
6754
6713
  /**
6755
- * <p>The Amazon Resource Name (ARN) of the evaluation job you want to stop.</p>
6714
+ * <p>The type of transformation to apply to the prompt.</p>
6756
6715
  * @public
6757
6716
  */
6758
- jobIdentifier: string | undefined;
6717
+ type: QueryTransformationType | undefined;
6759
6718
  }
6760
6719
  /**
6720
+ * <p>The configuration details for the model to process the prompt prior to retrieval and response generation.</p>
6761
6721
  * @public
6762
6722
  */
6763
- export interface StopEvaluationJobResponse {
6723
+ export interface OrchestrationConfiguration {
6724
+ /**
6725
+ * <p>Contains configuration details for transforming the prompt.</p>
6726
+ * @public
6727
+ */
6728
+ queryTransformationConfiguration: QueryTransformationConfiguration | undefined;
6764
6729
  }
6765
6730
  /**
6766
- * <p>Configuration settings for integrating Automated Reasoning policies with Amazon Bedrock Guardrails.</p>
6731
+ * <p>Specifies the name of the metadata attribute/field to apply filters. You must match the name of the attribute/field in your data source/document metadata.</p>
6767
6732
  * @public
6768
6733
  */
6769
- export interface GuardrailAutomatedReasoningPolicyConfig {
6734
+ export interface FilterAttribute {
6770
6735
  /**
6771
- * <p>The list of Automated Reasoning policy ARNs to include in the guardrail configuration.</p>
6736
+ * <p>The name of metadata attribute/field, which must match the name in your data source/document metadata.</p>
6772
6737
  * @public
6773
6738
  */
6774
- policies: string[] | undefined;
6739
+ key: string | undefined;
6775
6740
  /**
6776
- * <p>The confidence threshold for triggering guardrail actions based on Automated Reasoning policy violations.</p>
6741
+ * <p>The value of the metadata attribute/field.</p>
6777
6742
  * @public
6778
6743
  */
6779
- confidenceThreshold?: number | undefined;
6744
+ value: __DocumentType | undefined;
6780
6745
  }
6781
6746
  /**
6782
- * <p>Contains filter strengths for harmful content. Guardrails support the following content filters to detect and filter harmful user inputs and FM-generated outputs.</p> <ul> <li> <p> <b>Hate</b> – Describes language or a statement that discriminates, criticizes, insults, denounces, or dehumanizes a person or group on the basis of an identity (such as race, ethnicity, gender, religion, sexual orientation, ability, and national origin).</p> </li> <li> <p> <b>Insults</b> – Describes language or a statement that includes demeaning, humiliating, mocking, insulting, or belittling language. This type of language is also labeled as bullying.</p> </li> <li> <p> <b>Sexual</b> – Describes language or a statement that indicates sexual interest, activity, or arousal using direct or indirect references to body parts, physical traits, or sex.</p> </li> <li> <p> <b>Violence</b> – Describes language or a statement that includes glorification of or threats to inflict physical pain, hurt, or injury toward a person, group or thing.</p> </li> </ul> <p>Content filtering depends on the confidence classification of user inputs and FM responses across each of the four harmful categories. All input and output statements are classified into one of four confidence levels (NONE, LOW, MEDIUM, HIGH) for each harmful category. For example, if a statement is classified as <i>Hate</i> with HIGH confidence, the likelihood of the statement representing hateful content is high. A single statement can be classified across multiple categories with varying confidence levels. For example, a single statement can be classified as <i>Hate</i> with HIGH confidence, <i>Insults</i> with LOW confidence, <i>Sexual</i> with NONE confidence, and <i>Violence</i> with MEDIUM confidence.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-filters.html">Guardrails content filters</a>.</p>
6747
+ * <p>Defines the schema for a metadata attribute used in Knowledge Base vector searches. Metadata attributes provide additional context for documents and can be used for filtering and reranking search results.</p>
6783
6748
  * @public
6784
6749
  */
6785
- export interface GuardrailContentFilterConfig {
6750
+ export interface MetadataAttributeSchema {
6786
6751
  /**
6787
- * <p>The harmful category that the content filter is applied to.</p>
6752
+ * <p>The unique identifier for the metadata attribute. This key is used to reference the attribute in filter expressions and reranking configurations.</p>
6788
6753
  * @public
6789
6754
  */
6790
- type: GuardrailContentFilterType | undefined;
6755
+ key: string | undefined;
6791
6756
  /**
6792
- * <p>The strength of the content filter to apply to prompts. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.</p>
6757
+ * <p>The data type of the metadata attribute. The type determines how the attribute can be used in filter expressions and reranking.</p>
6793
6758
  * @public
6794
6759
  */
6795
- inputStrength: GuardrailFilterStrength | undefined;
6760
+ type: AttributeType | undefined;
6796
6761
  /**
6797
- * <p>The strength of the content filter to apply to model responses. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.</p>
6762
+ * <p>An optional description of the metadata attribute that provides additional context about its purpose and usage.</p>
6798
6763
  * @public
6799
6764
  */
6800
- outputStrength: GuardrailFilterStrength | undefined;
6765
+ description: string | undefined;
6766
+ }
6767
+ /**
6768
+ * <p>Configuration for implicit filtering in Knowledge Base vector searches. Implicit filtering allows you to automatically filter search results based on metadata attributes without requiring explicit filter expressions in each query.</p>
6769
+ * @public
6770
+ */
6771
+ export interface ImplicitFilterConfiguration {
6801
6772
  /**
6802
- * <p>The input modalities selected for the guardrail content filter configuration.</p>
6773
+ * <p>A list of metadata attribute schemas that define the structure and properties of metadata fields used for implicit filtering. Each attribute defines a key, type, and optional description.</p>
6803
6774
  * @public
6804
6775
  */
6805
- inputModalities?: GuardrailModality[] | undefined;
6776
+ metadataAttributes: MetadataAttributeSchema[] | undefined;
6806
6777
  /**
6807
- * <p>The output modalities selected for the guardrail content filter configuration.</p>
6778
+ * <p>The Amazon Resource Name (ARN) of the foundation model used for implicit filtering. This model processes the query to extract relevant filtering criteria.</p>
6808
6779
  * @public
6809
6780
  */
6810
- outputModalities?: GuardrailModality[] | undefined;
6781
+ modelArn: string | undefined;
6782
+ }
6783
+ /**
6784
+ * <p>Specifies a field to be used during the reranking process in a Knowledge Base vector search. This structure identifies metadata fields that should be considered when reordering search results to improve relevance.</p>
6785
+ * @public
6786
+ */
6787
+ export interface FieldForReranking {
6811
6788
  /**
6812
- * <p>Specifies the action to take when harmful content is detected. Supported values include:</p> <ul> <li> <p> <code>BLOCK</code> – Block the content and replace it with blocked messaging.</p> </li> <li> <p> <code>NONE</code> – Take no action but return detection information in the trace response.</p> </li> </ul>
6789
+ * <p>The name of the metadata field to be used during the reranking process.</p>
6813
6790
  * @public
6814
6791
  */
6815
- inputAction?: GuardrailContentFilterAction | undefined;
6792
+ fieldName: string | undefined;
6793
+ }
6794
+ /**
6795
+ * <p>Configuration for selectively including or excluding metadata fields during the reranking process. This allows you to control which metadata attributes are considered when reordering search results.</p>
6796
+ * @public
6797
+ */
6798
+ export type RerankingMetadataSelectiveModeConfiguration = RerankingMetadataSelectiveModeConfiguration.FieldsToExcludeMember | RerankingMetadataSelectiveModeConfiguration.FieldsToIncludeMember | RerankingMetadataSelectiveModeConfiguration.$UnknownMember;
6799
+ /**
6800
+ * @public
6801
+ */
6802
+ export declare namespace RerankingMetadataSelectiveModeConfiguration {
6816
6803
  /**
6817
- * <p>Specifies the action to take when harmful content is detected in the output. Supported values include:</p> <ul> <li> <p> <code>BLOCK</code> – Block the content and replace it with blocked messaging.</p> </li> <li> <p> <code>NONE</code> – Take no action but return detection information in the trace response.</p> </li> </ul>
6804
+ * <p>A list of metadata field names to explicitly include in the reranking process. Only these fields will be considered when reordering search results. This parameter cannot be used together with fieldsToExclude.</p>
6818
6805
  * @public
6819
6806
  */
6820
- outputAction?: GuardrailContentFilterAction | undefined;
6807
+ interface FieldsToIncludeMember {
6808
+ fieldsToInclude: FieldForReranking[];
6809
+ fieldsToExclude?: never;
6810
+ $unknown?: never;
6811
+ }
6821
6812
  /**
6822
- * <p>Specifies whether to enable guardrail evaluation on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.</p>
6813
+ * <p>A list of metadata field names to explicitly exclude from the reranking process. All metadata fields except these will be considered when reordering search results. This parameter cannot be used together with fieldsToInclude.</p>
6823
6814
  * @public
6824
6815
  */
6825
- inputEnabled?: boolean | undefined;
6816
+ interface FieldsToExcludeMember {
6817
+ fieldsToInclude?: never;
6818
+ fieldsToExclude: FieldForReranking[];
6819
+ $unknown?: never;
6820
+ }
6826
6821
  /**
6827
- * <p>Specifies whether to enable guardrail evaluation on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.</p>
6828
6822
  * @public
6829
6823
  */
6830
- outputEnabled?: boolean | undefined;
6824
+ interface $UnknownMember {
6825
+ fieldsToInclude?: never;
6826
+ fieldsToExclude?: never;
6827
+ $unknown: [string, any];
6828
+ }
6829
+ /**
6830
+ * @deprecated unused in schema-serde mode.
6831
+ *
6832
+ */
6833
+ interface Visitor<T> {
6834
+ fieldsToInclude: (value: FieldForReranking[]) => T;
6835
+ fieldsToExclude: (value: FieldForReranking[]) => T;
6836
+ _: (name: string, value: any) => T;
6837
+ }
6831
6838
  }
6832
6839
  /**
6833
- * <p>The tier that your guardrail uses for content filters. Consider using a tier that balances performance, accuracy, and compatibility with your existing generative AI workflows.</p>
6840
+ * <p>Configuration for how metadata should be used during the reranking process in Knowledge Base vector searches. This determines which metadata fields are included or excluded when reordering search results.</p>
6834
6841
  * @public
6835
6842
  */
6836
- export interface GuardrailContentFiltersTierConfig {
6843
+ export interface MetadataConfigurationForReranking {
6844
+ /**
6845
+ * <p>The mode for selecting which metadata fields to include in the reranking process. Valid values are ALL (use all available metadata fields) or SELECTIVE (use only specified fields).</p>
6846
+ * @public
6847
+ */
6848
+ selectionMode: RerankingMetadataSelectionMode | undefined;
6837
6849
  /**
6838
- * <p>The tier that your guardrail uses for content filters. Valid values include:</p> <ul> <li> <p> <code>CLASSIC</code> tier – Provides established guardrails functionality supporting English, French, and Spanish languages.</p> </li> <li> <p> <code>STANDARD</code> tier – Provides a more robust solution than the <code>CLASSIC</code> tier and has more comprehensive language support. This tier requires that your guardrail use <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-cross-region.html">cross-Region inference</a>.</p> </li> </ul>
6850
+ * <p>Configuration for selective mode, which allows you to explicitly include or exclude specific metadata fields during reranking. This is only used when selectionMode is set to SELECTIVE.</p>
6839
6851
  * @public
6840
6852
  */
6841
- tierName: GuardrailContentFiltersTierName | undefined;
6853
+ selectiveModeConfiguration?: RerankingMetadataSelectiveModeConfiguration | undefined;
6842
6854
  }
6843
6855
  /**
6844
- * <p>Contains details about how to handle harmful content.</p>
6856
+ * <p>Configuration for the Amazon Bedrock foundation model used for reranking vector search results. This specifies which model to use and any additional parameters required by the model.</p>
6845
6857
  * @public
6846
6858
  */
6847
- export interface GuardrailContentPolicyConfig {
6859
+ export interface VectorSearchBedrockRerankingModelConfiguration {
6848
6860
  /**
6849
- * <p>Contains the type of the content filter and how strongly it should apply to prompts and model responses.</p>
6861
+ * <p>The Amazon Resource Name (ARN) of the foundation model to use for reranking. This model processes the query and search results to determine a more relevant ordering.</p>
6850
6862
  * @public
6851
6863
  */
6852
- filtersConfig: GuardrailContentFilterConfig[] | undefined;
6864
+ modelArn: string | undefined;
6853
6865
  /**
6854
- * <p>The tier that your guardrail uses for content filters.</p>
6866
+ * <p>A list of additional fields to include in the model request during reranking. These fields provide extra context or configuration options specific to the selected foundation model.</p>
6855
6867
  * @public
6856
6868
  */
6857
- tierConfig?: GuardrailContentFiltersTierConfig | undefined;
6869
+ additionalModelRequestFields?: Record<string, __DocumentType> | undefined;
6858
6870
  }
6859
6871
  /**
6860
- * <p>The filter configuration details for the guardrails contextual grounding filter.</p>
6872
+ * <p>Configuration for using Amazon Bedrock foundation models to rerank Knowledge Base vector search results. This enables more sophisticated relevance ranking using large language models.</p>
6861
6873
  * @public
6862
6874
  */
6863
- export interface GuardrailContextualGroundingFilterConfig {
6864
- /**
6865
- * <p>The filter details for the guardrails contextual grounding filter.</p>
6866
- * @public
6867
- */
6868
- type: GuardrailContextualGroundingFilterType | undefined;
6875
+ export interface VectorSearchBedrockRerankingConfiguration {
6869
6876
  /**
6870
- * <p>The threshold details for the guardrails contextual grounding filter.</p>
6877
+ * <p>Configuration for the Amazon Bedrock foundation model used for reranking. This includes the model ARN and any additional request fields required by the model.</p>
6871
6878
  * @public
6872
6879
  */
6873
- threshold: number | undefined;
6880
+ modelConfiguration: VectorSearchBedrockRerankingModelConfiguration | undefined;
6874
6881
  /**
6875
- * <p>Specifies the action to take when content fails the contextual grounding evaluation. Supported values include:</p> <ul> <li> <p> <code>BLOCK</code> – Block the content and replace it with blocked messaging.</p> </li> <li> <p> <code>NONE</code> – Take no action but return detection information in the trace response.</p> </li> </ul>
6882
+ * <p>The maximum number of results to rerank. This limits how many of the initial vector search results will be processed by the reranking model. A smaller number improves performance but may exclude potentially relevant results.</p>
6876
6883
  * @public
6877
6884
  */
6878
- action?: GuardrailContextualGroundingAction | undefined;
6885
+ numberOfRerankedResults?: number | undefined;
6879
6886
  /**
6880
- * <p>Specifies whether to enable contextual grounding evaluation. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.</p>
6887
+ * <p>Configuration for how document metadata should be used during the reranking process. This determines which metadata fields are included when reordering search results.</p>
6881
6888
  * @public
6882
6889
  */
6883
- enabled?: boolean | undefined;
6890
+ metadataConfiguration?: MetadataConfigurationForReranking | undefined;
6884
6891
  }
6885
6892
  /**
6886
- * <p>Specifies the tier that your guardrail uses for contextual grounding checks.</p>
6893
+ * <p>Configuration for reranking vector search results to improve relevance. Reranking applies additional relevance models to reorder the initial vector search results based on more sophisticated criteria.</p>
6887
6894
  * @public
6888
6895
  */
6889
- export interface GuardrailContextualGroundingTierConfig {
6896
+ export interface VectorSearchRerankingConfiguration {
6897
+ /**
6898
+ * <p>The type of reranking to apply to vector search results. Currently, the only supported value is BEDROCK, which uses Amazon Bedrock foundation models for reranking.</p>
6899
+ * @public
6900
+ */
6901
+ type: VectorSearchRerankingConfigurationType | undefined;
6890
6902
  /**
6891
- * <p>The tier that your guardrail uses for contextual grounding. Valid values include:</p> <ul> <li> <p> <code>CLASSIC</code> tier – Provides established contextual grounding functionality supporting English, French, and Spanish languages.</p> </li> <li> <p> <code>STANDARD</code> tier – Provides a more robust solution than the <code>CLASSIC</code> tier, with support for reasoning, conversational content and more comprehensive language support. This tier requires that your guardrail use <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-cross-region.html">cross-Region inference</a>.</p> </li> </ul>
6903
+ * <p>Configuration for using Amazon Bedrock foundation models to rerank search results. This is required when the reranking type is set to BEDROCK.</p>
6892
6904
  * @public
6893
6905
  */
6894
- tierName: GuardrailContextualGroundingTierName | undefined;
6906
+ bedrockRerankingConfiguration?: VectorSearchBedrockRerankingConfiguration | undefined;
6895
6907
  }
6896
6908
  /**
6897
- * <p>The policy configuration details for the guardrails contextual grounding policy.</p>
6909
+ * <p>A summary of a RAG source used for a retrieve-and-generate Knowledge Base evaluation job where you provide your own inference response data.</p>
6898
6910
  * @public
6899
6911
  */
6900
- export interface GuardrailContextualGroundingPolicyConfig {
6912
+ export interface EvaluationPrecomputedRetrieveAndGenerateSourceConfig {
6901
6913
  /**
6902
- * <p>The filter configuration details for the guardrails contextual grounding policy.</p>
6914
+ * <p>A label that identifies the RAG source used for a retrieve-and-generate Knowledge Base evaluation job where you provide your own inference response data.</p>
6903
6915
  * @public
6904
6916
  */
6905
- filtersConfig: GuardrailContextualGroundingFilterConfig[] | undefined;
6917
+ ragSourceIdentifier: string | undefined;
6918
+ }
6919
+ /**
6920
+ * <p>A summary of a RAG source used for a retrieve-only Knowledge Base evaluation job where you provide your own inference response data.</p>
6921
+ * @public
6922
+ */
6923
+ export interface EvaluationPrecomputedRetrieveSourceConfig {
6906
6924
  /**
6907
- * <p>The tier that your guardrail uses for contextual grounding.</p>
6925
+ * <p>A label that identifies the RAG source used for a retrieve-only Knowledge Base evaluation job where you provide your own inference response data.</p>
6908
6926
  * @public
6909
6927
  */
6910
- tierConfig?: GuardrailContextualGroundingTierConfig | undefined;
6928
+ ragSourceIdentifier: string | undefined;
6911
6929
  }
6912
6930
  /**
6913
- * <p>The system-defined guardrail profile that you're using with your guardrail. Guardrail profiles define the destination Amazon Web Services Regions where guardrail inference requests can be automatically routed. Using guardrail profiles helps maintain guardrail performance and reliability when demand increases.</p> <p>For more information, see the <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-cross-region.html">Amazon Bedrock User Guide</a>.</p>
6931
+ * <p>A summary of a RAG source used for a Knowledge Base evaluation job where you provide your own inference response data.</p>
6932
+ * @public
6933
+ */
6934
+ export type EvaluationPrecomputedRagSourceConfig = EvaluationPrecomputedRagSourceConfig.RetrieveAndGenerateSourceConfigMember | EvaluationPrecomputedRagSourceConfig.RetrieveSourceConfigMember | EvaluationPrecomputedRagSourceConfig.$UnknownMember;
6935
+ /**
6914
6936
  * @public
6915
6937
  */
6916
- export interface GuardrailCrossRegionConfig {
6938
+ export declare namespace EvaluationPrecomputedRagSourceConfig {
6939
+ /**
6940
+ * <p>A summary of a RAG source used for a retrieve-only Knowledge Base evaluation job where you provide your own inference response data.</p>
6941
+ * @public
6942
+ */
6943
+ interface RetrieveSourceConfigMember {
6944
+ retrieveSourceConfig: EvaluationPrecomputedRetrieveSourceConfig;
6945
+ retrieveAndGenerateSourceConfig?: never;
6946
+ $unknown?: never;
6947
+ }
6948
+ /**
6949
+ * <p>A summary of a RAG source used for a retrieve-and-generate Knowledge Base evaluation job where you provide your own inference response data.</p>
6950
+ * @public
6951
+ */
6952
+ interface RetrieveAndGenerateSourceConfigMember {
6953
+ retrieveSourceConfig?: never;
6954
+ retrieveAndGenerateSourceConfig: EvaluationPrecomputedRetrieveAndGenerateSourceConfig;
6955
+ $unknown?: never;
6956
+ }
6917
6957
  /**
6918
- * <p>The ID or Amazon Resource Name (ARN) of the guardrail profile that your guardrail is using. Guardrail profile availability depends on your current Amazon Web Services Region. For more information, see the <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-cross-region-support.html">Amazon Bedrock User Guide</a>.</p>
6919
6958
  * @public
6920
6959
  */
6921
- guardrailProfileIdentifier: string | undefined;
6960
+ interface $UnknownMember {
6961
+ retrieveSourceConfig?: never;
6962
+ retrieveAndGenerateSourceConfig?: never;
6963
+ $unknown: [string, any];
6964
+ }
6965
+ /**
6966
+ * @deprecated unused in schema-serde mode.
6967
+ *
6968
+ */
6969
+ interface Visitor<T> {
6970
+ retrieveSourceConfig: (value: EvaluationPrecomputedRetrieveSourceConfig) => T;
6971
+ retrieveAndGenerateSourceConfig: (value: EvaluationPrecomputedRetrieveAndGenerateSourceConfig) => T;
6972
+ _: (name: string, value: any) => T;
6973
+ }
6922
6974
  }