diff --git a/journey/plans/260316_임베딩_1차_로빙_Gemini2_전환_계획.md b/journey/plans/260316_임베딩_1차_로빙_Gemini2_전환_계획.md new file mode 100644 index 0000000..019789d --- /dev/null +++ b/journey/plans/260316_임베딩_1차_로빙_Gemini2_전환_계획.md @@ -0,0 +1,61 @@ +--- +tags: [plans, embedding, gemini, rag, robeing, 1차] +--- + +# 임베딩 1차: 로빙 Gemini 2 전환 계획 + +## 상위 원칙 + +- [0_VALUE 임베딩 정책](https://github.com/happybell80/0_VALUE/blob/main/02_Governance/embedding-policy.md) +- [임베딩 1차 로빙 Gemini 2 전환 문제 오픈](../troubleshooting/260316_임베딩_1차_로빙_Gemini2_전환_문제오픈.md) +- [임베딩 1차 로빙 현황 및 SSOT 리서치](../research/rag/260316_임베딩_1차_로빙_현황_SSOT_리서치.md) + +## 상태 + +- planned + +## 목표 + +- 로빙(skill-embedding, skill-rag-file, rb8001)을 Gemini Embedding 2, 768d로 전환한다. +- 멀티모달(이미지, PDF) 직접 임베딩을 지원한다. +- 1차 완료 시 해당 문제·리서치·플랜을 완전히 닫는다. + +## 범위 + +### 포함 + +- skill-embedding → Gemini 2 전환 또는 skill-rag-file 내부 직접 Gemini API 호출 +- NAS RAG·Company X RAG PDF·이미지 임베딩 경로 +- MRL 768d, ChromaDB/pgvector 스키마 호환 +- 청킹 Macro-chunking(2,000~4,000 토큰) 검토 + +### 제외 + +- rb8001 메모리 768/384 차원 드리프트 (별도 이슈) +- StarsAndI, TheGooseCouncil (2차 플랜) + +## 적용 순서 + +1. 품질·비용 테스트 (`test_gemini_embedding_2.py` 확장) +2. 경로 설계 (skill-embedding vs skill-rag-file 직접 호출) +3. 스키마·청킹 (output_dimensionality=768) +4. 적용 및 검증 (Company X RAG 또는 NAS RAG 1개 경로) +5. worklog 작성 후 닫힘 선언 + +## 검증 기준 (닫힘 조건) + +- skill-embedding 또는 skill-rag-file이 Gemini 2, 768d로 동작 +- rb8001이 새 임베딩 경로 참조 +- ChromaDB·pgvector 768d 통일 +- Company X RAG, NAS RAG 새 경로 동작 +- PDF·이미지 직접 임베딩 Recall 유지 또는 개선 +- 1M 토큰 비용 $0.25 이하 + +## 닫힘 선언 + +- worklog에서만 선언한다. +- 본 문서 상태를 `completed`로 갱신하고 worklog 링크를 추가한다. + +## 관련 문서 + +- [임베딩 2차 StarsAndI·GooseCouncil 전환 계획](./260316_임베딩_2차_StarsAndI_GooseCouncil_전환_계획.md) diff --git a/journey/plans/260316_임베딩_2차_StarsAndI_GooseCouncil_전환_계획.md b/journey/plans/260316_임베딩_2차_StarsAndI_GooseCouncil_전환_계획.md new file mode 100644 index 0000000..9bc3b8d --- /dev/null +++ b/journey/plans/260316_임베딩_2차_StarsAndI_GooseCouncil_전환_계획.md @@ -0,0 +1,55 @@ +--- +tags: [plans, embedding, gemini, starsandi, goosecouncil, 2차] +--- + +# 임베딩 2차: StarsAndI·TheGooseCouncil Gemini 2 전환 계획 + +## 상위 원칙 + +- [0_VALUE 임베딩 정책](https://github.com/happybell80/0_VALUE/blob/main/02_Governance/embedding-policy.md) +- [임베딩 2차 StarsAndI·GooseCouncil 전환 문제 오픈](../troubleshooting/260316_임베딩_2차_StarsAndI_GooseCouncil_전환_문제오픈.md) +- [임베딩 1차 로빙 Gemini 2 전환 계획](./260316_임베딩_1차_로빙_Gemini2_전환_계획.md) (1차 완료 후 진행) + +## 상태 + +- planned (1차 완료 후 실행) + +## 목표 + +- StarsAndI·TheGooseCouncil를 Gemini 2, 768d로 전환한다. +- 1차(로빙) 완료 후 진행. 닫기 비용이 큰 항목 포함. + +## 범위 + +### 포함 + +- StarsAndI: recommend.py, add_star_embeddings.py, 카탈로그 5044개 재임베딩 +- TheGooseCouncil: calibrate_value_model.py, test_value_state_decision.py, .env.local + +### 제외 + +- 로빙 (1차에서 처리) + +## 적용 순서 (1차 완료 후) + +1. StarsAndI add_star_embeddings.py → Gemini 2 전환 +2. StarsAndI 카탈로그 5044개 재임베딩 (153MB JSON) +3. StarsAndI recommend.py _embed_text() 전환, len(emb)==768 +4. TheGooseCouncil API 경로 전환 +5. 검증 및 worklog + +## 검증 기준 + +- StarsAndI 추천 품질 유지 +- TheGooseCouncil 캘리브레이션·테스트 동작 +- 768d 통일 + +## 열어둠 + +- 일정·우선순위는 1차 완료 후 확정 +- 비용(카탈로그 재임베딩) 검토 후 실행 + +## 관련 문서 + +- [임베딩 1차 로빙 Gemini 2 전환 계획](./260316_임베딩_1차_로빙_Gemini2_전환_계획.md) +- [임베딩 2차 StarsAndI·GooseCouncil 현황 리서치](../research/rag/260316_임베딩_2차_StarsAndI_GooseCouncil_현황_리서치.md) diff --git a/journey/plans/260316_임베딩_Gemini_Embedding_2_전환_계획.md b/journey/plans/260316_임베딩_Gemini_Embedding_2_전환_계획.md index e8208de..392150a 100644 --- a/journey/plans/260316_임베딩_Gemini_Embedding_2_전환_계획.md +++ b/journey/plans/260316_임베딩_Gemini_Embedding_2_전환_계획.md @@ -1,9 +1,15 @@ --- -tags: [plans, embedding, gemini, rag, robeing] +tags: [plans, embedding, gemini, rag, robeing, deprecated] --- # 임베딩 Gemini Embedding 2 전환 계획 +> **1차·2차로 분리됨.** +> - [1차: 로빙](./260316_임베딩_1차_로빙_Gemini2_전환_계획.md) (완전 닫힘 가능) +> - [2차: StarsAndI·GooseCouncil](./260316_임베딩_2차_StarsAndI_GooseCouncil_전환_계획.md) (열어둠) + +--- + ## 상위 원칙 - [0_VALUE 임베딩 정책](https://github.com/happybell80/0_VALUE/blob/main/02_Governance/embedding-policy.md) @@ -20,7 +26,7 @@ tags: [plans, embedding, gemini, rag, robeing] - Gemini Embedding 2를 0_VALUE 정책에 따라 전수 교체합니다. - 멀티모달(이미지, PDF) 직접 임베딩으로 캡셔닝 파이프라인 비용·지연을 줄입니다. -- robeing·StarsAndI·TheGooseCouncil 등 전체 프로젝트에 적용합니다. +- 1차: robeing. 2차: StarsAndI·TheGooseCouncil (별도 플랜). ## 범위 @@ -56,8 +62,12 @@ tags: [plans, embedding, gemini, rag, robeing] - 1M 토큰 기준 비용이 예산 내 ($0.25 이하) - 기존 768d 컬렉션과 MRL 768d 호환 +## 플랜 분리 + +- **1차**: robeing (skill-embedding, skill-rag-file, rb8001). 빨리 닫을 수 있는 핵심 범위. +- **2차**: StarsAndI, TheGooseCouncil. 별도 플랜으로 열기. + ## 레포별 경계 -- 1차: `robeing/skill-rag-file` (Company X, NAS RAG) -- 2차: `robeing/skill-embedding` (옵션 추가 시) +- 1차: `robeing/skill-embedding`, `robeing/skill-rag-file`, `robeing/rb8001` (Company X, NAS RAG) - 문서: `robeing/DOCS` diff --git a/journey/plans/README.md b/journey/plans/README.md index 454beb0..411237c 100644 --- a/journey/plans/README.md +++ b/journey/plans/README.md @@ -35,10 +35,15 @@ **목표**: Company X 내부문서 근거응답을 질문별 특례 처리에서 공통 계약 기반 답변합성 구조로 전환 **참고**: `plans/260315_companyx_rag_답변합성_시나리오동시종결_계획.md` -### 5. 임베딩 Gemini Embedding 2 전환 (260316) +### 5. 임베딩 1차: 로빙 Gemini 2 전환 (260316) **상태**: planned -**목표**: NAS RAG·Company X RAG에 Gemini Embedding 2 부분/하이브리드 도입, 멀티모달 직접 임베딩 -**참고**: `plans/260316_임베딩_Gemini_Embedding_2_전환_계획.md` +**목표**: skill-embedding, skill-rag-file, rb8001 → Gemini 2, 768d. 완전 닫힘 가능. +**참고**: `plans/260316_임베딩_1차_로빙_Gemini2_전환_계획.md` + +### 6. 임베딩 2차: StarsAndI·TheGooseCouncil 전환 (260316) +**상태**: planned (1차 완료 후) +**목표**: StarsAndI 카탈로그 재임베딩, TheGooseCouncil API 전환. 열어둠. +**참고**: `plans/260316_임베딩_2차_StarsAndI_GooseCouncil_전환_계획.md` ## ✅ 완료된 항목 (archive 이동 완료) diff --git a/journey/research/README.md b/journey/research/README.md index 95f8e5d..e10d4cc 100644 --- a/journey/research/README.md +++ b/journey/research/README.md @@ -16,7 +16,9 @@ - [Company X RAG 답변합성 시나리오·트러블 동시종결 리서치 (260315)](./260315_companyx_rag_답변합성_시나리오동시종결_리서치.md) - [스킬 계약 문서 기반 컨텍스트 오케스트레이션 리서치 (260314)](./260314_스킬_계약_문서_기반_컨텍스트_오케스트레이션_리서치.md) - [Ralph Loop 참조 및 RAG 적용 (260316)](./260316_Ralph_Loop_참조_및_RAG_적용.md) -- [임베딩 전체 프로젝트 현황 및 SSOT 리서치 (260316)](./rag/260316_임베딩_전체프로젝트_현황_및_SSOT_리서치.md) +- [임베딩 1차 로빙 현황 SSOT (260316)](./rag/260316_임베딩_1차_로빙_현황_SSOT_리서치.md) +- [임베딩 2차 StarsAndI·GooseCouncil 현황 (260316)](./rag/260316_임베딩_2차_StarsAndI_GooseCouncil_현황_리서치.md) +- [임베딩 전체 프로젝트 현황 및 SSOT (260316, 인덱스)](./rag/260316_임베딩_전체프로젝트_현황_및_SSOT_리서치.md) ### [기억(Memory)](./memory/README.md) - 장단기 기억 메커니즘 diff --git a/journey/research/rag/260316_임베딩_1차_로빙_현황_SSOT_리서치.md b/journey/research/rag/260316_임베딩_1차_로빙_현황_SSOT_리서치.md new file mode 100644 index 0000000..617bd80 --- /dev/null +++ b/journey/research/rag/260316_임베딩_1차_로빙_현황_SSOT_리서치.md @@ -0,0 +1,82 @@ +--- +tags: [research, embedding, ssot, robeing, 1차] +--- + +# 임베딩 1차: 로빙 현황 및 SSOT 리서치 + +**작성일**: 2026-03-16 +**목적**: 로빙 임베딩 전환(1차)에 필요한 현황·영향 범위·SSOT 방안 정리. 완전 닫힘 가능하도록 범위 한정. + +--- + +## 1. 상위 문서 + +- [0_VALUE 임베딩 정책](https://github.com/happybell80/0_VALUE/blob/main/02_Governance/embedding-policy.md) +- [임베딩 1차 로빙 Gemini 2 전환 문제 오픈](../../troubleshooting/260316_임베딩_1차_로빙_Gemini2_전환_문제오픈.md) +- [Gemini Embedding 2 리서치: 비용·청킹·도입 검토](./260315_Gemini_Embedding_2_리서치_비용_청킹_도입검토.md) + +--- + +## 2. 로빙 임베딩 현황 (1차 범위) + +| 구성요소 | 모델/경로 | 차원 | 비고 | +|----------|-----------|------|------| +| skill-embedding | ko-sroberta(multitask) | 768 | ONNX 로컬, 포트 8515 | +| skill-rag-file | skill-embedding HTTP 호출 | 768 (fallback) | EMBEDDING_SERVICE_URL | +| rb8001 | SKILL_EMBEDDING_URL | 768 | 메모리 ChromaDB | +| Company X RAG | skill-rag-file 경유 | 384 | intent_prototypes pgvector 768d | +| intent_prototypes | pgvector | 768 | PostgreSQL | + +**차원 드리프트**: rb8001 메모리 768/384 혼재. [260312_rb8001_memory_chromadb_768_384_dimension_drift](../../troubleshooting/260312_rb8001_memory_chromadb_768_384_dimension_drift.md) 참조. + +--- + +## 3. 영향 범위 (1차 전수) + +| 레포/서비스 | 파일/경로 | 영향 내용 | +|-------------|-----------|-----------| +| skill-embedding | 전체 | ONNX→Gemini 2 전환, /embed, docker-compose, 포트 8515 | +| skill-rag-file | `app/services/embedding.py` | EmbeddingService 호출 경로 | +| skill-rag-file | `app/api/upload.py` | chromadb_client, embedding_service | +| skill-rag-file | `app/core/config.py` | EMBEDDING_SERVICE_URL | +| skill-rag-file | `docker-compose.yml` | EMBEDDING_SERVICE_URL | +| rb8001 | `app/core/config.py` | EMBEDDING_DIM, SKILL_EMBEDDING_URL | +| rb8001 | `app/state/database.py` | ChromaDB, memory_manager | +| rb8001 | `app/services/brain/intent_store.py` | intent_prototypes pgvector | +| rb8001 | `docker-compose.yml` | SKILL_EMBEDDING_URL | +| rb8001 | `scripts/migrate_chromadb_collections.py` | ChromaDB 차원 마이그레이션 | +| DOCS | `skills/companyx-rag/SKILL.md` | Default embedding path 문서 | +| DOCS | `book/300_architecture/330_*.md` | ChromaDB 768차원 설계 | +| ivada-infra | skill-embedding 배포 | .env.deploy, 23/24 서버 | + +--- + +## 4. 사실(Facts) + +- robeing skill-embedding은 ko-sroberta 768d, 포트 8515 +- skill-rag-file은 EMBEDDING_SERVICE_URL로 skill-embedding 호출 +- 기존 데이터 적음 → 전수 교체 기술 부채 낮음 +- 0_VALUE 임베딩 정책: Gemini 2, 768d, 멀티모달 + +--- + +## 5. 해석(Interpretation) + +- skill-embedding을 Gemini 2로 전환하면 skill-rag-file·rb8001은 URL만 유지하고 모델은 자동 반영 +- skill-rag-file 내부 직접 Gemini API 호출도 가능. 경로 설계 선택 필요 + +--- + +## 6. 미확정 항목(Unresolved) + +- skill-embedding 교체 vs skill-rag-file 내부 직접 Gemini API 호출 +- 청킹 단위 확대 적용 시점 + +--- + +## 7. 관련 문서 + +- [임베딩 1차 로빙 Gemini 2 전환 문제 오픈](../../troubleshooting/260316_임베딩_1차_로빙_Gemini2_전환_문제오픈.md) +- [임베딩 1차 로빙 Gemini 2 전환 계획](../../plans/260316_임베딩_1차_로빙_Gemini2_전환_계획.md) +- [임베딩 2차 StarsAndI·GooseCouncil 현황 리서치](./260316_임베딩_2차_StarsAndI_GooseCouncil_현황_리서치.md) +- [rb8001 메모리 ChromaDB 768/384 차원 드리프트](../../troubleshooting/260312_rb8001_memory_chromadb_768_384_dimension_drift.md) diff --git a/journey/research/rag/260316_임베딩_2차_StarsAndI_GooseCouncil_현황_리서치.md b/journey/research/rag/260316_임베딩_2차_StarsAndI_GooseCouncil_현황_리서치.md new file mode 100644 index 0000000..65fdd29 --- /dev/null +++ b/journey/research/rag/260316_임베딩_2차_StarsAndI_GooseCouncil_현황_리서치.md @@ -0,0 +1,79 @@ +--- +tags: [research, embedding, starsandi, goosecouncil, 2차] +--- + +# 임베딩 2차: StarsAndI·TheGooseCouncil 현황 리서치 + +**작성일**: 2026-03-16 +**목적**: 2차 전환(StarsAndI, TheGooseCouncil)에 필요한 현황·비용·영향 범위 정리. 1차 완료 후 진행. + +--- + +## 1. 상위 문서 + +- [0_VALUE 임베딩 정책](https://github.com/happybell80/0_VALUE/blob/main/02_Governance/embedding-policy.md) +- [임베딩 2차 StarsAndI·GooseCouncil 전환 문제 오픈](../../troubleshooting/260316_임베딩_2차_StarsAndI_GooseCouncil_전환_문제오픈.md) +- [임베딩 1차 로빙 현황 및 SSOT 리서치](./260316_임베딩_1차_로빙_현황_SSOT_리서치.md) + +--- + +## 2. StarsAndI 현황 + +| 구성요소 | 모델/경로 | 차원 | 비고 | +|----------|-----------|------|------| +| recommend.py | OpenAI text-embedding-3-small | 1536 | 사용자 발화 임베딩 | +| 카탈로그 임베딩 | candidates_merged_projection_embeddings_v1.json | 1536 | 5044개 별, 153MB | +| add_star_embeddings.py | OpenAI text-embedding-3-small | 1536 | 카탈로그 생성 스크립트 | + +**용도**: 별 추천. 사용자 발화 ↔ 카탈로그 cosine 유사도. + +**전환 비용**: 카탈로그 5044개 전체 재임베딩, 153MB JSON 재생성, add_star_embeddings.py Gemini 2 전환. + +--- + +## 3. TheGooseCouncil 현황 + +| 구성요소 | 모델/경로 | 차원 | 비고 | +|----------|-----------|------|------| +| calibrate_value_model.py | OpenAI text-embedding-3-small | 1536 | OPENAI_EMBEDDING_MODEL env | +| test_value_state_decision.py | 동일 | 1536 | 테스트용 | + +**용도**: 가치 평가·캘리브레이션. + +--- + +## 4. 영향 범위 (2차) + +| 프로젝트 | 파일/경로 | 영향 내용 | +|----------|-----------|-----------| +| StarsAndI | recommend.py | _embed_text() Gemini 호출, len(emb)==768 | +| StarsAndI | add_star_embeddings.py | Gemini 2로 전환 | +| StarsAndI | candidates_merged_projection_embeddings_v1.json | 5044개 768d 재생성 | +| StarsAndI | time_recommend_*.py | _embed_text, _top_k_by_embedding | +| TheGooseCouncil | calibrate_value_model.py | OPENAI_EMBEDDING_MODEL → Gemini | +| TheGooseCouncil | test_value_state_decision.py | 동일 | +| TheGooseCouncil | .env.local | OPENAI_EMBEDDING_MODEL | + +--- + +## 5. 사실(Facts) + +- StarsAndI 카탈로그 5044개, 153MB, .gitignore +- add_star_embeddings.py는 candidates_merged_projection_embedded_v1.json 출력 (manifest는 embeddings_v1 참조 가능) +- TheGooseCouncil는 tests·캘리브레이션용 + +--- + +## 6. 미확정 항목(Unresolved) + +- StarsAndI 카탈로그 재임베딩 비용 (5044 × 평균 토큰 × $0.25/1M) +- 2차 전환 우선순위 및 일정 +- TheGooseCouncil 전환 검증 기준 + +--- + +## 7. 관련 문서 + +- [임베딩 2차 StarsAndI·GooseCouncil 전환 문제 오픈](../../troubleshooting/260316_임베딩_2차_StarsAndI_GooseCouncil_전환_문제오픈.md) +- [임베딩 2차 StarsAndI·GooseCouncil 전환 계획](../../plans/260316_임베딩_2차_StarsAndI_GooseCouncil_전환_계획.md) +- [임베딩 전체 프로젝트 현황 및 SSOT 리서치](./260316_임베딩_전체프로젝트_현황_및_SSOT_리서치.md) diff --git a/journey/research/rag/260316_임베딩_전체프로젝트_현황_및_SSOT_리서치.md b/journey/research/rag/260316_임베딩_전체프로젝트_현황_및_SSOT_리서치.md index d078753..6f05780 100644 --- a/journey/research/rag/260316_임베딩_전체프로젝트_현황_및_SSOT_리서치.md +++ b/journey/research/rag/260316_임베딩_전체프로젝트_현황_및_SSOT_리서치.md @@ -1,9 +1,15 @@ --- -tags: [research, embedding, ssot, robeing, starsandi, goosecouncil, workspace] +tags: [research, embedding, ssot, robeing, starsandi, goosecouncil, workspace, index] --- # 임베딩 전체 프로젝트 현황 및 SSOT 리서치 +> **1차·2차로 분리됨.** +> - [1차: 로빙 현황 SSOT](./260316_임베딩_1차_로빙_현황_SSOT_리서치.md) +> - [2차: StarsAndI·GooseCouncil 현황](./260316_임베딩_2차_StarsAndI_GooseCouncil_현황_리서치.md) + +--- + **작성일**: 2026-03-16 **목적**: 워크스페이스 전체 임베딩 사용 현황 조사, 0_VALUE 정책에 따른 SSOT 설정 방안 정리 diff --git a/journey/troubleshooting/260316_임베딩_1차_로빙_Gemini2_전환_문제오픈.md b/journey/troubleshooting/260316_임베딩_1차_로빙_Gemini2_전환_문제오픈.md new file mode 100644 index 0000000..18e40e4 --- /dev/null +++ b/journey/troubleshooting/260316_임베딩_1차_로빙_Gemini2_전환_문제오픈.md @@ -0,0 +1,98 @@ +--- +tags: [troubleshooting, embedding, gemini, rag, robeing, 1차] +--- + +# 임베딩 1차: 로빙 Gemini 2 전환 문제 오픈 + +## 상위 원칙 + +- [0_VALUE 임베딩 정책](https://github.com/happybell80/0_VALUE/blob/main/02_Governance/embedding-policy.md) +- [로빙 문서 작성 원칙](../../book/300_architecture/312_writing-principles.md) +- [백엔드 PostgreSQL ChromaDB Vector Memory](../../book/300_architecture/330_백엔드_PostgreSQL_ChromaDB_Vector_Memory.md) + +## 문제 정의 + +**로빙의 임베딩 구조가 0_VALUE 임베딩 정책과 불일치한다.** + +0_VALUE 정책은 Gemini Embedding 2, 768d, 전수 교체, 멀티모달을 요구한다. 로빙 현재 구현은 이를 충족하지 않는다. (1차 범위: robeing만. StarsAndI·TheGooseCouncil는 [2차](./260316_임베딩_2차_StarsAndI_GooseCouncil_전환_문제오픈.md)) + +### 왜 문제인가 + +- **상태함수=벡터 철학**: 임베딩은 정보의 상태(ψ)를 벡터로 표현한다. ko-sroberta·텍스트 전용 구조는 이 표현을 제한한다. +- **멀티모달 미지원**: PDF·이미지는 캡셔닝 파이프라인을 거쳐야 하므로 비용·지연·정보 손실이 발생한다. +- **차원 혼재**: 768/384 드리프트는 검색 품질·유지보수 부담을 증가시킨다. + +### 현상(증상) + +| 현상 | 내용 | +|------|------| +| 모델 | ko-sroberta(multitask) 768d, 텍스트 전용 | +| 경로 | skill-embedding + 서비스별 혼재 (skill-rag-file 384d, intent_prototypes 768d) | +| 차원 | rb8001 메모리 ChromaDB 768/384 드리프트 잔존 | +| 멀티모달 | 미지원 | +| 청킹 | Micro-chunking(300~500 단어) 위주 | + +## 현재 상태 + +- skill-embedding: ko-sroberta 768d +- skill-rag-file: Company X 384d, intent_prototypes pgvector 768d +- rb8001 메모리: ChromaDB 768/384 차원 드리프트 +- 기존 데이터: 적음 → 전수 교체 시 기술 부채 거의 없음 + +## 기대 상태 (1차 닫힘 기준) + +| 항목 | 내용 | +|------|------| +| 모델 | Gemini Embedding 2 | +| 차원 | 768 (MRL) | +| 적용 | robeing 전역 (skill-embedding, skill-rag-file, rb8001) | +| 멀티모달 | PDF·이미지 직접 임베딩 | +| 청킹 | Macro-chunking(2,000~4,000 토큰) 검토 | + +## 영향 범위 (1차) + +- skill-embedding (전체, /embed) +- skill-rag-file (embedding.py, upload.py, config, docker-compose) +- rb8001 (memory_manager, intent_store, database.py, config, docker-compose) +- ChromaDB 컬렉션, intent_prototypes pgvector +- migrate_chromadb_collections.py +- DOCS/skills/companyx-rag, 330_백엔드 설계 문서 +- ivada-infra skill-embedding 배포 + +## 닫힘 조건 + +1. skill-embedding 또는 skill-rag-file이 Gemini 2, 768d로 동작한다. +2. rb8001이 새 임베딩 경로를 참조한다. +3. ChromaDB·pgvector 스키마가 768d로 통일된다. +4. Company X RAG, NAS RAG가 새 경로로 동작한다. +5. worklog에서 닫힘 선언한다. + +## 재현 조건 + +- NAS RAG, Company X RAG, rb8001 메모리에서 임베딩 요청 시 +- 0_VALUE 임베딩 정책과 로빙 구현을 대조할 때 + +## 확인된 사실 + +- 0_VALUE 임베딩 정책 확정: Gemini 2, 768d, 전수 교체, 멀티모달 +- 리서치(260315)에서 Gemini Embedding 2 특징·비용·청킹 전략 정리됨 +- `rb8001/scripts/test_gemini_embedding_2.py` API 테스트 스크립트 존재 +- 기존 데이터 적음 → 전수 교체 부담 낮음 + +## 미확정 항목 + +- skill-embedding 교체 vs skill-rag-file 내부 직접 Gemini API 호출 +- 청킹 단위 확대 적용 시점 + +## 이 문서가 여는 리서치 + +- [임베딩 1차 로빙 현황 및 SSOT 리서치](../research/rag/260316_임베딩_1차_로빙_현황_SSOT_리서치.md) +- [Gemini Embedding 2 리서치: 비용·청킹·도입 검토](../research/rag/260315_Gemini_Embedding_2_리서치_비용_청킹_도입검토.md) + +## 관련 문서 + +- [0_VALUE 임베딩 정책](https://github.com/happybell80/0_VALUE/blob/main/02_Governance/embedding-policy.md) +- [임베딩 1차 로빙 Gemini 2 전환 계획](../plans/260316_임베딩_1차_로빙_Gemini2_전환_계획.md) +- [임베딩 2차 StarsAndI·GooseCouncil 전환 문제 오픈](./260316_임베딩_2차_StarsAndI_GooseCouncil_전환_문제오픈.md) +- [rb8001 메모리 ChromaDB 768/384 차원 드리프트](./260312_rb8001_memory_chromadb_768_384_dimension_drift.md) +- [skill-embedding 서비스 구축](./250805_happybell80_skill-embedding서비스구축.md) diff --git a/journey/troubleshooting/260316_임베딩_2차_StarsAndI_GooseCouncil_전환_문제오픈.md b/journey/troubleshooting/260316_임베딩_2차_StarsAndI_GooseCouncil_전환_문제오픈.md new file mode 100644 index 0000000..37b841a --- /dev/null +++ b/journey/troubleshooting/260316_임베딩_2차_StarsAndI_GooseCouncil_전환_문제오픈.md @@ -0,0 +1,62 @@ +--- +tags: [troubleshooting, embedding, gemini, starsandi, goosecouncil, 2차] +--- + +# 임베딩 2차: StarsAndI·TheGooseCouncil Gemini 2 전환 문제 오픈 + +## 상위 원칙 + +- [0_VALUE 임베딩 정책](https://github.com/happybell80/0_VALUE/blob/main/02_Governance/embedding-policy.md) +- [임베딩 1차 로빙 Gemini 2 전환 문제 오픈](./260316_임베딩_1차_로빙_Gemini2_전환_문제오픈.md) (1차 완료 후 이어짐) + +## 문제 정의 + +**StarsAndI·TheGooseCouncil의 임베딩이 0_VALUE 정책과 불일치한다.** + +0_VALUE 정책은 Gemini 2, 768d, 전수 교체를 요구한다. 1차(로빙) 완료 후 2차로 진행. 닫기 비용이 큰 항목을 포함한다. + +### 왜 2차로 분리했는가 + +- **StarsAndI**: 카탈로그 5044개 재임베딩(153MB JSON), add_star_embeddings.py 전환, 비용·시간 부담 +- **TheGooseCouncil**: 가치 평가·캘리브레이션용 임베딩, 전환 검증 필요 + +### 현상(증상) + +| 프로젝트 | 모델 | 차원 | 비고 | +|----------|------|------|------| +| StarsAndI | OpenAI text-embedding-3-small | 1536 | 사용자 발화 + 카탈로그 5044개 | +| TheGooseCouncil | OpenAI text-embedding-3-small | 1536 | calibrate_value_model, test_value_state_decision | + +## 현재 상태 + +- StarsAndI: recommend.py, add_star_embeddings.py, 153MB 카탈로그 JSON +- TheGooseCouncil: tests/, .env.local, OPENAI_EMBEDDING_MODEL + +## 기대 상태 (2차) + +- Gemini 2, 768d +- StarsAndI: 카탈로그 전체 재임베딩, _embed_text() 전환 +- TheGooseCouncil: API 경로 전환 + +## 영향 범위 (2차) + +**StarsAndI**: recommend.py, add_star_embeddings.py, candidates_merged_projection_embeddings_v1.json(5044개 재생성), time_recommend_*.py, usage_repository.py, Recommend_Pipeline.md + +**TheGooseCouncil**: calibrate_value_model.py, test_value_state_decision.py, .env.local + +## 닫힘 조건 (2차, 열어둠) + +- 1차 완료 후 2차 플랜 실행 +- StarsAndI 카탈로그 재임베딩 완료, recommend.py 전환 +- TheGooseCouncil 전환 완료 +- 일정·우선순위는 2차 플랜에서 확정 + +## 이 문서가 여는 리서치 + +- [임베딩 2차 StarsAndI·GooseCouncil 현황 리서치](../research/rag/260316_임베딩_2차_StarsAndI_GooseCouncil_현황_리서치.md) + +## 관련 문서 + +- [임베딩 1차 로빙 Gemini 2 전환 문제 오픈](./260316_임베딩_1차_로빙_Gemini2_전환_문제오픈.md) +- [임베딩 2차 StarsAndI·GooseCouncil 전환 계획](../plans/260316_임베딩_2차_StarsAndI_GooseCouncil_전환_계획.md) +- [임베딩 전체 프로젝트 현황 및 SSOT 리서치](../research/rag/260316_임베딩_전체프로젝트_현황_및_SSOT_리서치.md) diff --git a/journey/troubleshooting/260316_임베딩_Gemini_Embedding_2_전환_문제오픈.md b/journey/troubleshooting/260316_임베딩_Gemini_Embedding_2_전환_문제오픈.md index 2550027..856ffed 100644 --- a/journey/troubleshooting/260316_임베딩_Gemini_Embedding_2_전환_문제오픈.md +++ b/journey/troubleshooting/260316_임베딩_Gemini_Embedding_2_전환_문제오픈.md @@ -1,9 +1,15 @@ --- -tags: [troubleshooting, embedding, gemini, rag, robeing] +tags: [troubleshooting, embedding, gemini, rag, robeing, deprecated] --- # 임베딩 Gemini Embedding 2 전환 문제 오픈 +> **1차·2차로 분리됨.** +> - [1차: 로빙](./260316_임베딩_1차_로빙_Gemini2_전환_문제오픈.md) (완전 닫힘 가능) +> - [2차: StarsAndI·TheGooseCouncil](./260316_임베딩_2차_StarsAndI_GooseCouncil_전환_문제오픈.md) (열어둠) + +--- + ## 상위 원칙 - [0_VALUE 임베딩 정책](https://github.com/happybell80/0_VALUE/blob/main/02_Governance/embedding-policy.md) diff --git a/journey/troubleshooting/README.md b/journey/troubleshooting/README.md index 6c3432b..a2cfe29 100644 --- a/journey/troubleshooting/README.md +++ b/journey/troubleshooting/README.md @@ -31,8 +31,10 @@ ## 현재 열린 트러블슈팅 우선 문서 -- [260316_임베딩_Gemini_Embedding_2_전환_문제오픈.md](./260316_임베딩_Gemini_Embedding_2_전환_문제오픈.md) - - 상태: 열림 +- [260316_임베딩_1차_로빙_Gemini2_전환_문제오픈.md](./260316_임베딩_1차_로빙_Gemini2_전환_문제오픈.md) + - 상태: 열림 (완전 닫힘 가능) +- [260316_임베딩_2차_StarsAndI_GooseCouncil_전환_문제오픈.md](./260316_임베딩_2차_StarsAndI_GooseCouncil_전환_문제오픈.md) + - 상태: 열림 (1차 완료 후 진행) - [260311_naverworks_briefing_insight_preamble_leak.md](./260311_naverworks_briefing_insight_preamble_leak.md) - 상태: 열림 - [260311_prompt_db_partial_adoption_and_hardcoded_prompts.md](./260311_prompt_db_partial_adoption_and_hardcoded_prompts.md) @@ -63,3 +65,7 @@ - rb8001 사용자 메모리 컬렉션에 남아 있는 768/384 차원 드리프트와 Company X RAG 검증 시 동시 관찰된 에러 기록 - [260312_companyx_rag_answer_composition_regression.md](./260312_companyx_rag_answer_composition_regression.md) - Company X RAG 연결은 되었지만 Slack 실응답에서 직접 답과 질문 적합 근거 선별이 깨진 회귀 기록 +- [260316_임베딩_1차_로빙_Gemini2_전환_문제오픈.md](./260316_임베딩_1차_로빙_Gemini2_전환_문제오픈.md) + - 로빙 임베딩 0_VALUE 정책 불일치, Gemini 2 전환 (완전 닫힘 가능) +- [260316_임베딩_2차_StarsAndI_GooseCouncil_전환_문제오픈.md](./260316_임베딩_2차_StarsAndI_GooseCouncil_전환_문제오픈.md) + - StarsAndI·TheGooseCouncil 임베딩 전환 (1차 완료 후, 열어둠)