fix: AI解析プロンプトの銘柄名補完バグを修正
- 銘柄名(name)と蔵元名(brand)はラベルの文字をそのまま使うよう明示 「東魁」→「東魁盛」のような知識補完を禁止する指示を追加 - 全3プロンプト(画像解析・ハイブリッド・テキストのみ)に適用 - version: 1.0.27+34 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f3d6a92799
commit
d23ee8ed77
|
|
@ -44,7 +44,10 @@ class GeminiService {
|
|||
"manufacturingYearMonth": "2023.10"
|
||||
}
|
||||
|
||||
値が不明な場合は null または 適切な推測値を入れてください。特にtasteStatsは必ず1-5の数値で埋めてください。
|
||||
★重要な指示:
|
||||
- "name"(銘柄名)と "brand"(蔵元名)は、ラベルに明記されている文字を**そのまま**使用してください。知識から補完・推測・変更しないでください。例:ラベルに「東魁」とあれば「東魁盛」に変えない。
|
||||
- tasteStatsは必ず1-5の数値で埋めてください。
|
||||
- その他の値が不明な場合は null または 適切な推測値を入れてください。
|
||||
''';
|
||||
|
||||
return _callProxyApi(
|
||||
|
|
@ -88,9 +91,10 @@ $extractedText
|
|||
}
|
||||
|
||||
★重要な指示:
|
||||
- "name"(銘柄名)と "brand"(蔵元名)は、ラベルに明記されている文字を**そのまま**使用してください。知識から補完・推測・変更しないでください。例:ラベルに「東魁」とあれば「東魁盛」に変えない。
|
||||
- tasteStats(香り、甘味、酸味、苦味、ボディ)は必ず1-5の整数で埋めてください。不明な場合は3を設定してください。
|
||||
- alcoholContent, polishingRatio, sakeMeterValue などの詳細項目も、画像から読み取れる場合は必ず設定してください。
|
||||
- 値が不明な場合は null または 適切な推測値を入れてください。
|
||||
- その他の値が不明な場合は null または 適切な推測値を入れてください。
|
||||
''';
|
||||
|
||||
return _callProxyApi(imagePaths: imagePaths, customPrompt: prompt);
|
||||
|
|
@ -100,7 +104,7 @@ $extractedText
|
|||
Future<SakeAnalysisResult> analyzeSakeText(String extractedText) async {
|
||||
final prompt = '''
|
||||
以下のOCRで抽出された日本酒ラベルのテキスト情報を分析してください。
|
||||
誤字やノイズが含まれることが多いですが、文脈から積極的に正しい情報を推測・補完してください。
|
||||
誤字やノイズが含まれることがありますが、"name"(銘柄名)と"brand"(蔵元名)はテキストに記載された文字をそのまま使用し、知識から補完・変更しないでください。
|
||||
|
||||
抽出テキスト:
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 1.0.26+33
|
||||
version: 1.0.27+34
|
||||
|
||||
environment:
|
||||
sdk: ^3.10.1
|
||||
|
|
|
|||
Loading…
Reference in New Issue