Bedrock / Client / get_advanced_prompt_optimization_job

get_advanced_prompt_optimization_job

Bedrock.Client.get_advanced_prompt_optimization_job(**kwargs)

Gets information about an advanced prompt optimization job.

See also: AWS API Documentation

Request Syntax

response = client.get_advanced_prompt_optimization_job(
    jobIdentifier='string'
)
Parameters:

jobIdentifier (string) –

[REQUIRED]

The ARN or ID of the advanced prompt optimization job.

Return type:

dict

Returns:

Response Syntax

{
    'jobArn': 'string',
    'jobName': 'string',
    'jobDescription': 'string',
    'jobStatus': 'InProgress'|'Completed'|'Failed'|'PartiallyCompleted'|'Stopping'|'Stopped'|'Deleting',
    'inputConfig': {
        's3Uri': 'string'
    },
    'outputConfig': {
        's3Uri': 'string'
    },
    'encryptionKeyArn': 'string',
    'creationTime': datetime(2015, 1, 1),
    'lastModifiedTime': datetime(2015, 1, 1),
    'failureMessage': 'string',
    'modelConfigurations': [
        {
            'modelId': 'string',
            'inferenceConfig': {
                'maxTokens': 123,
                'temperature': ...,
                'topP': ...,
                'stopSequences': [
                    'string',
                ]
            },
            'additionalModelRequestFields': {
                'string': {...}|[...]|123|123.4|'string'|True|None
            }
        },
    ]
}

Response Structure

  • (dict) –

    Get Advanced Prompt Optimization Job Response

    • jobArn (string) –

      The Amazon Resource Name (ARN) of the advanced prompt optimization job.

    • jobName (string) –

      The name of the advanced prompt optimization job.

    • jobDescription (string) –

      The description of the advanced prompt optimization job.

    • jobStatus (string) –

      The status of the advanced prompt optimization job.

    • inputConfig (dict) –

      The input data configuration for the optimization job.

      • s3Uri (string) –

        The S3 URI of the JSONL input file containing prompt templates and evaluation samples.

    • outputConfig (dict) –

      The output data configuration for the optimization job.

      • s3Uri (string) –

        The S3 URI prefix where the optimization results will be written.

    • encryptionKeyArn (string) –

      The Amazon Resource Name (ARN) of the KMS key used to encrypt the output data.

    • creationTime (datetime) –

      The time at which the advanced prompt optimization job was created.

    • lastModifiedTime (datetime) –

      The time at which the advanced prompt optimization job was last modified.

    • failureMessage (string) –

      If the job failed, a message describing the reason for the failure.

    • modelConfigurations (list) –

      The model configurations used in the optimization job.

      • (dict) –

        Contains the configuration for a model used in an advanced prompt optimization job, including the model ID and inference parameters.

        • modelId (string) –

          The ID of the model to use for optimization.

        • inferenceConfig (dict) –

          The inference configuration for the model, including parameters such as maximum tokens, temperature, and top-p.

          • maxTokens (integer) –

            The maximum number of tokens to allow in the generated response. The default value is the maximum allowed value for the model that you are using.

          • temperature (float) –

            The likelihood of the model selecting higher-probability options while generating a response. A lower value makes the model more likely to choose higher-probability options, while a higher value makes the model more likely to choose lower-probability options.

          • topP (float) –

            The percentage of most-likely candidates that the model considers for the next token. For example, if you choose a value of 0.8 for topP, the model selects from the top 80% of the probability distribution of tokens that could be next in the sequence.

          • stopSequences (list) –

            A list of stop sequences. A stop sequence is a sequence of characters that causes the model to stop generating the response.

            • (string) –

        • additionalModelRequestFields (dict) –

          Additional model request fields. Use this to pass model-specific parameters that are not included in the standard inference configuration.

          • (string) –

            • (document) –

Exceptions

  • Bedrock.Client.exceptions.ResourceNotFoundException

  • Bedrock.Client.exceptions.AccessDeniedException

  • Bedrock.Client.exceptions.ValidationException

  • Bedrock.Client.exceptions.InternalServerException

  • Bedrock.Client.exceptions.ThrottlingException