From 3c58d42ae6fdce2eb4217899385499430bc9a5b2 Mon Sep 17 00:00:00 2001 From: Vaibhav-Endee Date: Wed, 25 Feb 2026 16:24:41 +0530 Subject: [PATCH] feat: update default precision from INT8 to INT16 in code and documentation --- README.md | 4 ++-- endee.go | 2 +- index.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 864101f..7799cfa 100644 --- a/README.md +++ b/README.md @@ -204,8 +204,8 @@ The Go client supports various precision levels for memory/accuracy tradeoffs: |-----------|----------|-----------|--------------|----------| | FP32 | `PrecisionFloat32` | 32-bit float | Highest | Maximum accuracy | | FP16 | `PrecisionFloat16` | 16-bit float | ~50% less | Good accuracy, lower memory | -| INT16 | `PrecisionInt16` | 16-bit int | Optimized | Quantized accuracy | -| INT8 (default) | `PrecisionInt8` | 8-bit int | ~75% less | Maximum memory savings | +| INT16 (default) | `PrecisionInt16` | 16-bit int | Optimized | Quantized accuracy | +| INT8 | `PrecisionInt8` | 8-bit int | ~75% less | Maximum memory savings | | Binary | `PrecisionBinary` | 1-bit | Minimum | Fast, low-memory keyword-like search | **Example with different precision levels:** diff --git a/endee.go b/endee.go index d59e7b3..6b40529 100644 --- a/endee.go +++ b/endee.go @@ -287,7 +287,7 @@ func (nd *Endee) CreateIndexWithContext(ctx context.Context, name string, dimens // Set default precision if not provided if precision == "" { - precision = PrecisionInt8 + precision = PrecisionInt16 } // Validate dimension diff --git a/index.go b/index.go index 9269725..62a41a4 100644 --- a/index.go +++ b/index.go @@ -96,7 +96,7 @@ func NewIndex(name string, token string, url string, version int, params *IndexP version = 1 // Default version } - precision := PrecisionInt8 + precision := PrecisionInt16 if params != nil && params.Precision != "" { precision = params.Precision }