OpenViSTAI · Agents · Blockchain · Crypto
Menu
RAG & Knowledge Systems

Cloudflare Rag

Cloudflare Rag is an open-source TypeScript web application for chatting with PDF documents. It extracts text with OCR, retrieves relevant passages through Cloudflare D1 full-text search and Vectorize vector search, merges the rankings, and sends selected context to a language model to generate streamed answers.

Independent OpenViST project profile, based on linked sources.

Cloudflare Rag — OpenViST project profile in RAG & Knowledge Systems.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use the repository as a reference when building or adapting a PDF-chat RAG application with Cloudflare services, especially when hybrid retrieval and streamed responses are part of the design.

Who it is for

  • Developers building a PDF question-answering application on Cloudflare.
  • Teams exploring hybrid retrieval that combines full-text and vector search.
  • Engineers comparing model-provider routing and fallback patterns for a RAG application.

Documented uses

  • Ingest PDF text using OCR within a Cloudflare Worker.
  • Retrieve document passages with both keyword and vector search.
  • Combine search rankings and pass relevant context to a language model.
  • Stream generated answers to a web interface.
  • Route model requests through AI Gateway to supported providers, with Workers AI fallback.
Before you choose

Requirements & limits

The repository is public and licensed under the MIT License. The README documents a hosted demo and local development and Cloudflare Pages deployment paths.

  • The retrieval pipeline generates five query variants, searches both D1 and Vectorize, merges the results with Reciprocal Rank Fusion, and supplies the top ten passages to the model.
  • Cloudflare KV is used for per-IP rate limiting, while OCR runs in a Worker using unpdf.
  • Local setup requires Node, pnpm, Wrangler, a Cloudflare account ID, and configured D1 and KV identifiers.
  • OpenAI, Groq and Anthropic API keys are optional in local configuration because Workers AI is the documented fallback.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up the local development environment

Prepare the Cloudflare Rag project and its documented local development configuration.

Before you start

  • Node, pnpm and Wrangler CLI
  • A Cloudflare account ID
  • Cloudflare D1 and KV resources created by the setup script

Steps

  1. Install dependencies with pnpm install or npm install.

  2. Run ./setup.sh to deploy the required Cloudflare primitives.

  3. Set the D1 database ID and KV rate-limiter namespace ID in wrangler.toml.

  4. Create .dev.vars with CLOUDFLARE_ACCOUNT_ID; add provider keys if desired.

  5. Start the development server with npm run dev and open http://localhost:5173/.

Expected outcome

The documented local development server is available at http://localhost:5173/.

Guide limitations

  • The Cloudflare account ID is required.
  • OpenAI, Groq and Anthropic keys are optional; the stream route falls back to Workers AI.
COMPARE OPTIONS

Compare options for Vector search

These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.

ProjectDocumented purposePlatformAccess and requirements
Cloudflare RagIngest PDF text using OCR within a Cloudflare Worker.Cloud, Server, WebThe repository is public and licensed under the MIT License. The README documents a hosted demo and local development and Cloudflare Pages deployment paths.
Chatbot with PDF for Semantic SearchPrepare document content as embeddings and save it to a supported vector database.WebThe repository is identified as open source and publicly visible on GitHub.
AI LLM PlaygroundAsk questions about PDF documents through an assistant interface.Web
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
17 October 2026
Original website title
RafalWilinski/cloudflare-rag · Official homepage title · retained in its source language