From fbdb62d33e0dc64f9b0933fb3bd88219bd0ba279 Mon Sep 17 00:00:00 2001 From: happybell80 Date: Wed, 17 Sep 2025 00:43:21 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20rb8001=20=ED=8C=8C=EC=9D=BC=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=20=EC=A6=89=EC=8B=9C=20=EC=9D=91=EB=8B=B5=20=EB=B0=A9?= =?UTF-8?q?=EC=8B=9D=20=EA=B0=9C=EC=84=A0=20=EB=82=B4=EC=9A=A9=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...916_rb8001_skill-rag-file_연동_구조.md | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/troubleshooting/250916_rb8001_skill-rag-file_연동_구조.md b/troubleshooting/250916_rb8001_skill-rag-file_연동_구조.md index 5ca51e4..aeb6de2 100644 --- a/troubleshooting/250916_rb8001_skill-rag-file_연동_구조.md +++ b/troubleshooting/250916_rb8001_skill-rag-file_연동_구조.md @@ -121,17 +121,38 @@ brain_service/llm_service (파일 처리 없이 텍스트만 처리) - 해결: asyncio.Semaphore(3)로 최대 3개 동시 처리 - 결과: 전체 처리 시간 단축 -## 9. 미해결 문제 (2025-09-16) +## 9. 해결된 문제 (2025-09-17) -### 파일 처리 후 로빙 활용 문제 +### 파일 처리 후 로빙 활용 문제 (해결됨) - **현상**: 파일이 skill-rag-file로 저장되지만 로빙이 파일 내용 모름 - **원인**: process_slack_files_async와 process_slack_message_async가 독립 실행 -- **필요**: 파일 처리 완료 후 검색 결과를 LLM context에 포함 +- **해결**: + - process_message_with_files_async() 함수 추가하여 파일 처리 완료 대기 + - skill-rag-file 검색 API 호출하여 파일 내용을 LLM context에 포함 + - 검색 API 파라미터 수정 (team_id 필수, document_ids 제거) -### ChromaDB 볼륨 마운트 불일치 -- **rb8001**: /home/admin/ivada_project/rb8001/chroma_db → /code/chroma_db (영구 저장) -- **skill-rag-file**: 볼륨 마운트 없음 (컨테이너 재시작 시 데이터 손실) -- **해결 필요**: skill-rag-file에도 영구 볼륨 마운트 추가 +### ChromaDB 볼륨 마운트 (해결됨) +- **rb8001**: ./chroma_db → /code/chroma_db (상대 경로) +- **skill-rag-file**: ./chroma_db → /app/chroma_db (상대 경로) +- **해결**: 두 서비스 모두 상대 경로로 통일, SSHFS 충돌 방지 + +## 10. 해결된 문제 (2025-09-17) + +### 파일 처리 즉시 응답 방식 개선 +- **문제**: 파일 업로드와 질의가 별도 이벤트로 처리되면 파일 내용 인식 못함 +- **원인**: context에 file_ids가 없으면 검색 경로 미실행 +- **해결**: + - 파일 텍스트를 먼저 메모리에 추출 (Slack API 직접 다운로드) + - context["file_contents"]로 즉시 LLM에 전달 + - skill-rag-file 업로드는 asyncio.create_task()로 백그라운드 처리 +- **결과**: ChromaDB 에러와 무관하게 즉시 파일 내용 활용 가능 + +## 11. 남은 과제 + +### 검색 결과 없을 때 처리 +- **현상**: 검색 결과가 없으면 빈 응답 반환 +- **문제**: Slack API가 빈 메시지 거부 (no_text 에러) +- **필요**: 검색 실패 시 기본 메시지 처리 ### 대화와 문서 분리 저장 구조 - **설계 의도**: