utils
autogen.agentchat.contrib.vectordb.utils.filter_results_by_distance
filter_results_by_distance
Filters results based on a distance threshold.
Parameters:Name | Description | |
---|---|---|
results | QueryResults | The query results. List[List[Tuple[Document, float]]] Type: list[list[tuple[autogen.agentchat.contrib.vectordb.base.Document, float]]] |
distance_threshold | The maximum distance allowed for results. Type: float Default: -1 |
Type | Description |
---|---|
list[list[tuple[autogen.agentchat.contrib.vectordb.base.Document, float]]] | QueryResults | A filtered results containing only distances smaller than the threshold. |