AI アプリケーションの「良い」状態と「悪い」状態を定義する
テストを設計する前に、 ThemeBuilderの典型的な完璧な出力を確認してください。 各評価では、このオブジェクトのバージョンが処理されます。
{
"id": "example-002",
"userInput": {
"companyName": "Nova news",
"description": "Space exploration news and educational content.",
"audience": "science enthusiasts",
"tone": [
"informative",
"scientific",
"inspiring"
]
},
"appOutput": {
"motto": "Unveiling the universe.",
"colorPalette": {
"textColor": "#E2E8F0",
"backgroundColor": "#0B0D17",
"primary": "#7000FF",
"secondary": "#00C2FF"
}
}
}
成功と失敗を定義する
評価を作成する最初の手順は、成功と失敗を定義することです。 そのためには、データをよく理解し、本番環境で発生する可能性のある誤った出力を把握する必要があります。可能であれば、本番環境のデータを確認してください。
ThemeBuilder の誤った出力の例を次に示します。
- データ構造が正しくない:
- JSON が無効、キーがない
- カラーパレットの値が 16 進数ではない
- モットーまたは一部の色が空の文字列である
- モットーが 6 語の上限を超えている。
- モットーが不適切:
- モットーがブランド、オーディエンス、トーンと一致しない。
- モットーが有害である。
- カラーパレットが不適切:
- カラーパレットがブランド、オーディエンス、トーンと一致しない。
- テキストと背景色のコントラスト比が 4.5 未満である。
ユーザー入力の例
User input: {
"companyName": "Moon Cafe",
"description": "A cozy nocturnal coffee shop serving late-night espresso and pastries.",
"audience": "night owls and students"
}
出力: データが正しくない
// Wrong key `tagline` instead of `motto`.
// Array of colors instead of the required `colorPalette` object.
Output: {"tagline": "Freshly brewed", "colors": \["\#f0f0f0"\]}
// The motto is over our 6-word limit
Output: {
"motto": "The best place for late night espresso and cozy pastries",
"colorPalette": ...
}
// Colors are invalid hexadecimal strings
Output: {
"motto": "Brewed for the moon.",
"colorPalette": {"textColor": "grey", "backgroundColor": "white", "primary": "neon-purple", "secondary": "\#\#00C2FF"}
}
出力: モットーが不適切
// Brand and tone mismatch (too cold for a cozy vibe)
Output motto: "Beans for maximum productivity."
// Toxic (rude and unwelcoming)
Output motto: "Go away loser, we're busy."
出力: カラーパレットが不適切
// Brand and tone mismatch (clashing neon colors for a cozy cafe)
Output color palette: {
"textColor": "\#00FF00", "backgroundColor": "\#FF00FF",
"primary": "\#FFFF00", "secondary": "\#0000FF"
}
// Contrast ratio below the 4.5:1 requirement
Output color palette: {
"textColor": "\#CCCCCC", "backgroundColor": "\#FFFFFF",
"primary": "\#EEEEEE", "secondary": "\#DDDDDD"
}
評価基準と方法を定義する
出力が期待どおりにならない理由に基づいて、評価基準と方法を定義できます。
- 客観的な基準をテストするには、ルールベースの評価を作成します(通常のコードを使用)。
- 主観的な基準をテストするには、判定モデルを使用します。
| 評価基準 | 評価方法 |
|---|---|
| データ形式が正しい: 有効な JSON、すべてのキーが存在する、16 進数カラー、空の値がない、モットーが 6 語以内 | ルールベース(客観的) |
| テキストと背景色のコントラスト比がアクセシビリティに対応している | ルールベース |
| モットーがブランド、オーディエンス、トーンと一致する | LLM 判定(主観的) |
| カラーパレットがブランド、オーディエンス、トーンと一致する | LLM 判定 |
| モットーが有害ではない | LLM 判定 |
ルーブリック
完璧なクリエイティブなモットーやカラーパレットは存在しません。そのため、ThemeBuilder の出力を理想的な結果と比較するのではなく、判定に明確なガイドラインを提供します。
// Example rubric for color palette brand fit
Criteria:
1. **Psychological and literal association**: Do the colors logically map
to the literal product and evoke the right vibe?
2. **Constraint verification**: Does the palette violate any fundamental
keywords (such as "sustainable", "discreet", or "organic")?
3. **Appropriate and harmonious**: Is the palette suitable for the company's
industry baseline, regardless of secondary trendy adjectives?
タスク固有の基準を使用する
ユースケース固有の指標に加えて、タスクに関連する標準的な基準と指標を使用します。たとえば、 要約の場合、 一般的な指標は次のとおりです。
- 整合性: 要約が特定のユーザー指示、トーン、スタイルに従っている。
- 簡潔さ: 要約が必要なことだけを述べている。
- 豊富さ: 要約にすべての重要なポイントが含まれている。
- 正確さ: 要約が事実に基づき、正確である。
- グラウンディング: ハルシネーションを防ぐために、すべての主張がソースに遡って追跡される。
事前構築済みの評価
評価ソリューションとツールには、ユースケースに適合する可能性のあるマネージド評価または事前構築済みの指標が用意されています。 利用可能な機能をご確認ください。