From 4721b8e353386d33113727f768bbd3c632a624fb Mon Sep 17 00:00:00 2001 From: Ilker Manap Date: Tue, 6 Oct 2026 12:44:53 +0200 Subject: [PATCH] Llama Guard 3's verdicts carry their hazards' names without a categories list Co-Authored-By: Claude Opus 5.5 (1M context) --- internal/guard/judge.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/guard/judge.go b/internal/guard/judge.go index 12f36e1..5e375f2 100644 --- a/internal/guard/judge.go +++ b/internal/guard/judge.go @@ -294,6 +294,10 @@ func parseJudgment(format string, names []string, body []byte, answer string) (j } switch format { case "llamaguard3": + if len(names) == 0 { + // Its own: S1 is Violent Crimes, S9 Indiscriminate Weapons. + names = llamaGuard3Categories + } lines := strings.Split(text, "\n") switch strings.ToLower(strings.TrimSpace(lines[0])) { case "safe":