Haystack
Haystack 作为一个全面的NLP框架,提供了一种模块化的方法来构建尖端的生成式AI、问答系统和语义知识库搜索系统。现代NLP系统中的一个关键元素是一个用于存储和检索大量文本数据的高效数据库。向量数据库在这一角色中表现出色,因为它们存储了文本的向量表示,并实现了快速检索的有效方法。因此,我们很高兴地宣布与Haystack的集成 - QdrantDocumentStore。这个文档存储是独一无二的,因为它由Qdrant团队外部维护。
新的文档存储作为一个独立的包提供,并且可以独立于Haystack进行更新:
pip install qdrant-haystack
QdrantDocumentStore 支持 Qdrant Python 客户端中所有可用的配置属性。如果你想自定义底层使用的集合的默认配置,你可以在创建 QdrantDocumentStore 实例时提供这些设置。例如,如果你想启用标量量化,你可以按照以下方式进行:
from qdrant_haystack.document_stores import QdrantDocumentStore
from qdrant_client import models
document_store = QdrantDocumentStore(
":memory:",
index="Document",
embedding_dim=512,
recreate_index=True,
quantization_config=models.ScalarQuantization(
scalar=models.ScalarQuantizationConfig(
type=models.ScalarType.INT8,
quantile=0.99,
always_ram=True,
),
),
)
