+
KI-Vorschlag (unverbindlich)
+ {suggestion.low_data ? (
+
Zu wenig Datenlage fuer einen belastbaren Vorschlag.
+ ) : (
+ <>
+
+ Empfehlung: „{suggestion.category}“ (Konfidenz {Math.round(suggestion.confidence * 100)}%, {suggestion.sample_size} Faelle)
+
+
{suggestion.reasoning}
+ >
+ )}
+
+ Die regelbasierte Entscheidung oben bleibt massgeblich — der Vorschlag wird nie automatisch uebernommen.
+
+
+
+ ) : null}
);
}
diff --git a/web/routing-rules/lib/api.ts b/web/routing-rules/lib/api.ts
index 1de8157b..3f178141 100644
--- a/web/routing-rules/lib/api.ts
+++ b/web/routing-rules/lib/api.ts
@@ -32,11 +32,20 @@ export interface Rule {
Actions: Action[] | null;
}
+export interface AISuggestion {
+ category?: string;
+ confidence: number;
+ sample_size: number;
+ reasoning: string;
+ low_data: boolean;
+}
+
export interface TestResult {
matched: boolean;
rule_id?: string;
rule_name?: string;
actions?: Action[];
+ ai_suggestion?: AISuggestion;
}
async function handle