All Products
Search
Document Center

OpenSearch:QGraph (Quantized Graph) configuration

Last Updated:Nov 28, 2024

This topic describes how to describe the build and search parameters for QGraph algorithm.

QGraph index build parameters

Parameter name

Type

Default value

Description

proxima.hnsw.builder.max_neighbor_count

uint32

100

Specifies the maximum number of neighbors for nodes in the graph. The larger this value, the better the connectivity of the graph. However, the cost of graph construction and the index size will also increase.

proxima.hnsw.builder.efconstruction

uint32

500

Controls the size of the neighbor scan area during graph construction. The larger this value, the better the offline graph quality, but the slower the index construction. It is recommended to start with a configuration of 400.

proxima.hnsw.builder.thread_count

uint32

0

The number of threads to open during construction. When set to 0, it uses the number of CPU cores.

proxima.qgraph.builder.quantizer_class

string

None

Quantizer options include Int4QuantizerConverter, Int8QuantizerConverter, and EntropyInt16Quantizer. Generally, the smaller the integer bit, the smaller the index and the higher the performance, but the lower the recall rate. Due to issues with the underlying CPU instruction set, the performance and recall rate of int16 quantization are almost the same as when not quantized.

QGraph index search parameters

Parameter name

Type

Default value

Description

proxima.hnsw.searcher.ef

uint32

500

The number of the nearest neighbors that are scanned during an online search. A large value increases the retrieval ratio but slows down retrieval performance. We recommend that you set the value in the range of [100,1000].

proxima.hnsw.searcher.max_scan_ratio

float

None

The proportion of points that are scanned during an online search. A large value increases the retrieval ratio but slows down retrieval performance.

proxima.hnsw.searcher.brute_force_threshold

uint32

None

The minimum number of points that are scanned during an online search. If the value of this parameter exceeds the number of documents count in a shard, the search becomes brute force.