Introducing hubAutoRAG()

Create fully-managed RAG pipelines to power your AI applications with accurate and up-to-date information.
This feature is available from @nuxthub/core >= v0.8.26

We are excited to introduce hubAutoRAG(). Cloudflare AutoRAG lets you create fully-managed, retrieval-augmented generation pipelines that continuously updates and scales on Cloudflare. With AutoRAG, you can integrate context-aware AI into your Nuxt applications without managing infrastructure.

If you are currently using hubVectorize(), you may be interested in switching to hubAutoRAG() for a simplified developer experience. AutoRAG automatically indexes your data into vector embeddings optimized for semantic search. Once a data source is connected, indexing runs continuously in the background to keep your knowledge base fresh and queryable.

How to use hubAutoRAG()

  1. Update @nuxthub/core to the latest version (v0.8.26 or later)
  2. Enable hub.ai in your nuxt.config.ts
nuxt.config.ts
export default defineNuxtConfig({
  hub: {
    ai: true
  }
})
  1. Create an AutoRAG instance from the Cloudflare dashboard and add your data source.
  1. Start using hubAutoRAG() in your server routes
server/api/rag.ts
export default eventHandler(async () => {
  const autorag = hubAutoRAG("nuxt-ui") // access AutoRAG instance
  return await autorag.aiSearch({
    query: "How do I create a modal with Nuxt UI?",
    model: "@cf/meta/llama-3.3-70b-instruct-sd",
    rewrite_query: true,
    max_num_results: 2,
    ranking_options: {
      score_threshold: 0.7,
    },
  })
})
  1. Deploy your project with NuxtHub
Read the documentation about hubAutoRAG() to learn more.

Start with NuxtHub today