开源项目 GitHub Topic rag 2026-07-06T12:02 正文 ok 925 words

📦 Pathway LLM 应用模板:即用型 RAG 与 AI 管道,支持企业级实时数据搜索

英文标题:📦 pathwaycom/llm-app

Pathway 提供一系列即用型 LLM 应用模板,涵盖问答 RAG、实时文档索引、多模态 RAG 及非结构化数据转 SQL 等场景,可连接文件系统、Google Drive、SharePoint 等多种实时数据源并保持同步。模板以 Docker 容器运行,内置基于 usearch 和 Tantivy 的向量与混合全文索引,无需单独集成向量数据库或缓存。开发者通过一行修改即可切换数据源或索引类型,部分自适应 RAG 模板可将令牌成本降低 4 倍,并支持扩展至数百万页文档。该仓库极大简化了生成式 AI 应用的后端、嵌入和检索技术栈,帮助开发者快速落地高精度企业搜索与问答系统。
打开原文相关 2.8 · 机会 3
media5.1 KB media7.7 KB media1.4 KB media2.3 KB media927 B media4.3 MB media3.8 MB media6.8 KB media1.2 KB media743.9 KB

中文

Pathway Live Data Framework 的 AI 管道 让您能够快速将 AI 应用投入生产,这些应用依托您数据源中最新的知识,提供 高精度、可扩展的 RAG 和 AI 企业搜索。它为您准备了立即可部署的 LLM(大语言模型)应用模板。您可以在自己的机器上测试,并部署到云(GCP、AWS、Azure、Render 等)或本地环境。

这些应用能与您的 文件系统、Google Drive、SharePoint、S3、Kafka、PostgreSQL、实时数据 API 等数据源连接并同步所有新增、删除和更新操作。它们无任何需要单独设置的基础设施依赖。内置的 数据索引 支持向量搜索、混合搜索和全文搜索——全部在内存中配合缓存完成。

此仓库提供的应用模板可扩展至 数百万页文档。部分模板为简化操作而优化,部分则追求极高的准确性。选择最适合您的那一个。您可以直接开箱使用,也可以修改管道的某些步骤——例如,若要添加新数据源,或将向量索引改为混合索引,仅需一行修改。

应用(模板) 描述
问答 RAG 应用 基础端到端 RAG 应用。一个问答管道,使用所选的 GPT 模型,针对您实时连接的数据源(文件、Google Drive、SharePoint 等)中的文档(PDF、DOCX 等)回答问题。您还可以试用 演示 REST 端点。
实时文档索引(向量存储 / 检索器) 一个面向 RAG 的实时文档索引管道,可作为向量存储服务。它对您连接的数据源(文件、Google Drive、SharePoint 等)中的文档(PDF、DOCX 等)进行动态索引。可与任何前端结合使用,或作为 LangChain 或 LlamaIndex 应用的检索后端。您也可以试用 演示 REST 端点。
使用 GPT-4o 的多模态 RAG 管道 使用 GPT-4o 在解析阶段对来自连接数据源(文件、Google Drive、SharePoint 等)的 PDF 及其他文档进行索引的多模态 RAG。特别适合从文件夹中的非结构化财务文档(包括图表和表格)提取信息,并随着文档变更或新增而更新结果。
非结构化数据转 SQL 管道 + SQL 问答 一个 RAG 示例,它连接非结构化财务数据源(财务报告 PDF),将数据结构化为 SQL,并加载到 PostgreSQL 表中。它还能将自然语言用户查询翻译为 SQL,借助 LLM 在 PostgreSQL 表上执行查询并返回答案。
自适应 RAG 应用 使用自适应 RAG 技术的 RAG 应用,该技术由 Pathway 开发,可在保持准确性的同时将 RAG 的令牌成本降低最多 4 倍。
使用 Mistral 和 Ollama 的私有 RAG 应用 question_answering_rag RAG 管道的完全私有(本地)版本,基于 Pathway Live Data Framework、Mistral 和 Ollama 构建。
幻灯片 AI 搜索应用 一个用于检索幻灯片的索引管道。它对 PowerPoint 和 PDF 进行多模态处理,并维护幻灯片的实时索引。
基于 TwelveLabs 的视频 RAG 针对 视频 的 RAG 管道。它使用 TwelveLabs 的 Pegasus 将视频转换为丰富的文本描述,并利用 Marengo 多模态嵌入进行索引,让您可以在实时连接的数据源(文件、Google Drive 等)上就视频提问。

这些 AI 管道如何工作?

这些应用可作为 Docker 容器 运行,并暴露 HTTP API 供前端连接。为了方便快速测试和演示,部分应用模板还包含一个可选的 Streamlit UI,该界面连接到此 API。

这些应用依赖 Pathway Live Data Framework 进行数据源同步和 API 请求服务(Pathway 是一个独立的 Python 库,内置 Rust 引擎)。它们为您提供后端、嵌入、检索、LLM 技术栈 简洁且统一的应用逻辑。无需为您的生成式 AI 应用集成和维护独立模块:向量数据库(如 Pinecone/Weaviate/Qdrant) + 缓存(如 Redis) + API 框架(如 FastAPI)。Pathway 默认选择的 内置向量索引 基于速度极快的 usearch 库,而 混合全文索引 则使用 Tantivy 库。一切开箱即用。

仓库中的每个 应用模板 都包含一个 README.md,说明了运行方法。

您也可以在 Pathway 网站上找到 更多即用型代码模板。

利用多模态 RAG,实时轻松地从 PDF、文档等中提取和整理表格及图表数据:

实时轻松地从 PDF、文档等中提取和整理表格及图表数据 - 使用多模态 RAG

(查看 使用 GPT-4o 的多模态 RAG 管道 了解其完整工作流程。您也可以查看 非结构化转 SQL 管道 以获取同样适用于非多模态模型的最小示例。)

自动化实时知识挖掘与告警:

自动化实时知识挖掘与告警

(查看 Google Drive 中答案变化时发送告警 应用示例。)

视频:Pathway Live Data Framework 构建 LLM 应用简介 — 由 Jan Chorowski 讲解

视频:11 分钟构建真实世界 LLM 应用 — 由 Pau Labarta Bajo 讲解

要提供反馈或报告错误,请在我们的问题追踪器上提交问题。

我们非常鼓励任何人为本项目做出贡献,无论是文档、新功能、错误修复、代码清理、测试还是代码审查。如果这是您第一次参与 GitHub 项目,请阅读入门指南。

若您计划做出需要更多工作的贡献,请前往 Pathway Discord 服务器 (#get-help) 告知我们!

支持与维护

Pathway

查看 Pathway 的 AI 应用方案

English / 原文

The Pathway Live Data Framework's AI Pipelines allow you to quickly put in production AI applications that offer high-accuracy RAG and AI enterprise search at scale using the most up-to-date knowledge available in your data sources. It provides you ready-to-deploy LLM (Large Language Model) App Templates. You can test them on your own machine and deploy on-cloud (GCP, AWS, Azure, Render,...) or on-premises.

The apps connect and sync (all new data additions, deletions, updates) with data sources on your file system, Google Drive, Sharepoint, S3, Kafka, PostgreSQL, real-time data APIs. They come with no infrastructure dependencies that would need a separate setup. They include built-in data indexing enabling vector search, hybrid search, and full-text search - all done in-memory, with cache.

The application templates provided in this repo scale up to millions of pages of documents. Some of them are optimized for simplicity, some are optimized for amazing accuracy. Pick the one that suits you best. You can use it out of the box, or change some steps of the pipeline - for example, if you would like to add a new data source, or change a Vector Index into a Hybrid Index, it's just a one-line change.

Application (template) Description
Question-Answering RAG App Basic end-to-end RAG app. A question-answering pipeline that uses the GPT model of choice to provide answers to queries to your documents (PDF, DOCX,...) on a live connected data source (files, Google Drive, Sharepoint,...). You can also try out a demo REST endpoint.
Live Document Indexing (Vector Store / Retriever) A real-time document indexing pipeline for RAG that acts as a vector store service. It performs live indexing on your documents (PDF, DOCX,...) from a connected data source (files, Google Drive, Sharepoint,...). It can be used with any frontend, or integrated as a retriever backend for a Langchain or Llamaindex application. You can also try out a demo REST endpoint.
Multimodal RAG pipeline with GPT4o Multimodal RAG using GPT-4o in the parsing stage to index PDFs and other documents from a connected data source files, Google Drive, Sharepoint,...). It is perfect for extracting information from unstructured financial documents in your folders (including charts and tables), updating results as documents change or new ones arrive.
Unstructured-to-SQL pipeline + SQL question-answering A RAG example which connects to unstructured financial data sources (financial report PDFs), structures the data into SQL, and loads it into a PostgreSQL table. It also answers natural language user queries to these financial documents by translating them into SQL using an LLM and executing the query on the PostgreSQL table.
Adaptive RAG App A RAG application using Adaptive RAG, a technique developed by Pathway to reduce token cost in RAG up to 4x while maintaining accuracy.
Private RAG App with Mistral and Ollama A fully private (local) version of the question_answering_rag RAG pipeline using Pathway Live Data Framework, Mistral, and Ollama.
Slides AI Search App An indexing pipeline for retrieving slides. It performs multi-modal of PowerPoint and PDF and maintains live index of your slides."
Video RAG with TwelveLabs A RAG pipeline over video. It uses TwelveLabs Pegasus to turn videos into rich text descriptions and Marengo multimodal embeddings to index them, so you can ask questions about your videos on a live connected data source (files, Google Drive,...).

How do these AI Pipelines work?

The apps can be run as Docker containers , and expose an HTTP API to connect the frontend. To allow quick testing and demos, some app templates also include an optional Streamlit UI which connects to this API.

The apps rely on the Pathway Live Data Framework for data source synchronization and for serving API requests (Pathway is a standalone Python library with a Rust engine built into it). They bring you a simple and unified application logic for back-end, embedding, retrieval, LLM tech stack. There is no need to integrate and maintain separate modules for your Gen AI app: Vector Database (e.g. Pinecone/Weaviate/Qdrant) + Cache (e.g. Redis) + API Framework (e.g. Fast API). Pathway's default choice of built-in vector index is based on the lightning-fast usearch library, and hybrid full-text indexes make use of Tantivy library. Everything works out of the box.

Each of the App templates in this repo contains a README.md with instructions on how to run it.

You can also find more ready-to-run code templates on the Pathway website.

Effortlessly extract and organize table and chart data from PDFs, docs, and more with multimodal RAG - in real-time:

Effortlessly extract and organize table and chart data from PDFs, docs, and more with multimodal RAG - in real-time

(Check out Multimodal RAG pipeline with GPT4o to see the whole pipeline in the works. You may also check out the Unstructured-to-SQL pipeline for a minimal example that works with non-multimodal models as well.)

Automated real-time knowledge mining and alerting:

Automated real-time knowledge mining and alerting

(Check out the Alerting when answers change on Google Drive app example.)

▶️ An introduction to building LLM apps with Pathway Live Data Framework - by Jan Chorowski

▶️ Let's build a real-world LLM app in 11 minutes - by Pau Labarta Bajo

To provide feedback or report a bug, please raise an issue on our issue tracker.

Anyone who wishes to contribute to this project, whether documentation, features, bug fixes, code cleanup, testing, or code reviews, is very much encouraged to do so. If this is your first contribution to a GitHub project, here is a Get Started Guide.

If you'd like to make a contribution that needs some more work, just raise your hand on the Pathway Discord server (#get-help) and let us know what you are planning!

Supported and maintained by

Pathway

See Pathway's offering for AI applications