SortOptions: {
    location_bias?: GeoInfoWithBias | null;
    mmr?: MmrOptions | null;
    recency_bias?: number | null;
    sort_by?: QdrantSortBy | null;
    tag_weights?: {
        [key: string]: number;
    } | null;
    use_weights?: boolean | null;
}

Sort Options lets you specify different methods to rerank the chunks in the result set. If not specified, this defaults to the score of the chunks.

Type declaration

  • Optionallocation_bias?: GeoInfoWithBias | null
  • Optionalmmr?: MmrOptions | null
  • Optionalrecency_bias?: number | null

    Recency Bias lets you determine how much of an effect the recency of chunks will have on the search results. If not specified, this defaults to 0.0. We recommend setting this to 1.0 for a gentle reranking of the results, >3.0 for a strong reranking of the results.

  • Optionalsort_by?: QdrantSortBy | null
  • Optionaltag_weights?: {
        [key: string]: number;
    } | null

    Tag weights is a JSON object which can be used to boost the ranking of chunks with certain tags. This is useful for when you want to be able to bias towards chunks with a certain tag on the fly. The keys are the tag names and the values are the weights.

  • Optionaluse_weights?: boolean | null

    Set use_weights to true to use the weights of the chunks in the result set in order to sort them. If not specified, this defaults to true.