From d23ee8ed77a1ceb3cc2deb180e5d6eb1ad499354 Mon Sep 17 00:00:00 2001 From: Ponshu Developer Date: Sat, 11 Apr 2026 08:58:02 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20AI=E8=A7=A3=E6=9E=90=E3=83=97=E3=83=AD?= =?UTF-8?q?=E3=83=B3=E3=83=97=E3=83=88=E3=81=AE=E9=8A=98=E6=9F=84=E5=90=8D?= =?UTF-8?q?=E8=A3=9C=E5=AE=8C=E3=83=90=E3=82=B0=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 銘柄名(name)と蔵元名(brand)はラベルの文字をそのまま使うよう明示 「東魁」→「東魁盛」のような知識補完を禁止する指示を追加 - 全3プロンプト(画像解析・ハイブリッド・テキストのみ)に適用 - version: 1.0.27+34 Co-Authored-By: Claude Sonnet 4.6 --- lib/services/gemini_service.dart | 10 +++++++--- pubspec.yaml | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/services/gemini_service.dart b/lib/services/gemini_service.dart index 771e2ba..728f675 100644 --- a/lib/services/gemini_service.dart +++ b/lib/services/gemini_service.dart @@ -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 analyzeSakeText(String extractedText) async { final prompt = ''' 以下のOCRで抽出された日本酒ラベルのテキスト情報を分析してください。 -誤字やノイズが含まれることが多いですが、文脈から積極的に正しい情報を推測・補完してください。 +誤字やノイズが含まれることがありますが、"name"(銘柄名)と"brand"(蔵元名)はテキストに記載された文字をそのまま使用し、知識から補完・変更しないでください。 抽出テキスト: """ diff --git a/pubspec.yaml b/pubspec.yaml index 59ee820..dae9166 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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