TsgcAIDatabaseVectorPineconeMethods › QueryData

QueryData Method

Runs a similarity query against the Pinecone index and returns the raw JSON response.

Syntax

function QueryData(const aVector: string): string;

Parameters

NameTypeDescription
aVectorconst stringQuery embedding serialized as a comma-separated list of doubles; must match the dimensionality of the target Pinecone index.

Return Value

JSON string returned by Pinecone, containing the list of matching vector ids and their similarity scores (string)

Remarks

Issues a VectorsQuery REST call to the index configured in PineconeIndexOptions. The response is returned verbatim so the caller can parse matches, scores and metadata as needed. Dimensionality of aVector must match the one used during ingest.

Example

vQuery  := oEmbeddings.GetEmbedding('who wrote hamlet?');
vResult := oDB.QueryData(vQuery);
Memo1.Lines.Text := vResult;

Back to Methods