_getRelevantDocuments(
query: string,
runManager: CallbackManagerForRetrieverRun
): Promise<DocumentInterface<Record| Name | Type | Description |
|---|---|---|
query* | string | |
runManager | CallbackManagerForRetrieverRun |
Retrieves relevant documents based on the specified query, using either similarity or maximal marginal relevance (MMR) search.
If searchType is set to "mmr", performs an MMR search to balance
similarity and diversity among results. If searchType is "similarity",
retrieves results purely based on similarity to the query.
The query string used to find relevant documents.
Optional callback manager for tracking retrieval progress.