mongodb-rag-core
Version:
Common elements used by MongoDB Chatbot Framework components.
29 lines • 1.07 kB
TypeScript
import { SearchBooster } from "./SearchBooster";
import { FindNearestNeighborsOptions } from "../VectorStore";
export type WithFilterAndK<T> = T & {
filter: Record<string, unknown>;
k: number;
};
type FindNearestNeighborOptionsWithFilterAndK = WithFilterAndK<Partial<FindNearestNeighborsOptions>>;
interface MakeBoostOnAtlasSearchFilterArgs {
/**
Options for performing a nearest-neighbor search for results to boost.
*/
findNearestNeighborsOptions: FindNearestNeighborOptionsWithFilterAndK;
/**
Max number of results to boost.
*/
totalMaxK: number;
/**
Determines if the booster should be used, based on the user's input.
*/
shouldBoostFunc: ({ text }: {
text: string;
}) => Promise<boolean>;
}
/**
Boost certain results in search results from Atlas Search.
*/
export declare function makeBoostOnAtlasSearchFilter({ findNearestNeighborsOptions, totalMaxK, shouldBoostFunc, }: MakeBoostOnAtlasSearchFilterArgs): SearchBooster;
export {};
//# sourceMappingURL=BoostOnAtlasSearchFilter.d.ts.map