Pinecone Vector Database

Pinecone vector database integration for Delphi. Store embeddings, perform similarity search, and build AI-powered retrieval systems.

TsgcAIDatabaseVectorPinecone

Pinecone-backed vector database. Plug it into TsgcAIOpenAIEmbeddings.Database and it upserts every chunk via the Pinecone REST API; query nearest neighbours with one call.

Component class

TsgcAIDatabaseVectorPinecone

Platforms

Windows, macOS, Linux, iOS, Android

Edition

Enterprise (AI add-on)

Drop the component, set a few properties, go

Set ApiKey + Environment + IndexName, then pair with a TsgcAIOpenAIEmbeddings to push and query vectors.

uses
  sgcAI_DB_Vector, sgcAI_DB_Vector_Pinecone, sgcAI_OpenAI_Embeddings;

var
  DBPinecone: TsgcAIDatabaseVectorPinecone;
  Embeddings: TsgcAIOpenAIEmbeddings;
begin
  DBPinecone := TsgcAIDatabaseVectorPinecone.Create(nil);
  DBPinecone.PineconeOptions.ApiKey         := 'pc-...';
  DBPinecone.PineconeOptions.Environment    := 'us-west4-gcp-free';
  DBPinecone.PineconeIndexOptions.IndexName := 'sgc-embeddings';
  DBPinecone.PineconeIndexOptions.ProjectId := 'abcd1234';

  // Combine with the OpenAI embeddings component...
  Embeddings := TsgcAIOpenAIEmbeddings.Create(nil);
  Embeddings.OpenAIOptions.ApiKey := 'sk-...';
  Embeddings.Database := DBPinecone;

  // ... and ingest a corpus in a single batch upsert
  Embeddings.CreateEmbeddingsFromFile('docs.txt');

  // Query the nearest neighbour for an arbitrary text
  Memo1.Lines.Text := DBPinecone.QueryData(
    Embeddings.GetEmbedding('what is sgcWebSockets?', ''));
end;

What's inside

3 published properties, 4 methods — pulled from the component reference.

Configuration

Published properties: PineconeOptions, PineconeIndexOptions.

Diagnostics

Published properties: Version.

Ingest

Methods: BeginAddData, AddData, EndAddData.

Query

Methods: QueryData.

Specifications & references

Authoritative sources for the protocols this component implements.

Documentation & Demos

Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.

Demo Project — Demos\AI\Pinecone Ready-to-run example project. Ships inside the sgcWebSockets package — download the trial below.
Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only.
User Manual (PDF) Comprehensive manual covering every component in the library.

Ready to Use Pinecone?

Download the free trial and start building in minutes.