serviette README

The project's README from github.com/pathwaycom/serviette. As one markdown file: README.md.

Pathway Live Data Framework AI Pipelines

pathwaycom%2Fllm-app | Trendshift

Linux macOS chat on Discord follow on X

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.

Application Templates

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.

Getting started

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.

Some visual highlights

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.)

Do-it-Yourself Videos

▶️ 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

Troubleshooting

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

Contributing

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

serviette (pathwaycom/serviette)

Searching Database…

58.8K ·GitHub
这是什么?这个仓库提供了可直接运行的云端模板,用于 RAG 流水线、AI 流水线和企业搜索。模板基于 Pathway 实时数据框架构建,并与实时数据源保持同步。
这是一个应用,还是一组模板?这是一组独立的应用模板(包括问答式 RAG、实时文档索引、多模态 RAG、非结构化数据转 SQL 等),每个模板都可以单独运行,底层基于 Pathway 的 Python/Rust 引擎构建。
我该如何运行其中一个模板?每个模板文件夹都有自己的 README.md,里面有运行说明。这些应用以 Docker 容器的形式运行,并提供 HTTP API,前端或 Streamlit 界面可以调用。
使用这些模板是否需要 OpenAI API 密钥?大多数模板会调用 GPT 模型,需要 API 密钥;但“基于 Mistral 和 Ollama 的私有 RAG 应用”模板完全在本地运行,不需要任何外部大模型密钥。
我还需要自己搭建向量数据库和缓存吗?不需要。Pathway 在内存中内置了向量搜索、混合搜索和全文索引,因此无需单独接入 Pinecone 之类的向量数据库、Redis 之类的缓存,也无需额外的 API 框架。
我能否在完全离线的情况下运行这些模板,让数据only留在本地?可以。私有 RAG 应用模板的设计目标是让所有数据都留在你的电脑上,它使用 Mistral 和 Ollama,而不是云端大模型服务。
Pathway 是什么?它和 llm-app 是什么关系?Pathway 是底层的 Python 库,其核心是 Rust 引擎,负责实时数据同步、内置的向量/混合索引以及 API 服务,为本仓库中的每个模板提供支持。
这些模板可以与哪些数据源保持同步?本地文件、Google Drive、Sharepoint、S3、Kafka、PostgreSQL 以及实时数据 API,并能自动识别新增、删除和更新的内容。
基于 GPT-4o 的多模态 RAG 模板有什么不同?它在解析阶段使用 GPT-4o,从 PDF 和其他非结构化文档中提取表格和图表,并在源文件变化时实时更新结果。
这些模板可以部署到云端吗?可以。你可以先在本地测试,然后部署到 GCP、AWS、Azure 或 Render,也可以在本地服务器上运行。
Creator
pathwaycom
Size
64.8 MB
Stars
58.8K
Updated
CommitOct 16
Age
3y
Commits · 90 Days