Class FLATConfig (0.2.0)

FLATConfig(
    name: str,
    field_name: typing.Optional[str] = None,
    vector_size: int = 128,
    distance_strategy: langchain_community.vectorstores.utils.DistanceStrategy = DistanceStrategy.COSINE,
)

Configuration class for FLAT vector indexes, utilizing brute-force search.

Methods

FLATConfig

FLATConfig(
    name: str,
    field_name: typing.Optional[str] = None,
    vector_size: int = 128,
    distance_strategy: langchain_community.vectorstores.utils.DistanceStrategy = DistanceStrategy.COSINE,
)

Initializes the FLATConfig object.

Parameters
NameDescription
name str

The unique name for the vector index. This name is used to identify the index within the vector store or database.

field_name str

The name of the field that contains the vector data to be indexed. This field should exist within the data structure that stores the documents or vectors.

vector_size int

Specifies the dimensionality of the vectors to be indexed. All vectors added to this index must conform to this size.

distance_strategy DistanceStrategy, optional

Determines the metric used to calculate the distance or similarity between vectors during search operations.