概念
AI model and prompt testing
Golden prompt sets, evaluations and safety tests that can fail a build.
このレッスンはまだ翻訳されていないため、英語で表示しています。
- 1A prompt or model change starts the pipeline.
- 2The golden prompts run against the new version.
- 3An evaluation job scores the answers.
流れ
- 1A prompt or model change starts the pipeline.
- 2The golden prompts run against the new version.
- 3An evaluation job scores the answers.
A change runs the golden set, and the scores decide.
Golden set regression
- It checks
- Scores did not drop
- Use
- Bedrock evaluations
Quality scoring
- It checks
- Helpfulness and faithfulness
- Use
- LLM-as-a-judge
RAG evaluation
- It checks
- Retrieval and grounded answers
- Use
- Bedrock RAG evaluation
Safety tests
- It checks
- Bad prompts are blocked
- Use
- Guardrails
| Test | It checks | Use |
|---|---|---|
| Golden set regression | Scores did not drop | Bedrock evaluations |
| Quality scoring | Helpfulness and faithfulness | LLM-as-a-judge |
| RAG evaluation | Retrieval and grounded answers | Bedrock RAG evaluation |
| Safety tests | Bad prompts are blocked | Guardrails |
1 / 2
Golden set regression
- It checks
- Scores did not drop
- Use
- Bedrock evaluations
Quality scoring
- It checks
- Helpfulness and faithfulness
- Use
- LLM-as-a-judge
RAG evaluation
- It checks
- Retrieval and grounded answers
- Use
- Bedrock RAG evaluation
| Test | It checks | Use |
|---|---|---|
| Golden set regression | Scores did not drop | Bedrock evaluations |
| Quality scoring | Helpfulness and faithfulness | LLM-as-a-judge |
| RAG evaluation | Retrieval and grounded answers | Bedrock RAG evaluation |
2 / 2
Safety tests
- It checks
- Bad prompts are blocked
- Use
- Guardrails
| Test | It checks | Use |
|---|---|---|
| Safety tests | Bad prompts are blocked | Guardrails |
概要
A prompt or model change can break answers that worked before, so test it like code. A golden set is a fixed list of prompts with expected answers or scoring rules, chosen to cover normal cases, hard cases and known failures. Run it whenever the prompt, the model, the retrieval settings or the knowledge base changes, and compare the scores with the last release.
概要
Scoring has options. Automatic metrics suit tasks with a clear answer. LLM-as-a-judge uses a model with a rubric to score open answers, such as helpfulness or faithfulness to the source. Amazon Bedrock evaluations can run these as jobs, including RAG evaluations of retrieval and answers, and you can start a job through the API from a pipeline stage. Safety tests send known bad prompts and check that Amazon Bedrock Guardrails block them, and that normal prompts pass.
概要
Set thresholds that fail the build. A CodeBuild step reads the evaluation results and exits with an error if a score drops below the bar or a safety case gets through. Judge scores vary, so use enough cases and a margin, and keep human review for sample checks.
覚えること
- Golden set: fixed prompts with expected answers or rubrics.
- Run it on every prompt, model, retrieval or knowledge base change.
- Bedrock evaluations: automatic metrics, LLM-as-a-judge and RAG evaluation, startable from a pipeline.
- Safety tests check that Guardrails block bad prompts and allow good ones.
覚えること
- Thresholds fail the build. Use a margin because judge scores vary.
試験では
- “Detect that a new prompt made answers worse” points to a regression run on a golden set.
- “Score open-ended answers at scale” points to LLM-as-a-judge.
- “Block the release if a jailbreak prompt gets through” points to safety tests with Guardrails and a failing threshold.
このタスクの内容 · 3.3
- Deployment strategies and rollback
CodePipeline
CodeBuild
CodeDeploy
SageMaker Pipelines
- Automated testing in ML pipelines
- Triggering retraining
Model Registry
Prompt Management
- Agent deployment pipelines and versions
- AI model and prompt testing
- Automating FM deployment and fine-tuned model versions
- RAG update and knowledge base refresh pipelines
Step Functions