TsgcAIDatabaseVectorPinecone › Methods › QueryData
Runs a similarity query against the Pinecone index and returns the raw JSON response.
function QueryData(const aVector: string): string;
| Name | Type | Description |
|---|---|---|
aVector | const string | Query embedding serialized as a comma-separated list of doubles; must match the dimensionality of the target Pinecone index. |
JSON string returned by Pinecone, containing the list of matching vector ids and their similarity scores (string)
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.
vQuery := oEmbeddings.GetEmbedding('who wrote hamlet?');
vResult := oDB.QueryData(vQuery);
Memo1.Lines.Text := vResult;