QVAC Logo

ragSearch( )

Searches for similar documents in the RAG vector database. **Workspace lifecycle:** This operation requires an existing workspace. If the workspace doesn't exist, returns an empty array.

function ragSearch(params: input): Promise

Description

Searches for similar documents in the RAG vector database.

Workspace lifecycle: This operation requires an existing workspace. If the workspace doesn't exist, returns an empty array.

Parameters

NameTypeRequired?Description
paramsinputThe parameters for searching

Returns

Promise

Examples

const results = await ragSearch({
  modelId,
  query: "AI and machine learning",
  topK: 5,
  workspace: "my-docs",
});

On this page