# Repository Briefing: pathwaycom/serviette
> Source: https://repoforai.com/repo/pathwaycom/serviette (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/pathwaycom/serviette
- **Official Docs / Website**: https://github.com/pathwaycom/serviette/blob/main/docs/README.md
- **Category**: RAG, Data & Memory (知识库 / 爬虫 / 记忆层)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A+ (88/100 · Maintenance 31/35 · Adoption 17/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.1.8 (2026-11-02) — https://github.com/pathwaycom/serviette/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: Self-Hosted, Local AI, CLI, API
- **Momentum**: 58,644 ★ total (+0 24h / +11 7d) · 1,536 forks
- **Topics**: `chromadb`, `document-qa`, `document-search`, `duckdb`, `live-data`, `llm`, `milvus`, `mongodb`, `no-code`, `pathway`, `pgvector`, `pinecone`
- **When to Use**: Best for: Teams that need cited Q&A and a retrieval API over frequently changing documents without building their own incremental indexing pipeline. Skip if: Your deployment cannot accept Pathway's license-key requirement, or you need code-level control over the orchestration rather than configuration of a packaged pipeline.

## Overview
```text
### Architecture & Core Mechanics
Serviette is a Python application with separate write and read processes. The indexer uses Pathway to watch configured sources, then reuses Pathway's LLM xpack parsers, splitters and embedders to turn file changes into vector-store upserts and deletes. The stateless server embeds queries and reads from that store without calling the indexer. The documented collection schema is the integration contract, so another application can consume the same collection.

A server can keep answering from the last synced state while the indexer is down, and the indexer can continue writing if serving is interrupted. Indexer persistence supports resuming without re-embedding. With a shared external store, Pathway workers and query replicas can scale separately, though both still depend on database capacity. Embedded DuckDB gives up that deployment flexibility for a single local file and a single writer.

### Key Capabilities & Differentiators
One YAML config can combine local files, Google Drive, S3/MinIO, SharePoint and PyFilesystem sources such as SFTP or WebDAV. The eight vector stores are DuckDB, pgvector, Qdrant, Milvus, ChromaDB, Weaviate, Pinecone and MongoDB Atlas Vector Search. Embeddings can use OpenAI, LiteLLM, SentenceTransformers, Gemini or Bedrock. Text, PDF and Office formats have built-in parsing; optional Docling adds layout and table extraction, PaddleOCR handles scanned images, and audio and video processing require the relevant OpenAI or TwelveLabs credentials.

The server exposes cited chat and `POST /api/v1/retrieve`. Retrieval starts with vector similarity; optional stages add BM25 rank fusion, cross-encoder or LLM reranking, MMR, query decomposition and adaptive context expansion. On the 824-question FRAMES evaluation, gold-article recall was 0.50 versus 0.21 for the reproduced BM25 baseline. The reported adaptive setup raised context-only answer accuracy from 41.3% to 52.8%; that result is specific to the benchmark setup, not a forecast for an internal corpus.

### Trade-offs & Limitations
Compared with assembling a LangChain or LlamaIndex stack, Serviette packages ingestion, update propagation, cited chat and REST serving behind YAML rather than giving developers code-level control over each stage. DuckDB is the low-setup choice for a local trial; separate hosts or independently scaled replicas favor a shared external store. Cross-encoder reranking adds local inference, while LLM reranking, decomposition and adaptive retries can add model calls. An external answer model receives retrieved passages; an external embedder receives document text as well.

For capacity planning, the nominal 50 GB Qdrant run measured 6.0 hours of indexing, 14.65 GiB peak PSS and 84.45 GiB in Qdrant. That was a single published run for that size using plain text and local embeddings, not a sizing guarantee for PDFs or scans. The watcher retains per-file metadata, so file count matters alongside extracted text volume. Test freshness and query latency during bulk indexing against the chosen store instead of assuming separate processes eliminate contention.

### Hardware & Deployment Guide
Use CPython 3.10 or newer and pip 23.1 or newer. Install with `pip install serviette` and set `PATHWAY_LICENSE_KEY` before running the CLI. `serviette demo --embedder openai` also needs `OPENAI_API_KEY` and opens the bundled-corpus chat at `http://localhost:8989`. For your own sources, generate YAML with `serviette wizard`, then use `serviette up --config config.yaml` to supervise the indexer and server together.

For distributed self-hosting, run `serviette indexer` and `serviette server` separately against a shared external store. An optional `serviette frontend` hosts chat on another host and proxies API requests server-side. DuckDB and local embeddings avoid a database service and an embedding API; omit the answer model to return quoted passages, but the Pathway key still applies. Release v0.1.8 marks the change from the `llm-app` template repository to the Serviette server; the previous templates remain in Pathway's `examples/llm-app`.
```

## Key Capabilities
```text
- Index updates: Pathway propagates file additions, edits and deletions as vector-store upserts and deletes.
- Storage: Eight backends range from embedded DuckDB to pgvector, Qdrant and MongoDB Atlas Vector Search; the collection schema is documented.
- Serving: The stateless server hosts cited chat at `/` and a versioned REST API under `/api/v1`, including `POST /api/v1/retrieve`.
- Parsing: Built-in PDF and Office parsing can be extended with `serviette[docling]` for layout-aware extraction or `serviette[ocr]` for scanned images.
- Retrieval: Configurable options include BM25/vector rank fusion, reranking, MMR, query decomposition and adaptive context expansion.
- Indexing baseline: The nominal 50 GB plain-text Qdrant run took 6.0 hours, peaked at 14.65 GiB PSS and used 84.45 GiB in Qdrant.
```

## Quick Start / Clone
```bash
pip install serviette
export PATHWAY_LICENSE_KEY=...        # free: https://pathway.com/framework/get-license
export OPENAI_API_KEY=sk-...
serviette demo --embedder openai      # → chat at http://localhost:8989
```
