weaviate 配置属性的签名如下:
wvc.config.Property(
*,
name: str,
data_type: weaviate.collections.classes.config.DataType,
description: Optional[str] = None,
index_filterable: Optional[bool] = None,
index_searchable: Optional[bool] = None,
nested_properties: Union[weaviate.collections.classes.config.Property, List[weaviate.collections.classes.config.Property], NoneType] = None,
skip_vectorization: bool = False,
tokenization: Optional[weaviate.collections.classes.config.Tokenization] = None,
vectorize_property_name: bool = True,
) -> None
地点:
skip_vectorization:Whether to skip vectorization of the property. Defaults to `False`.
和
vectorize_property_name : Whether to vectorize the property name. Defaults to `True`.
向量数据库是向量到具有多个属性的对象的映射。通过参数向量化属性和属性名称有什么用
skip_vectoriszation
属性 vectorize_property_name
你好!!来自 Weaviate 的杜达(Duda)在这里!这些选项将允许您拥有不属于结果矢量化一部分的属性和/或属性名称。
例如,检查 Weaviate 中对象的矢量化是如何工作的: https://weaviate.io/developers/weaviate/config-refs/schema#configure-semantic-indexing
例如:
除非架构中另有指定,否则默认行为是:
例如这个数据对象,
Article = {
summary: "Cows lose their jobs as milk prices drop",
text: "As his 100 diary cows lumbered over for their Monday..."
}
将被矢量化为:
文章奶牛因牛奶价格下跌而失业,他的100头奶牛 笨重地度过了他们的星期一......
因此,如果您选择对属性名称进行向量化,则在上述情况
summary
和 text
中,您也会将这些信息添加到向量中。如果是这样的话,你的向量有效负载将是:
文章摘要随着牛奶价格下跌,奶牛失去了工作文本,因为他的 100 头奶牛在周一缓慢地过来......
请告诉我这是否有帮助?