From b25ae09bd2b06f12f18d1a8ce096bf4adbce9527 Mon Sep 17 00:00:00 2001 From: vikingowl Date: Sat, 25 Apr 2026 17:58:08 +0200 Subject: [PATCH] feat(enrich): full category taxonomy, tighter description + opening_hours rules (B1-B3) - Replace 3-example inline comment with 7-label taxonomy block so the model knows all valid categories instead of guessing from partial hints - Tighten description constraint to 60-220 chars with explicit word bans - Mark opening_hours as a rough guide, not authoritative for booking --- .../domain/discovery/enrich/llm_enricher.go | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/backend/internal/domain/discovery/enrich/llm_enricher.go b/backend/internal/domain/discovery/enrich/llm_enricher.go index 81e1378..d8a7f1d 100644 --- a/backend/internal/domain/discovery/enrich/llm_enricher.go +++ b/backend/internal/domain/discovery/enrich/llm_enricher.go @@ -141,15 +141,34 @@ DACH region. Using the provided source-page excerpts as grounding, return a JSON object with exactly these fields: { - "category": string, // short German label, e.g. "mittelaltermarkt", - // "weihnachtsmarkt", "ritterfest". Lowercase. - "opening_hours": string, // German; brief (e.g. "Sa-So 10:00-18:00"). + "category": string, // see taxonomy below + "opening_hours": string, // Brief German summary, e.g. "Sa-So 10:00-18:00". + // Rough guide only — not authoritative for booking. // Empty string if unclear from sources. - "description": string // 1-3 sentences in German summarising what the - // market offers. Neutral tone, no hype. - // Empty string if sources have no useful info. + "description": string // 60-220 chars, German, complete sentences, neutral + // tone. No lists, no marketing words (einzigartig, + // unvergesslich, magisch). Facts only. Empty string + // if sources have no useful content. + // Example: "Dreitaegiger Mittelaltermarkt mit + // Haendlern, Lagerleben und Ritterturnieren." } +Category taxonomy — pick exactly one: + mittelaltermarkt Medieval market: merchants, craft stalls, period costumes + weihnachtsmarkt Christmas market / Advent market + ritterfest Knight festival: jousting, tournaments, knight camp focus + handwerkermarkt Craft/artisan market without strong medieval theme + schlossfest Castle or palace festival — broader programme, not just market + ritterturnier Jousting tournament; the tournament IS the main event + kirchweih Traditional Bavarian/Austrian parish fair (Kirmes, Kirtag) + (empty string) Sources unclear or event does not fit any category above + +Examples: + "Dresdner Striezelmarkt", christmas-market sources → "weihnachtsmarkt" + "Ritterturnier Burg Kreuzenstein", jousting sources → "ritterturnier" + "Kirchweih Fürth", parish-fair sources → "kirchweih" + "Schlossfest Schönbrunn", castle-festival sources → "schlossfest" + Rules: - Return ONLY the JSON object. No prose, no code fences. - If the sources do not support a field, return an empty string for it.