3. 🚀 Presets
These pre-defined settings and modes are used to configure the cryptographic operations and balance the trade-offs between security, accuracy, and search performance.
query_encryption(str, default:plain) Determines whether the client sends search queries to the server in an encrypted state. This setting balances security and performance based on the chosen mode:cipherensures that queries are encrypted during transmission, providing robust protection for sensitive data but may introduce additional latency.plainsends queries in plaintext, prioritizing performance over security. This mode can be used in scenarios where the encryption of query data is deemed unnecessary, such as when handling publicly accessible or low-sensitivity information.
index_encryption(str, default:cipher) Determines if the vectors in the index are sent to the server in an encrypted format.This value must be
cipher. The system is fundamentally designed to always work with encrypted data on the server.Similar to query encryption, the SDK automatically handles the encryption of your data vectors. You can provide plaintext vectors when adding data to the index, and the client will securely encrypt them before they are sent to the server.
preset(str, default:'ip') A pre-configured set of parameters for the underlying Fully Homomorphic Encryption (FHE) scheme. This optimizes the encryption keys for specific types of calculations.Currently, the only supported value is
'ip', a preset optimized for Inner Product similarity searches.
eval_mode(str, default:'rmp') Defines the FHE computation method used on the server to evaluate queries.'rmp'— Baseline mode. Supports both plaintext queries (query_encryption="plain") and end‑to‑end encrypted queries (query_encryption="cipher"). Recommended for most users.'mm'— Advanced/experimental mode. Currently does not support encrypted queries (i.e.,query_encryption="cipher"is not available). Use only with plaintext queries for now.
index_params(dict, default:{"index_type": "flat"}) Specifies the algorithm and structure used for the vector search index.Example 1:
{"index_type": "flat"}— Performs an exhaustive search over all vectors. Guarantees 100% recall (perfect accuracy) but may be slower on very large datasets compared to approximate search methods.Example 2:
{"index_type": "ivf_flat", "nlist": 4000, "centroids": <2d-matrix>, "default_nprobe": 400}— Uses an inverted file (IVF) index for faster approximate searches on large datasets.nlistcontrols the number of clusters;default_nprobecontrols how many clusters are scanned per query.If
centroidsis omitted, the client initializes random centroids and sends them to the server.centroidsaccepted types: 2D NumPyndarraywith shape(nlist, dim),list[np.ndarray], orlist[list[float]].
Last updated

