From b57e8b8a5fd3f30a9164449d697b8d02c6cb4aac Mon Sep 17 00:00:00 2001 From: happybell80 Date: Sun, 31 Aug 2025 15:08:35 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20PostgreSQL=20=ED=86=B5=ED=95=A9=20?= =?UTF-8?q?=EC=9C=84=ED=97=98=EC=84=B1=20=EC=99=84=ED=99=94=20=EB=B0=A9?= =?UTF-8?q?=EC=95=88=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 성능: 캐싱/비동기 처리 - UUID 오류: try-except 및 slack_user_id 폴백 - 토큰 한계: 5개 제한, 200자 truncate - 로직 충돌: 역할 분리 (최근 vs 장기) - 점진적 적용: 환경변수 토글 --- plans/250831_rb8001_postgresql_context_integration.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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