# The RAG Blueprint

[](/en/examples/rag-blueprint.html.md "View as Markdown") 

Vespa is the [platform of choice](https://blog.vespa.ai/perplexity-builds-ai-search-at-scale-on-vespa-ai/) for large scale RAG applications like Perplexity. It gives you all the features you need but putting them all together can be a challenge.

This open source sample applications contains all the elements you need to create a RAG application that

- delivers state-of-the-art quality, and
- scales to any amount of data, query load, and complexity.

This README provides the steps to create and run your own application based on the blueprint. Refer to the [RAG Blueprint tutorial](https://docs.vespa.ai/en/learn/tutorials/rag-blueprint.html) for more in-depth explanations, or try out the [Python notebook](https://vespa-engine.github.io/pyvespa/examples/rag-blueprint-vespa-cloud.html).

Setup:

1. **Create a [tenant](/en/learn/tenant-apps-instances.html) on Vespa Cloud:**

2. **Install the [Vespa CLI](/en/clients/vespa-cli.html)** using [Homebrew](https://brew.sh/):

3. **Configure the Vespa client:**

4. **Get Vespa Cloud control plane access:**

5. **Clone a sample [application](/en/basics/applications.html):**

6. **Add a certificate for [data plane access](/en/security/guide#data-plane) to the application:**

## Test the application

```
$ vespa deploy --wait 900 ./app
```

Feed some documents, this will also chunk and embed so it takes about 3 minutes:

```
$ vespa feed dataset/docs.jsonl
```

Now you can issue queries:

```
$ vespa query 'query=yc b2b sales'
```

```
$ vespa destroy --force
```

> [!TIP] Add "-v" to see the HTTP request this becomes.

Congratulations! You have now created a RAG application that can scale to billions of documents and thousands of queries per second, while delivering state-of-the-art quality.

## Explore more

What do you want to do next?

- To learn what this application can do, look at the files in your app/ dir.
- [Run your application locally using Docker](https://github.com/vespa-engine/sample-apps/blob/master/rag-blueprint/deploy-locally.md)
- [Using query profiles to define behavior for different use cases](https://github.com/vespa-engine/sample-apps/blob/master/rag-blueprint/query-profiles.md)
- [Evaluate and improve relevance of the data returned](https://github.com/vespa-engine/sample-apps/blob/master/rag-blueprint/relevance.md)
- [Do LLM generation inside the application](https://github.com/vespa-engine/sample-apps/blob/master/rag-blueprint/relevance.md)

 Copyright © 2026 - [Cookie Preferences](#)

