ladderlore
请求新指南
  • 输入服务名称,例如 S3 或 IAM。

服务 · Machine Learning · 基于 AIF-C01

Amazon Bedrock Prompt Management

Prompts with variables, variants, drafts and versions, used from Flows, Converse and your code.

本课尚未翻译,暂以英文显示。

你在AI Practitioner中已学过

  • Prompt Management stores prompts as templates with variables.
  • Variants let you compare wordings or models. A version is a fixed snapshot.
阅读AI Practitioner课程
Draft prompt
Variants
Compare results
Saved version
Used by apps
  1. 1Write and save a draft.
  2. 2Add variants for other wordings or models.
  3. 3Compare the results.
  4. 4Create a version and point the application at it.
From draft to a version that applications use.
  • Bedrock Flows

    A prompt node points at a version
  • Converse API

    Prompt ARN in place of the model ID, plus variable values
  • Your code or agent

    GetPrompt reads a version
  • CloudFormation

    Prompt and version as resources
Where a saved prompt is used.

是什么

A prompt has variables in double curly braces, such as the customer name. A variant is one wording with its own model and inference settings, so one prompt can hold several candidates. You run the variants side by side in the console, compare the answers and keep the best.

Saving a prompt updates its draft, which you can keep editing. Creating a version takes a snapshot that never changes. Applications should use a version, so editing the draft cannot change production. A new version means a new ARN, and a release is the act of pointing the application at it.

是什么

Use a saved prompt in many places. A prompt node in Amazon Bedrock Flows can point at a version. The Converse API accepts a prompt ARN in place of a model ID, with the values for its variables. Your own code, including an agent, can read a prompt with the GetPrompt API. In infrastructure as code, prompts and versions are CloudFormation resources, so they ship through a pipeline with the application.

要记住

  • Variables in double curly braces make one prompt reusable.
  • Variants: several wordings or models in one prompt, compared side by side.
  • Draft is editable. A version is a fixed snapshot with its own ARN.
  • Applications use versions, not the draft.
  • Used by Flows prompt nodes, the Converse API and GetPrompt.

要记住

  • Prompts and versions can be created with CloudFormation.

考试中

  • “Change a prompt without redeploying the application” points to updating the prompt version the application reads.
  • “Test two wordings on the same input” points to prompt variants.
  • “Production must not change while the team edits” points to using a saved version, not the draft.