What is Cloudflare AutoRAG


What is Cloudflare AutoRAG?

In short, it's an integrated system designed to save developers time and effort when building Retrieval-Augmented Generation (RAG) applications by automating most of the steps and enabling direct querying of data via an API or Workers.

test

---

1.jpeg



2.jpeg


What Steps Are Automated?

  • Data ingestion
  • Converting documents of various formats to Markdown
  • Chunking the resulting text
  • Embedding the chunks into vector representations
  • Creating a vector database and storing the embeddings
  • Enabling similarity search and queries over the stored data via API or Workers
  • Improving queries and retrieval results using Large Language Models (LLMs)

All the developer needs to do is upload the required documents or data to the R2 storage and wait for the indexing process to complete — then they can immediately start querying.
The service currently offers a free tier for testing.


What Are the Current Limitations?

  • PDF Documents in Arabic
    When testing, I noticed that converting Arabic PDF documents to Markdown doesn’t work correctly, leading to failed storage and incorrect querying.
    Suggested solution: Manually convert Arabic documents to Markdown before uploading them to R2.

  • Metadata Search Not Supported
    There’s no built-in way to search using metadata.
    Workaround: Organize documents into folders and use folder names or groups for filtering and querying.

  • Document Size Limit (4MB)
    The supported document size is relatively small.
    Solution: Split large documents into smaller parts before uploading to R2.


What Is Cloudflare AutoRAG from a Technical Perspective?

This system essentially reuses existing Cloudflare products, each of which can also be used independently:

  • R2 – Cloudflare’s object storage service
  • ai.toMarkdown – a built-in function in Workers AI for converting documents to Markdown
  • Embeddings – generated via Cloudflare Workers AI embedding models
  • Vectorize – Cloudflare’s vector database for storing embeddings
  • LLMs – used via Workers AI to refine queries and improve results

Final Thoughts

This was a very brief introduction to Cloudflare AutoRAG.
I highly recommend exploring the official documentation for a deeper dive into the service and taking advantage of the free and paid features available.