Pinecone

使用 Pinecone 云数据库进行生产级向量搜索。

快速开始

skill-seekers scrape --format pinecone --config configs/react.json

设置

  1. Pinecone 控制台 获取 API 密钥

  2. 安装依赖:

pip install pinecone-client
  1. 上传到 Pinecone:
from pinecone import Pinecone, ServerlessSpec
import json

# 初始化
pc = Pinecone(api_key="your-api-key")

# 创建索引
index = pc.Index("react-docs")

# 加载并插入数据
with open("output/react-pinecone.json") as f:
    data = json.load(f)
    
index.upsert(vectors=data)

功能特性

  • 无服务器 - 按需付费
  • 元数据过滤 - 按类别、来源过滤
  • 混合搜索 - 结合语义和关键词
  • 高可用性 - 生产级 SLA

查询示例

# 查询
results = index.query(
    vector=embedding,
    top_k=5,
    filter={"category": "api"}
)

下一步