我要评分
获取效率
正确性
完整性
易理解

Tuning Parameters

This section applies to both C++ and Python APIs.

Constructor

Parameter

Value Range

Recommended Value

Tuning Description

R

[11,499]

50

Number of neighboring nodes, which affects the graph build time and final index quality. The value 50 is recommended. If the value is too large, the build time may be too long and the search performance may deteriorate. If the value is too small, the search precision may be affected.

L

[11,1999]

100 and 200

Size of the candidate node list during graph build, which affects the graph build time and final index quality. The value 100 is recommended. If the value is too large, the build time may be too long.

A

[10,360]

60,120

Angle threshold during the pruning of graph build. For the IP dataset, the value 120 is used, while for the L2 dataset, 60.

Add

Parameter

Value Range

Recommended Value

Tuning Description

level

[0,5]

1,2

Quantization level. Level 1 indicates SQ8U quantization and level 2 indicates SQ4U quantization. For the IP dataset, the value 1 is used, while for the L2 dataset, 2.

SetEf

Parameter

Value Range

Recommended Value

Tuning Description

ef

[10, 3000]

-

Size of the candidate node list during search. For small-scale datasets, the recommended value range is [10, 500]. A larger ef value leads to higher search precision but lowers search performance. It is advised to set ef to a smaller value when the precision meets the requirement.