Update vector embed policy remove preview and make spherical default (#2555)

This commit is contained in:
vchske
2026-08-07 12:56:14 -07:00
committed by GitHub
parent 43fe8a002b
commit 37ef0d2dab
3 changed files with 5 additions and 4 deletions
@@ -166,7 +166,7 @@ export const VectorEmbeddingPoliciesComponent: FunctionComponent<IVectorEmbeddin
indexType: matchingType || "none", indexType: matchingType || "none",
indexingSearchListSize: matchingIndex?.indexingSearchListSize || undefined, indexingSearchListSize: matchingIndex?.indexingSearchListSize || undefined,
quantizationByteSize: matchingIndex?.quantizationByteSize || undefined, quantizationByteSize: matchingIndex?.quantizationByteSize || undefined,
quantizerType: supportsQuantizer ? matchingIndex?.quantizerType || "product" : undefined, quantizerType: supportsQuantizer ? matchingIndex?.quantizerType || "spherical" : undefined,
vectorIndexShardKey: matchingIndex?.vectorIndexShardKey || undefined, vectorIndexShardKey: matchingIndex?.vectorIndexShardKey || undefined,
pathError: onVectorEmbeddingPathError(embedding.path), pathError: onVectorEmbeddingPathError(embedding.path),
dimensionsError: onVectorEmbeddingDimensionError(embedding.dimensions, matchingIndex?.type || "none"), dimensionsError: onVectorEmbeddingDimensionError(embedding.dimensions, matchingIndex?.type || "none"),
@@ -256,7 +256,7 @@ export const VectorEmbeddingPoliciesComponent: FunctionComponent<IVectorEmbeddin
vectorEmbedding.indexingSearchListSize = undefined; vectorEmbedding.indexingSearchListSize = undefined;
} }
if (supportsQuantization(vectorEmbedding.indexType)) { if (supportsQuantization(vectorEmbedding.indexType)) {
vectorEmbedding.quantizerType = vectorEmbedding.quantizerType || "product"; vectorEmbedding.quantizerType = vectorEmbedding.quantizerType || "spherical";
} else { } else {
vectorEmbedding.quantizerType = undefined; vectorEmbedding.quantizerType = undefined;
} }
@@ -1,6 +1,5 @@
import { IDropdownOption } from "@fluentui/react"; import { IDropdownOption } from "@fluentui/react";
import { VectorIndex } from "Contracts/DataModels"; import { VectorIndex } from "Contracts/DataModels";
import { Keys, t } from "Localization";
const dataTypes = ["float32", "uint8", "int8", "float16"]; const dataTypes = ["float32", "uint8", "int8", "float16"];
const distanceFunctions = ["euclidean", "cosine", "dotproduct"]; const distanceFunctions = ["euclidean", "cosine", "dotproduct"];
@@ -10,8 +9,8 @@ export const getDataTypeOptions = (): IDropdownOption[] => createDropdownOptions
export const getDistanceFunctionOptions = (): IDropdownOption[] => createDropdownOptionsFromLiterals(distanceFunctions); export const getDistanceFunctionOptions = (): IDropdownOption[] => createDropdownOptionsFromLiterals(distanceFunctions);
export const getIndexTypeOptions = (): IDropdownOption[] => createDropdownOptionsFromLiterals(indexTypes); export const getIndexTypeOptions = (): IDropdownOption[] => createDropdownOptionsFromLiterals(indexTypes);
export const getQuantizerTypeOptions = (): IDropdownOption[] => [ export const getQuantizerTypeOptions = (): IDropdownOption[] => [
{ key: "spherical", text: "Spherical" },
{ key: "product", text: "Product" }, { key: "product", text: "Product" },
{ key: "spherical", text: `Spherical (${t(Keys.common.preview)})` },
]; ];
export const supportsQuantization = (indexType: VectorIndex["type"] | "none" | undefined): boolean => export const supportsQuantization = (indexType: VectorIndex["type"] | "none" | undefined): boolean =>
+2
View File
@@ -990,6 +990,8 @@
"quantizationByteSizeTooltipContainerName": "container", "quantizationByteSizeTooltipContainerName": "container",
"quantizationByteSizeTooltipGlobalSecondaryIndexName": "global secondary index", "quantizationByteSizeTooltipGlobalSecondaryIndexName": "global secondary index",
"quantizerType": "Quantizer type", "quantizerType": "Quantizer type",
"quantizerTypeProduct": "Product",
"quantizerTypeSpherical": "Spherical",
"quantizerTypeTooltip": "The quantization method used by the vector index.", "quantizerTypeTooltip": "The quantization method used by the vector index.",
"indexingSearchListSize": "Indexing search list size", "indexingSearchListSize": "Indexing search list size",
"vectorIndexShardKey": "Vector index shard key", "vectorIndexShardKey": "Vector index shard key",