Fondant

翻糖 是一个开源框架,旨在通过使容器化组件在管道和执行环境中可重复使用,从而简化和加速大规模数据处理。受益于自动扩展、数据沿袭和管道缓存等内置功能,并部署到(托管的)平台,如 Vertex AI、Sagemaker 和 Kubeflow Pipelines。

Fondant 提供了一个可重用组件库,您可以利用这些组件来构建自己的管道,包括一个用于将嵌入写入 Qdrant 的 Qdrant 组件。

用法

使用Qdrant的RAG数据加载管道

一个简单的数据摄取管道可能如下所示:

import pyarrow as pa
from fondant.pipeline import Pipeline

indexing_pipeline = Pipeline(
    name="ingestion-pipeline",
    description="Pipeline to prepare and process data for building a RAG solution",
    base_path="./fondant-artifacts",
)

# An custom implemenation of a read component. 
text = indexing_pipeline.read(
    "path/to/data-source-component",
    arguments={
        # your custom arguments 
    }
)

chunks = text.apply(
    "chunk_text",
    arguments={
        "chunk_size": 512,
        "chunk_overlap": 32,
    },
)

embeddings = chunks.apply(
    "embed_text",
    arguments={
        "model_provider": "huggingface",
        "model": "all-MiniLM-L6-v2",
    },
)

embeddings.write(
    "index_qdrant",
    arguments={
        "url": "http:localhost:6333",
        "collection_name": "some-collection-name",
    },
    cache=False,
)

一旦你有了一个管道,你可以使用内置的CLI轻松运行它。Fondant允许你在不同的云环境中运行生产中的管道。

第一个组件是一个需要实现的自定义读取模块,不能直接使用。关于如何重建这个管道的详细教程在GitHub上提供

下一步

有关创建自己的管道和组件的更多信息可以在Fondant 文档中找到。

这个页面有用吗?

感谢您的反馈!🙏

我们很抱歉听到这个消息。😔 你可以在GitHub上编辑这个页面,或者创建一个GitHub问题。