Phase 7c: 분류기 fallback 키워드 분류 + Haiku 도구 제약 + tier 재분배

- Qwen Classify v2 catch: GPU 실패 시 키워드 정규식으로 intent 추정
  (calendar/note/mail/log_event 도구 호출 경로 보존)
- Call Haiku: [기능 범위] 섹션 항상 추가 — 거짓 응답 방지
- 분류기 프롬프트: response_tier local 범위 확대 (단순 질문, mail 간단조회)
- No RAG Context / Build RAG Context: api_light→local 전환기 오버라이드
- Log Classification: fallback_method 필드 추가
- GPU 헬스체크 스크립트 + LaunchAgent 추가

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-17 15:10:40 +09:00
parent a3e5b5419a
commit 66a8b63cad
3 changed files with 41 additions and 7 deletions

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.syn-chat-bot.gpu-health-check</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Users/hyungiahn/Documents/code/syn-chat-bot/scripts/gpu_health_check.sh</string>
</array>
<key>StartInterval</key>
<integer>60</integer>
<key>StandardOutPath</key>
<string>/tmp/gpu-health-check.log</string>
<key>StandardErrorPath</key>
<string>/tmp/gpu-health-check.err</string>
</dict>
</plist>

File diff suppressed because one or more lines are too long

13
scripts/gpu_health_check.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
# GPU Ollama 헬스체크 — 1분마다 LaunchAgent에서 호출
# 목적: 분류기 fallback 0.19ms 근본 원인 추적 (GPU 연결 자체 실패 여부)
mkdir -p ~/logs
TS=$(date '+%Y-%m-%d %H:%M:%S')
LOG=~/logs/gpu_health.log
if curl -sf --connect-timeout 5 http://192.168.1.186:11434/api/tags >/dev/null 2>&1; then
echo "$TS OK" >> "$LOG"
else
echo "$TS FAIL" >> "$LOG"
fi
# 로그 1000줄 유지
tail -1000 "$LOG" > "$LOG.tmp" && mv "$LOG.tmp" "$LOG"