インデックスの管理

Pineconeを使ったAIアプリケーション開発

James Chapman

Curriculum Manager, DataCamp

インデックスへの接続

pc = Pinecone(api_key="API_KEY")

pc.create_index(
    name='datacamp-index',
    dimension=1536,
    spec=ServerlessSpec(
        cloud='aws', 
        region='us-east-1'
    )
)


index = pc.Index('datacamp-index')
Pineconeを使ったAIアプリケーション開発

インデックスへの接続

index = pc.Index('datacamp-first')
...
pinecone.core.client.exceptions.NotFoundException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'content-type': 'text/plain; charset=...
HTTP response body: {"error":{"code":"NOT_FOUND","message":"Resource datacamp-first
not found"},"status":404}
Pineconeを使ったAIアプリケーション開発

インデックス統計

index.describe_index_stats()
{'dimension': 1536,
 'index_fullness': 0.0,
 'namespaces': {},
 'total_vector_count': 0}
Pineconeを使ったAIアプリケーション開発

名前空間

 

  • インデックスを分割するコンテナ
    • データセットを分離
    • データのバージョニング
    • グループを分離

 

今は単一の名前空間に集中

複数の名前空間を含むインデックス。

Pineconeを使ったAIアプリケーション開発

組織

2つのプロジェクトと各プロジェクトのインデックスを含む組織。

Pineconeを使ったAIアプリケーション開発

組織

組織オーナーのグループ。

  • 組織全体の権限
  • 請求、ユーザー、すべてのプロジェクトを管理

オーナーとその下の複数ユーザー。

  • 制限付きの組織レベル権限
  • 特定プロジェクトに招待
  • そのプロジェクトのオーナーに昇格
Pineconeを使ったAIアプリケーション開発

インデックスの削除

pc.delete_index('datacamp-index')


pc.list_indexes()
{'indexes': []}
Pineconeを使ったAIアプリケーション開発

Passons à la pratique !

Pineconeを使ったAIアプリケーション開発

Preparing Video For Download...