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 <noreply@anthropic.com>
This commit is contained in:
Simon Kuehn 2026-05-18 10:15:04 +00:00
parent 321f6aaa05
commit 4d223c37c1

View file

@ -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: <brand name, e.g. Dell, HP, Lenovo, Medion>
MODEL_NAME: <human-readable product name>
MODEL_NUMBER: <part/product code or model number>
MODEL_NAME: <product name or model identifier>
MODEL_NUMBER: <part/product code, only if separately shown>
SERIAL: <serial number>
PROMPT,