소스 정보
- 저장소
- cdeistopened/skill-stack-skills
- 최근 소스 활동
- 2026년 3월 18일 01:11
- 감지된 SKILL.md 언어
- 영어
- 스타
- 3
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/cdeistopened/skill-stack-skills --skill wiki-embed-qdrant명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | wiki-embed-qdrant |
| description | Embed semantic chunks into Qdrant Cloud for the production RAG backend API. |
Create vector embeddings from semantic chunks using the Gemini embedding API and upsert them into a Qdrant Cloud collection. This powers the production chatbot/RAG backend deployed on Railway.
After chunks exist in data/chunks/ (from wiki-chunk). This step makes the wiki searchable via the shared backend API.
data/chunks/ (JSON files from the chunking pipeline)qdrant-client, requests, python-dotenv, pyyaml| Variable | Required | Source |
|---|---|---|
GEMINI_API_KEY | Yes | ~/.zshrc or shared-backend/.env |
QDRANT_API_KEY | Yes | ~/.zshrc or shared-backend/.env |
QDRANT_CLOUD_URL | Yes | ~/.zshrc or shared-backend/.env |
All three variables must be set. The embed script loads from shared-backend/.env via python-dotenv.
cd wiki-projects/shared-backend
# Embed chunks for a specific wiki
python3 embed_chunks.py --wiki {slug}
# Custom batch size (default: 20)
python3 embed_chunks.py --wiki {slug} --batch-size 50
# Resume from a specific offset (skip first N chunks)
python3 embed_chunks.py --wiki {slug} --start-from 500
| Flag | Default | Description |
|---|---|---|
--wiki | Required | Wiki slug (must be in WIKI_CONFIGS) |
--batch-size | 20 | Chunks per Qdrant upsert batch |
--start-from | 0 | Skip first N chunks (for resuming) |
Before running for a new wiki, add it to the WIKI_CONFIGS dict in shared-backend/embed_chunks.py:
WIKI_CONFIGS = {
# ... existing entries ...
"{slug}": {
"chunks_dir": Path(__file__).parent.parent / "{slug}-wiki/data/chunks",
"collection": "{slug}_chunks",
},
}
Also add the wiki to the backend API config in shared-backend/main.py:
"{slug}": {
"name": "{Wiki Name}",
"collection": "{slug}_chunks",
"backend": "qdrant_cloud",
"prompt_context": "brief description of content domain",
"source_label": "{Show Name}",
}
--start-from is 0, automatically resume from the existing point countgemini-embedding-001)PointStruct with vector and metadata payload| Setting | Value |
|---|---|
| Model | gemini-embedding-001 |
| Vector dimensions | 768 |
| Distance metric | Cosine |
| Max text length | 8000 characters (truncated) |
| API method | REST (generativelanguage.googleapis.com/v1beta) |
Each point in Qdrant stores:
{
"id": 0,
"vector": [0.123, -0.456, ...],
"payload": {
"text": "Full chunk content...",
"episode_title": "Episode Title",
"episode_date": "",
"topic_title": "Topic Name",
"topic_type": "framework",
"url": "",
"start_timestamp": "05:30"
}
}
MFM and MoneyWise also include key_entities in the payload.
{slug}_chunksAfter embedding, test via the shared backend:
# Check stats
curl https://api-production-4224.up.railway.app/stats/{slug}
# Test a query
curl -X POST https://api-production-4224.up.railway.app/chat \
-H "Content-Type: application/json" \
-H "X-User-Email: test@example.com" \
-d '{"wiki":"{slug}","query":"test query here","limit":5}'
Daily limit is 20 queries per email.
After embedding:
Vector count matches chunk count: Compare Qdrant collection point count against total chunks:
# Expected chunks
python3 -c "
import json, glob
total = sum(json.load(open(f))['total_chunks'] for f in glob.glob('../{slug}-wiki/data/chunks/*.json'))
print(f'Expected: {total}')
"
Test RAG queries: Run 3-5 test queries against the backend and verify results are relevant
Payload completeness: Query a single point and verify all metadata fields are present:
from qdrant_client import QdrantClient
client = QdrantClient(url=QDRANT_CLOUD_URL, api_key=QDRANT_API_KEY)
points = client.scroll(collection_name="{slug}_chunks", limit=1)
print(points[0][0].payload)
No empty vectors: Spot-check that retrieved results have meaningful text content
The embed script does not read wiki.yaml directly. It uses the hardcoded WIKI_CONFIGS dict in embed_chunks.py. The convention is:
{slug}-wiki/data/chunks{slug}_chunks| File | Purpose |
|---|---|
wiki-projects/shared-backend/embed_chunks.py | Embedding and Qdrant upsert script |
wiki-projects/shared-backend/main.py | RAG backend API (FastAPI on Railway) |
wiki-projects/shared-backend/.env | API keys (GEMINI, QDRANT) |
"Collection not found" on query: The collection was created but is empty. Check that the embedding step completed without errors.
Auto-resume skips everything: If the collection already has the right number of points, the script correctly skips. Use --start-from 0 and delete/recreate the collection to force re-embedding.
Gemini embedding API 429 (rate limit): Reduce batch size to 10 and add delays. The script does not have built-in rate limiting for embedding calls.
Qdrant connection timeout: Check QDRANT_CLOUD_URL format. It should be https://xxxxxxxx.us-east4-0.gcp.cloud.qdrant.io:6333 (with port).
Partial upload (interrupted): The auto-resume feature handles this. Re-run the same command and it will pick up from where it left off based on existing point count.
Different chunk formats per wiki: The embed script has wiki-specific loader functions (load_mfm_chunks, load_huberman_chunks, etc.) because chunk JSON schemas vary slightly between older and newer wikis. New wikis using the shared lib chunker follow the MFM/MoneyWise format.