pinecone-rag
하는 일
이 도구는 인공지능 에이전트가 중요한 정보를 기억하거나 많은 문서를 검색할 수 있는 시스템을 만들도록 돕습니다. 비슷한 정보를 빠르게 찾는 데 특화된 데이터베이스인 Pinecone을 사용합니다.
사용하는 경우
- ✓AI 에이전트가 지난 대화를 기억하게 하고 싶을 때.
- ✓PDF나 웹 페이지 같은 많은 문서가 있고, AI가 가장 관련성 높은 부분을 찾기를 원할 때.
- ✓AI가 특정 문서 모음의 정보를 사용해 질문에 답하도록 하고 싶을 때.
스킬 링크
https://github.com/github/awesome-copilot/blob/main/skills/pinecone-rag/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“내 업무 문서에 대한 질문에 AI가 답하도록 하고 싶습니다. 우리가 이미 논의한 내용도 기억하도록 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
먼저 Pinecone에 '데이터베이스'를 설정합니다. 그다음 문서나 정보를 AI가 이해하는 형식으로 바꿔 Pinecone에 보냅니다. 마지막으로 AI가 이 정보를 검색하고 활용해 질문에 답하거나 내용을 기억합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Pinecone RAG Skill
This skill guides you through building a production RAG pipeline or persistent agent memory system using Pinecone. Follow the workflow from start to finish — don't skip steps or jump to code before understanding what the user actually needs.
Before you start — ask one question
Before writing any code, identify which of these two use cases applies:
A — RAG over documents: User wants to index a corpus (PDFs, docs, code, web pages) and retrieve relevant chunks to ground LLM responses.
B — Agent memory: User wants an agent to remember facts, decisions, or context across sessions or across multiple agents sharing a knowledge base.
The setup is similar but the namespace strategy and retrieval patterns differ. If the user hasn't said, ask: "Is this for document retrieval, agent memory, or both?" Then follow the relevant workflow below.
Step 1 — Choose your index configuration
Pick the index type before writing any code. Getting this wrong means re-creating the index later.
Serverless (recommended for most cases)
from pinecone import Pinecone, ServerlessSpec
pc = Pinecone(api_key="PINECONE_API_KEY")
if "my-index" not in pc.list_indexes().names():
pc.create_index(
name="my-index",
dimension=1536, # must match your embedding model exactly
metric="cosine",
spec=ServerlessSpec(cloud="aws", region="us-east-1")
)
index = pc.Index("my-index")
Pod-based (for consistent high-throughput production)
from pinecone import PodSpec
pc.create_index(
name="my-index-prod",
dimension=1536,
metric="cosine",
spec=PodSpec(environment="us-east1-gcp", pod_type="p1.x1")
)
Dimension quick reference — match this exactly to your embedding model:
| Model | Dimension |
|---|---|
text-embedding-3-small |
1536 |
text-embedding-3-large |
3072 |
voyage-3 / voyage-multimodal-3 |
1024 |
BAAI/bge-large-en-v1.5 |
1024 |
intfloat/multilingual-e5-large (Arabic, Malay, Chinese) |
1024 |
Checkpoint: Index exists, dimension matches embedding model,
index.describe_index_stats()returns without error.
Step 2 — Embed and upsert documents
Always batch upserts — never upsert one vector at a time.
from openai import OpenAI
client = OpenAI()
def embed(texts: list[str]) -> list[list[float]]:
res = client.embeddings.create(model="text-embedding-3-small", input=texts)
return [r.embedding for r in res.data]
def upsert_docs(index, docs: list[dict], namespace: str = "default"):
"""docs = [{"id": "...", "text": "...", "metadata": {...}}]"""
BATCH = 100
for i in range(0, len(docs), BATCH):
batch = docs[i:i + BATCH]
vecs = [
{
"id": d["id"],
"values": emb,
"metadata": {**d.get("metadata", {}), "text": d["text"]}
}
for d, emb in zip(batch, embed([d["text"] for d in batch]))
]
index.upsert(vectors=vecs, namespace=namespace)
Always store the original text in metadata — this avoids a second lookup at retrieval time.
Checkpoint:
index.describe_index_stats()shows vector count > 0 in the target namespace.
Step 3 — Choose retrieval strategy
Dense (semantic) search — use for most cases
def search(index, query: str, top_k: int = 5, namespace: str = "default",
filter: dict = None) -> list[dict]:
[q_emb] = embed([query])
results = index.query(
vector=q_emb, top_k=top_k, namespace=namespace,
include_metadata=True, filter=filter
)
return [{"text": m.metadata["text"], "score": m.score, "id": m.id}
for m in results.matches]
Hybrid search (semantic + BM25 keyword) — use when corpus has exact terminology
Use hybrid when the domain has precise terms that semantic search misses: legal citations, medical codes, product SKUs, API method names.
from pinecone_text.sparse import BM25Encoder
bm25 = BM25Encoder().default()
bm25.fit([d["text"] for d in docs]) # fit once on your corpus
def hybrid_search(index, query: str, top_k: int = 5, alpha: float = 0.7):
"""alpha=1.0 is pure dense; alpha=0.0 is pure sparse."""
dense = [v * alpha for v in embed([query])[0]]
sparse_raw = bm25.encode_queries(query)
sparse = {
"indices": sparse_raw["indices"],
"values": [v * (1 - alpha) for v in sparse_raw["values"]]
}
…
자주 묻는 질문
Pinecone 같은 '벡터 데이터베이스'는 무엇인가요?
정확한 키워드뿐 아니라 의미를 기준으로 정보를 찾도록 최적화된 특별한 데이터베이스입니다. 텍스트를 숫자(벡터)로 바꾸고, 가장 비슷한 것을 찾습니다.
'RAG'는 무엇을 뜻하나요?
RAG는 Retrieval-Augmented Generation(검색 증강 생성)의 약자입니다. 답을 만들기 전에 AI가 관련 정보를 검색하게 해서, 더 정확하고 잘 아는 답을 만드는 방법입니다.
이것을 쓰려면 코딩을 알아야 하나요?
이 도구는 이런 시스템을 만드는 데 도움을 주도록 설계되었지만, 직접 쓰려면 어느 정도 기술 지식이 필요할 수 있습니다. 목표는 비개발자에게도 과정을 쉽게 만드는 것입니다.
상세 정보
작성자의 원본 설명
Build production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions Pinecone, wants to index documents for semantic search, build a retrieval-augmented generation system, store agent memory across sessions, implement hybrid search, or connect an LLM to a searchable knowledge base — even if they don't say "Pinecone"
repo: github/awesome-copilot
인기도
- GitHub 스타
- 40k
- 순위
- #7324
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
acquire-codebase-knowledge
40k에이전트가 기존 코드 프로젝트를 이해하고 문서화하도록 돕습니다. 새 구성원을 맞이하거나 아키텍처를 개괄적으로 파악할 때 유용합니다.
acreadiness-assess
40k에이전트가 프로젝트의 AI 준비 상태를 평가하고 보고서를 만들도록 합니다. 프로젝트가 AI 도구를 쓸 준비가 얼마나 되어 있는지 이해하는 데 유용합니다.
acreadiness-generate-instructions
40k에이전트가 평가 결과를 바탕으로 AI 도구를 위한 지침을 만들도록 돕습니다. AI가 코드와 상호작용하는 방식을 개선하고 확인된 공백을 메울 때 유용합니다.
acreadiness-policy
40k에이전트가 AI 프로젝트 평가를 위한 정책을 정의하거나 적용하도록 돕습니다. 프로젝트 평가 방식을 표준화하고 규정 준수를 보장할 때 유용합니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.