diff --git a/plans/250831_rb8001_postgresql_context_integration.md b/plans/250831_rb8001_postgresql_context_integration.md index b282fa3..5f6a0e3 100644 --- a/plans/250831_rb8001_postgresql_context_integration.md +++ b/plans/250831_rb8001_postgresql_context_integration.md @@ -46,4 +46,12 @@ - ChromaDB telemetry 오류 발생 중 → `ANONYMIZED_TELEMETRY=false` 설정 필요 - user_id UUID 타입 처리 필요 (Frontend=UUID, Slack=변환) -- LLM: Gemini 2.5 Flash Lite (DEFAULT_LLM_MODEL=gemini-2.5-flash-lite) \ No newline at end of file +- LLM: Gemini 2.5 Flash Lite (DEFAULT_LLM_MODEL=gemini-2.5-flash-lite) + +## 6. 위험성 완화 방안 + +- **성능**: 캐싱 레이어 추가 또는 비동기 처리로 지연 최소화 +- **UUID 오류**: try-except로 UUID 검증, 실패 시 slack_user_id 폴백 +- **토큰 한계**: 최근 5개로 제한, 각 대화 200자 truncate +- **로직 충돌**: PostgreSQL은 최근 사실, ChromaDB는 장기 기억으로 역할 분리 +- **점진적 적용**: 환경변수 `USE_POSTGRES_CONTEXT=true`로 기능 토글 \ No newline at end of file