Class LeaderboardCustomerModelConfig

java.lang.Object
software.amazon.awssdk.services.sagemaker.model.LeaderboardCustomerModelConfig
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<LeaderboardCustomerModelConfig.Builder,LeaderboardCustomerModelConfig>

@Generated("software.amazon.awssdk:codegen") public final class LeaderboardCustomerModelConfig extends Object implements SdkPojo, Serializable, ToCopyableBuilder<LeaderboardCustomerModelConfig.Builder,LeaderboardCustomerModelConfig>

The configuration of a candidate that is one of your models. The values of ModelRef, DatasetArn, EvalCriteriaArn, PromptTemplateArn, and Dimensions together identify the candidate. If any of these values differ, the configurations are different candidates.

Dimensions supports the following keys. If you specify another key, AddCandidate returns a ValidationException error.

  • RAG_KNOWLEDGE_BASE_ARN - The ARN of the Amazon Bedrock knowledge base used for retrieval, in the format arn:partition:bedrock:region:account-id:knowledge-base/knowledge-base-id. The partition is aws, aws-cn, or aws-us-gov, the account ID is 12 digits, and the knowledge base ID is 10 letters or digits. You can add a revision suffix, a colon followed by 12 lowercase hexadecimal characters.

  • RAG_NUMBER_OF_RESULTS - The number of passages retrieved from the knowledge base, from 1 to 100, with no leading zeros. Required when you specify RAG_KNOWLEDGE_BASE_ARN. Specify the value even if it's the default.

  • RAG_PROMPT_TEMPLATE_ARN - The versioned ARN of the Amazon Bedrock prompt used as the retrieval-augmented generation (RAG) prompt template, in the format arn:partition:bedrock:region:account-id:prompt/prompt-id:version. The prompt ID is 10 letters or digits, and the version number (1 to 5 digits) is required. This key is optional. If you don't specify it, the default RAG prompt template is used. Requires RAG_KNOWLEDGE_BASE_ARN.

  • RAG_KNOWLEDGE_BASE_LAST_MODIFIED_TIME - When the knowledge base's settings or synced content last changed, as an RFC 3339 timestamp in UTC that ends in Z, such as 2026-11-20T18:30:00Z. A fractional second can have 1 to 9 digits, without trailing zeros. Optional. Requires RAG_KNOWLEDGE_BASE_ARN.

  • PROMPT_TEMPLATE_ARN - The ARN of the candidate's prompt template, from 20 to 2048 characters. This is the same as PromptTemplateArn. If you specify both, they must have the same value.

You must specify RAG_KNOWLEDGE_BASE_ARN and RAG_NUMBER_OF_RESULTS together. Each key can appear only once. Dimension values can't contain whitespace, control characters, format characters, or the | character.

See Also:
  • Method Details

    • modelRef

      public final String modelRef()

      A reference to the model that was evaluated, such as the ARN of a SageMaker model package or a model identifier.

      Returns:
      A reference to the model that was evaluated, such as the ARN of a SageMaker model package or a model identifier.
    • datasetArn

      public final String datasetArn()

      The dataset the candidate was evaluated on: the ARN of a SageMaker hub content DataSet, or the S3 URI of the dataset. Optional.

      Returns:
      The dataset the candidate was evaluated on: the ARN of a SageMaker hub content DataSet, or the S3 URI of the dataset. Optional.
    • evalCriteriaArn

      public final String evalCriteriaArn()

      The ARN of the evaluation criteria that the candidate was evaluated with. Specify the ARN of a SageMaker hub content document of type JsonDoc, optionally with its version, for example arn:aws:sagemaker:aa-example-3:111122223333:hub-content/my-hub/JsonDoc/my-criteria/1.0.0. For content in a public hub, the account is aws.

      Returns:
      The ARN of the evaluation criteria that the candidate was evaluated with. Specify the ARN of a SageMaker hub content document of type JsonDoc, optionally with its version, for example arn:aws:sagemaker:aa-example-3:111122223333:hub-content/my-hub/JsonDoc/my-criteria/1.0.0. For content in a public hub, the account is aws.
    • promptTemplateArn

      public final String promptTemplateArn()

      The Amazon Resource Name (ARN) of the prompt template that you use with the model. Optional. Specify the ARN of a SageMaker hub content document or of an Amazon Bedrock prompt, such as a prompt version ARN.

      Returns:
      The Amazon Resource Name (ARN) of the prompt template that you use with the model. Optional. Specify the ARN of a SageMaker hub content document or of an Amazon Bedrock prompt, such as a prompt version ARN.
    • hasDimensions

      public final boolean hasDimensions()
      For responses, this returns true if the service returned a value for the Dimensions property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • dimensions

      public final List<LeaderboardCandidateDimension> dimensions()

      Additional key-value pairs that define the candidate, such as the retrieval-augmented generation (RAG) Knowledge Base, RAG prompt template, and RAG number of results. Dimensions are part of the candidate's identity: two candidates that differ only in their dimensions are distinct candidates. Each key can appear at most once.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasDimensions() method.

      Returns:
      Additional key-value pairs that define the candidate, such as the retrieval-augmented generation (RAG) Knowledge Base, RAG prompt template, and RAG number of results. Dimensions are part of the candidate's identity: two candidates that differ only in their dimensions are distinct candidates. Each key can appear at most once.
    • toBuilder

      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<LeaderboardCustomerModelConfig.Builder,LeaderboardCustomerModelConfig>
      Returns:
      a builder for type T
    • builder

      public static LeaderboardCustomerModelConfig.Builder builder()
    • serializableBuilderClass

      public static Class<? extends LeaderboardCustomerModelConfig.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.