From 0a967ce7c12fc0b88f8f900f525f995c744cc15d Mon Sep 17 00:00:00 2001 From: happybell80 Date: Sat, 21 Mar 2026 13:04:53 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20SKILL.md=EB=A5=BC=203=EC=A4=91=20?= =?UTF-8?q?=EA=B2=80=EC=83=89=20+=20CompanyXRAGOutput=20=EA=B8=B0=EC=A4=80?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=A0=95=ED=95=A9=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 검색 경로에 벡터+키워드+그래프 RRF 합산 명시 - Storage에 AGE 추가 - Question Types 4종 섹션 추가 - Response Shape를 Pydantic 모델 기준으로 갱신 Co-Authored-By: Claude Opus 4.6 (1M context) --- skills/companyx-rag/SKILL.md | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/skills/companyx-rag/SKILL.md b/skills/companyx-rag/SKILL.md index 63cf29a..c2e0074 100644 --- a/skills/companyx-rag/SKILL.md +++ b/skills/companyx-rag/SKILL.md @@ -33,21 +33,28 @@ Use this skill only for Company X users and only when the answer should be groun ## Current Operating Path - Team boundary: `79441171-3951-4870-beb8-916d07fe8be5` -- Retrieval service: `skill-rag-file` +- Retrieval service: `skill-rag-file` (`/api/search`, `search_mode=hybrid`) +- 검색 경로: 벡터(PGVector cosine) + 키워드(TSVECTOR + GIN) + 그래프(Apache AGE) → RRF 합산 - Embedding: Gemini Embedding 2 (`gemini-embedding-2-preview`), `768d`, skill-embedding 게이트웨이 경유 -- Storage: PostgreSQL (pgvector) 단일 운영. ChromaDB는 레거시(운영 비사용). +- Storage: PostgreSQL (pgvector + AGE) 단일 운영. ChromaDB는 레거시(운영 비사용). - 청킹: 텍스트 추출 후 문자 단위 분할 (chunk_size=1000, overlap=200) - 인덱싱 대상: 200개 파일 (`latest_200_companyx.txt`), DB 기준 `team_document` 1,172건 / `team_document_chunk` 3,095건 - NAS 원본: `/mnt/nas/workspace/6.Company X` (53,249 파일) +## Question Types + +- `fact_check`: 사실 확인 (기본값) — "근거 있어?", "협력 관계야?" +- `explanatory`: 설명 요청 — "뭐야?", "설명해줘" +- `quantitative`: 수치 질문 — "몇 개야?", "얼마나?" +- `recap`: 재정리 — "다시 정리해줘", "문서명만" + ## Response Shape -- Direct answer: `네/아니요/현재는 단정 불가` -- Evidence section: - - document name - - short snippet summary - - chunk/page hint if available -- Limitation section when needed: - - `문서 없음` - - `문서 간 불일치` - - `최신 집계 미확인` +- Pydantic 모델: `CompanyXRAGOutput` + - `direct_answer`: 1~3문장 답변 (근거 부족 시 빈 문자열) + - `evidence_docs`: 근거 문서 파일명 목록 + - `failure_reason`: 답변 불가 사유 (`null` 또는 "문서 없음", "단정 불가" 등) +- 사용자 응답 구조: + 1. Direct answer: `네/아니요/현재는 단정 불가` + 2. Evidence section: 문서명, snippet 요약, chunk/page, 점수(score, vec, kw) + 3. Limitation section (필요 시): `문서 없음`, `문서 간 불일치`, `최신 집계 미확인`