From 4d223c37c12ee8e0f904c0de917fd006cc68d9ad Mon Sep 17 00:00:00 2001 From: Simon Kuehn Date: Mon, 18 May 2026 10:15:04 +0000 Subject: [PATCH] fix: relax vision prompt to prefer MODEL_NAME over strict name/number split Splitting MODEL into MODEL_NAME and MODEL_NUMBER confused the vision model into returning empty for both. Now MODEL_NAME accepts any visible model identifier; MODEL_NUMBER is only filled when a separate part/ product code is explicitly shown on the label. Co-Authored-By: Claude Sonnet 4.6 --- src/Infrastructure/AI/PromptTemplateService.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Infrastructure/AI/PromptTemplateService.php b/src/Infrastructure/AI/PromptTemplateService.php index a4dfb7e..d054670 100644 --- a/src/Infrastructure/AI/PromptTemplateService.php +++ b/src/Infrastructure/AI/PromptTemplateService.php @@ -43,14 +43,14 @@ PROMPT, 'vision_analyze' => <<<'PROMPT' Look at this nameplate/label photo of IT hardware. -Extract the manufacturer, model name, model number, and serial number visible on the label. -- MODEL_NAME is the human-readable product name (e.g. "ThinkPad T490s", "EliteBook 840 G6", "Galaxy S24 Ultra"). -- MODEL_NUMBER is the part/product code or designation (e.g. "20NXS0BA00", "5SS67UC", "SM-S928B"). Often printed as "Model No.", "Part No.", "Type", or "P/N". +Extract the manufacturer, any model identifier (name or number), and serial number visible on the label. +If the label shows both a product name (e.g. "ThinkPad T490s") and a part/product code (e.g. "20NXS0BA00"), put the product name in MODEL_NAME and the code in MODEL_NUMBER. +If only one model field is visible (regardless of whether it looks like a name or a code), put it in MODEL_NAME and leave MODEL_NUMBER empty. Do not guess or add information not visible on the label. Respond in exactly this format (use empty string if not visible): MANUFACTURER: -MODEL_NAME: -MODEL_NUMBER: +MODEL_NAME: +MODEL_NUMBER: SERIAL: PROMPT,