From 6e5c439a497ad00d2e6b4e692b8da84d9574b8de Mon Sep 17 00:00:00 2001 From: happybell80 Date: Mon, 16 Mar 2026 13:12:40 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20=EC=9E=84=EB=B2=A0=EB=94=A9=20=EC=A0=84?= =?UTF-8?q?=EC=B2=B4=20=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8=20=ED=98=84?= =?UTF-8?q?=ED=99=A9=C2=B7SSOT=20=EB=A6=AC=EC=84=9C=EC=B9=98=20=EB=B3=B4?= =?UTF-8?q?=EA=B0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 신규: 260316_임베딩_전체프로젝트_현황_및_SSOT_리서치 - robeing, StarsAndI, TheGooseCouncil, companyx 등 전수 조사 - 0_VALUE 정책 불일치 요약, SSOT 설정 방안 - 트러블-리서치 연결: 이 문서가 여는 리서치 섹션 추가 - 260315: 전수 교체 정책 반영, 현황 리서치 링크 - 계획: 전수 교체 목표, 전체 프로젝트 적용 범위 Made-with: Cursor --- ...베딩_Gemini_Embedding_2_전환_계획.md | 10 +- journey/research/README.md | 1 + ..._2_리서치_비용_청킹_도입검토.md | 5 +- ...프로젝트_현황_및_SSOT_리서치.md | 136 ++++++++++++++++++ ..._Gemini_Embedding_2_전환_문제오픈.md | 6 +- 5 files changed, 150 insertions(+), 8 deletions(-) create mode 100644 journey/research/rag/260316_임베딩_전체프로젝트_현황_및_SSOT_리서치.md diff --git a/journey/plans/260316_임베딩_Gemini_Embedding_2_전환_계획.md b/journey/plans/260316_임베딩_Gemini_Embedding_2_전환_계획.md index 6c7c58c..e8208de 100644 --- a/journey/plans/260316_임베딩_Gemini_Embedding_2_전환_계획.md +++ b/journey/plans/260316_임베딩_Gemini_Embedding_2_전환_계획.md @@ -9,6 +9,7 @@ tags: [plans, embedding, gemini, rag, robeing] - [0_VALUE 임베딩 정책](https://github.com/happybell80/0_VALUE/blob/main/02_Governance/embedding-policy.md) - [로빙 문서 작성 원칙](../../book/300_architecture/312_writing-principles.md) - [임베딩 Gemini Embedding 2 전환 문제 오픈](../troubleshooting/260316_임베딩_Gemini_Embedding_2_전환_문제오픈.md) +- [임베딩 전체 프로젝트 현황 및 SSOT 리서치](../research/rag/260316_임베딩_전체프로젝트_현황_및_SSOT_리서치.md) - [Gemini Embedding 2 리서치: 비용·청킹·도입 검토](../research/rag/260315_Gemini_Embedding_2_리서치_비용_청킹_도입검토.md) ## 상태 @@ -17,9 +18,9 @@ tags: [plans, embedding, gemini, rag, robeing] ## 목표 -- Gemini Embedding 2를 NAS RAG·Company X RAG에 부분 도입 또는 하이브리드 적용합니다. +- Gemini Embedding 2를 0_VALUE 정책에 따라 전수 교체합니다. - 멀티모달(이미지, PDF) 직접 임베딩으로 캡셔닝 파이프라인 비용·지연을 줄입니다. -- 기존 ko-sroberta(768d)와의 품질·비용 비교 후 전환 범위를 확정합니다. +- robeing·StarsAndI·TheGooseCouncil 등 전체 프로젝트에 적용합니다. ## 범위 @@ -33,7 +34,6 @@ tags: [plans, embedding, gemini, rag, robeing] ### 제외 - rb8001 메모리 768/384 차원 드리프트 해결 (별도 이슈) -- skill-embedding ko-sroberta 즉시 제거 (과도기 병용 가능) ## 적용 순서 @@ -41,8 +41,8 @@ tags: [plans, embedding, gemini, rag, robeing] - `rb8001/scripts/test_gemini_embedding_2.py` 확장 또는 별도 벤치마크 - 무료 티어로 PDF·이미지 임베딩 품질 비교 2. **경로 설계** - - skill-embedding에 Gemini 2 옵션 추가 vs skill-rag-file 내부 직접 호출 - - 하이브리드: 미디어=Gemini 2, 텍스트=ko-sroberta 또는 text-embedding-004 + - skill-embedding을 Gemini 2로 전환 vs skill-rag-file 내부 직접 Gemini API 호출 + - [전체 프로젝트 현황 리서치](../research/rag/260316_임베딩_전체프로젝트_현황_및_SSOT_리서치.md) 참조 3. **스키마·청킹** - output_dimensionality=768 확정 시 기존 ChromaDB 호환 - 청킹 단위 2,000~4,000 토큰으로 확대 검토 diff --git a/journey/research/README.md b/journey/research/README.md index ea1e685..95f8e5d 100644 --- a/journey/research/README.md +++ b/journey/research/README.md @@ -16,6 +16,7 @@ - [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) ### [기억(Memory)](./memory/README.md) - 장단기 기억 메커니즘 diff --git a/journey/research/rag/260315_Gemini_Embedding_2_리서치_비용_청킹_도입검토.md b/journey/research/rag/260315_Gemini_Embedding_2_리서치_비용_청킹_도입검토.md index f3c3fe9..b82814f 100644 --- a/journey/research/rag/260315_Gemini_Embedding_2_리서치_비용_청킹_도입검토.md +++ b/journey/research/rag/260315_Gemini_Embedding_2_리서치_비용_청킹_도입검토.md @@ -87,9 +87,9 @@ print(response.embeddings[0].values) ### 4.4 종합 제안 -- NAS 기반 RAG에 **부분 도입** 권장 +- **0_VALUE 정책**: 전수 교체, 768d, 멀티모달. [embedding-policy](https://github.com/happybell80/0_VALUE/blob/main/02_Governance/embedding-policy.md) 참조. - 무료 티어로 PDF·이미지 임베딩 테스트 후 품질 비교 -- 품질 차이 확실하면 **하이브리드**: 미디어는 Gemini Embedding 2, 텍스트는 저렴한 모델 +- 전체 프로젝트 현황·SSOT: [260316_임베딩_전체프로젝트_현황_및_SSOT_리서치](./260316_임베딩_전체프로젝트_현황_및_SSOT_리서치.md) --- @@ -127,4 +127,5 @@ print(response.embeddings[0].values) ## 7. 후속 문서 - [임베딩 Gemini Embedding 2 전환 문제 오픈](../../troubleshooting/260316_임베딩_Gemini_Embedding_2_전환_문제오픈.md) +- [임베딩 전체 프로젝트 현황 및 SSOT 리서치](./260316_임베딩_전체프로젝트_현황_및_SSOT_리서치.md) - [임베딩 Gemini Embedding 2 전환 계획](../../plans/260316_임베딩_Gemini_Embedding_2_전환_계획.md) diff --git a/journey/research/rag/260316_임베딩_전체프로젝트_현황_및_SSOT_리서치.md b/journey/research/rag/260316_임베딩_전체프로젝트_현황_및_SSOT_리서치.md new file mode 100644 index 0000000..7f341e6 --- /dev/null +++ b/journey/research/rag/260316_임베딩_전체프로젝트_현황_및_SSOT_리서치.md @@ -0,0 +1,136 @@ +--- +tags: [research, embedding, ssot, robeing, starsandi, goosecouncil, workspace] +--- + +# 임베딩 전체 프로젝트 현황 및 SSOT 리서치 + +**작성일**: 2026-03-16 +**목적**: 워크스페이스 전체 임베딩 사용 현황 조사, 0_VALUE 정책에 따른 SSOT 설정 방안 정리 + +--- + +## 1. 상위 문서 + +- [0_VALUE 임베딩 정책](https://github.com/happybell80/0_VALUE/blob/main/02_Governance/embedding-policy.md) +- [임베딩 Gemini Embedding 2 전환 문제 오픈](../../troubleshooting/260316_임베딩_Gemini_Embedding_2_전환_문제오픈.md) +- [Gemini Embedding 2 리서치: 비용·청킹·도입 검토](./260315_Gemini_Embedding_2_리서치_비용_청킹_도입검토.md) + +--- + +## 2. 전체 프로젝트 임베딩 현황 + +### 2.1 robeing + +| 구성요소 | 모델/경로 | 차원 | 비고 | +|----------|-----------|------|------| +| 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) 참조. + +### 2.2 StarsAndI + +| 구성요소 | 모델/경로 | 차원 | 비고 | +|----------|-----------|------|------| +| recommend.py | OpenAI text-embedding-3-small | 1536 | 직접 API 호출 | + +**경로**: `StarsAndI/apps/apps/api-py/app/services/recommend.py` +**엔드포인트**: `https://api.openai.com/v1/embeddings` + +### 2.3 TheGooseCouncil + +| 구성요소 | 모델/경로 | 차원 | 비고 | +|----------|-----------|------|------| +| calibrate_value_model.py | OpenAI text-embedding-3-small | 1536 | OPENAI_EMBEDDING_MODEL env | +| test_value_state_decision.py | 동일 | 1536 | 테스트용 | + +**경로**: `TheGooseCouncil/tests/`, `.env.local` +**엔드포인트**: `https://api.openai.com/v1/embeddings` + +### 2.4 companyx-knowledge-base + +- **직접 임베딩 코드 없음**. skill-rag-file(robeing) 경유. +- SKILL 문서: "Default embedding path: local 384d" + +### 2.5 goosefarminvesting + +- **pgvector** 언급 (backend README). 실제 임베딩 사용 코드 미확인. +- 지도/공간 데이터용일 가능성 있음. + +### 2.6 reference/openclaw + +- **외부 참조** 프로젝트. 우리 구현체 아님. +- 지원: openai, gemini, voyage, mistral, ollama, local +- Gemini embedding-2: 768/1536/3072 차원 + +--- + +## 3. 0_VALUE 정책과의 불일치 요약 + +| 프로젝트 | 현재 | 0_VALUE 요구 | 불일치 | +|----------|------|--------------|--------| +| robeing | ko-sroberta 768d, 384d 혼재 | Gemini 2, 768d, 전수 교체 | 모델, 차원 혼재, 멀티모달 미지원 | +| StarsAndI | OpenAI text-embedding-3-small | Gemini 2, 768d | 모델, 차원 | +| TheGooseCouncil | OpenAI text-embedding-3-small | Gemini 2, 768d | 모델, 차원 | +| companyx-knowledge-base | skill-rag-file 경유 (384d) | Gemini 2, 768d | robeing 전환 시 연쇄 반영 | + +--- + +## 4. SSOT 설정 방안 + +### 4.1 정책 SSOT (확정) + +- **위치**: `0_VALUE/02_Governance/embedding-policy.md` +- **내용**: 모델(Gemini 2), 차원(768), 적용(전수 교체), 멀티모달 + +### 4.2 런타임 SSOT (설정 가능) + +- **현재**: 프로젝트별 개별 설정 (skill-embedding URL, OpenAI API, .env 등) +- **목표**: `workspace-config/runtime.env` 또는 동등한 공용 설정에 `EMBEDDING_MODEL`, `EMBEDDING_DIM`, `EMBEDDING_SERVICE_URL` 등 통합 +- **전제**: [0_VALUE Infrastructure SSOT Principle](https://github.com/happybell80/0_VALUE/blob/main/02_Governance/infrastructure-ssot-principle.md) + +### 4.3 적용 순서 + +1. robeing: skill-embedding → Gemini 2 경로 전환, 768d 통일 +2. skill-rag-file, rb8001: 새 임베딩 서비스/API 참조 +3. StarsAndI, TheGooseCouncil: Gemini API 또는 공용 skill-embedding 호출로 전환 +4. workspace-config: 임베딩 관련 키 추가 (과도기) + +--- + +## 5. 사실(Facts) + +- robeing skill-embedding은 ko-sroberta 768d, 포트 8515 +- skill-rag-file은 `EMBEDDING_SERVICE_URL`로 skill-embedding 호출 +- StarsAndI, TheGooseCouncil는 OpenAI text-embedding-3-small 직접 호출 +- 0_VALUE 임베딩 정책은 Gemini 2, 768d, 전수 교체, 멀티모달로 확정 +- workspace-config에는 현재 임베딩 관련 키 없음 + +--- + +## 6. 해석(Interpretation) + +- 전수 교체 시 robeing뿐 아니라 StarsAndI, TheGooseCouncil도 변경 대상 +- 공용 skill-embedding이 Gemini 2로 전환되면, skill-rag-file·rb8001은 URL만 유지하고 모델은 자동 반영 +- StarsAndI·TheGooseCouncil는 API 경로 변경(OpenAI → Gemini 또는 skill-embedding) 필요 + +--- + +## 7. 미확정 항목(Unresolved) + +- workspace-config에 임베딩 키를 넣을지, 프로젝트별 .env만 유지할지 +- StarsAndI·TheGooseCouncil 전환 우선순위 및 일정 +- goosefarminvesting pgvector 용도 (임베딩 vs 공간 데이터) + +--- + +## 8. 관련 문서 + +- [임베딩 Gemini Embedding 2 전환 문제 오픈](../../troubleshooting/260316_임베딩_Gemini_Embedding_2_전환_문제오픈.md) +- [임베딩 Gemini Embedding 2 전환 계획](../../plans/260316_임베딩_Gemini_Embedding_2_전환_계획.md) +- [Gemini Embedding 2 리서치: 비용·청킹·도입 검토](./260315_Gemini_Embedding_2_리서치_비용_청킹_도입검토.md) +- [rb8001 메모리 ChromaDB 768/384 차원 드리프트](../../troubleshooting/260312_rb8001_memory_chromadb_768_384_dimension_drift.md) +- [skill-embedding 서비스 구축](../../troubleshooting/250805_happybell80_skill-embedding서비스구축.md) diff --git a/journey/troubleshooting/260316_임베딩_Gemini_Embedding_2_전환_문제오픈.md b/journey/troubleshooting/260316_임베딩_Gemini_Embedding_2_전환_문제오픈.md index eb411a1..21dc3e9 100644 --- a/journey/troubleshooting/260316_임베딩_Gemini_Embedding_2_전환_문제오픈.md +++ b/journey/troubleshooting/260316_임베딩_Gemini_Embedding_2_전환_문제오픈.md @@ -73,10 +73,14 @@ tags: [troubleshooting, embedding, gemini, rag, robeing] - skill-embedding 교체 vs Gemini API 직접 호출 경로 설계 - 청킹 단위 확대 적용 시점 및 검증 기준 +## 이 문서가 여는 리서치 + +- [임베딩 전체 프로젝트 현황 및 SSOT 리서치](../research/rag/260316_임베딩_전체프로젝트_현황_및_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) -- [Gemini Embedding 2 리서치: 비용·청킹·도입 검토](../research/rag/260315_Gemini_Embedding_2_리서치_비용_청킹_도입검토.md) - [임베딩 Gemini Embedding 2 전환 계획](../plans/260316_임베딩_Gemini_Embedding_2_전환_계획.md) - [rb8001 메모리 ChromaDB 768/384 차원 드리프트](./260312_rb8001_memory_chromadb_768_384_dimension_drift.md) - [skill-embedding 서비스 구축](./250805_happybell80_skill-embedding서비스구축.md)