인덱스 관리

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 애플리케이션 구축하기

조직

각각 고유 인덱스를 가진 두 프로젝트가 있는 조직.

Pinecone로 AI 애플리케이션 구축하기

조직

조직 소유자 그룹.

  • 전체 조직 권한
  • 결제, 사용자, 모든 프로젝트 관리

소유자 아래 여러 사용자가 있는 모습.

  • 제한된 조직 수준 권한
  • 특정 프로젝트에 초대됨
  • 해당 프로젝트의 소유자가 됨
Pinecone로 AI 애플리케이션 구축하기

인덱스 삭제

pc.delete_index('datacamp-index')


pc.list_indexes()
{'indexes': []}
Pinecone로 AI 애플리케이션 구축하기

연습해 봅시다!

Pinecone로 AI 애플리케이션 구축하기

Preparing Video For Download...