OpenSquared 7eb8c24719 feat: AI category matching — pass all categories to GPT for best-fit selection
Previously: heuristic text matching (sub_type in category.name) — failed
for semantic cases like 'Iran Ceasefire Talks' → 'Guerre — Moyen-Orient'.

Now: all EventCategories are sent in the prompt (name + type + description).
The AI picks matched_category by semantic understanding, returns it in JSON.
- Validates returned name against known categories (case-insensitive)
- Auto-sets event sub_type when AI finds a match and sub_type was empty
- Returns matched_category in evaluate response + shown in UI eval message

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 22:02:47 +02:00
Description
No description provided
30 MiB
Languages
Python 46.7%
TypeScript 44.9%
HTML 8%
Shell 0.1%