QVAC Logo

ragSearch( )

Searches for similar documents in the RAG vector database.

function ragSearch(params): Promise<object[]>;

Parameters

NameTypeRequired?Description
paramsobjectThe parameters for searching

params

FieldTypeRequired?DefaultDescription
modelIdstring-The identifier of the embedding model to use
querystring-The search query text
topKnumber5Number of top results to retrieve
nnumber3Number of centroids to use for IVF index search
workspacestring-Optional workspace for isolated storage

Returns

Promise<object[]> — Array of search results with id, content, and score

Throws

When the response type is invalid or when the operation fails

On this page