Build a RAG app in under 5 minutes

Quickly create a retrieval-augmented generation app with Scout

Scout makes building AI apps simple. With intuitive drag-and-drop functionality, you can easily build apps that leverage LLMs, APIs, your data, and your custom logic.

In this guide, we’ll show you how to build a RAG app in Scout in under 5 minutes. Scout provisions all the underlying infrastructure, and our free tier doesn’t require a credit card. Let’s get started!

Architecture for our 5 minute RAG app. First we'll integrate our data, then we'll configure and test our AI workflow.
1

Integrate your data

Scout stores your data in collections, which are groups of documents. Each document can contain metadata and text content. The text content is chunked and used for vector search. The metadata can be used to filter and sort the documents. Scout abstracts all of this complexity and provides a simple process to upload documents as outlined below:

  1. Sign up for free or sign in to Scout
  2. Once logged in, click “Collections” in the nav
  3. Click ”+ Create Collection”
  4. Name and create your collection
  5. Once your collection is provisioned, click it to open it
  1. Once inside the newly created collection, you will be in the default Untitled table. Click the ”+” button to add columns.
  1. We’ll add two columns:
  • One named URL with a column type of URL
  • And one named Page Title with a column type of Single Line Text
  1. Once completed, our table should look as follows, with 3 columns:

There are 4 primary ways you can add documents to a collection in Scout:

In this guide, we’ll build a collection by scraping Scout’s docs (Scoutception?) but feel free to choose your own adventure for this section.

First, in your collection, click “Sources” in the nav at the top, then click “Add Source” to start adding documents. Then, select the “Website Crawl” option.

  • Settings: Enter https://scoutos.com as the URL
  • Mapping: Map the crawl values to the colums we created in our table.
  • Frequency: For this example, we can skip the Frequency section. It’s used to schedule crawl refreshes; for example if you want to crawl your docs every week to keep the documents in your table up to date.
  • Click the “Create” button, then the “Run” button to start scraping the Scout website. You’ll see the progress and status of the process. Once it’s complete, move on to the next step to configure your workflow.
2

Configure your workflow

Workflows consist of inputs, composable blocks which represent different actions, and outputs. They can be created from scratch, cloned from an existing workflow, or started with a template. Each block is designed with its own set of configurations. In this guide, we’ll create a workflow that uses an input, a collection search, an LLM, and then output:

  • Click “Workflows” in the nav
  • Click ”+ New” to create a new workflow
  • Name your workflow and click the “Create” button. You’ll see your empty workflow canvas:
  • At the bottom of the workflow canvas click the ”+” button and drag a new Scout Collection > Query Collection Table block onto the workflow canvas
  • Then, click the newly created collection block, and modify its configurations as follows:
    • Collection: Use the dropdown to select your collection
    • Table: Use the dropdown to select your table
    • Query: This should be {{inputs.user_message}} in order to supply the RAG app’s input to the collection query
  • Everything else can be left as default. Click the “Save” button in the upper right-hand corner. Your settings should look as follows, except for the Collection ID should be your unique value as mentioned above:

At the bottom of the workflow canvas click the ”+” button and drag a new AI > LLM block onto the workflow canvas

Then, click the newly created LLM block, and modify its configuration sections as follows:

  • First is the Configuration section, where we’ll use the following settings:
    • Model: We’ll use gpt-4o for this
    • Temperature: We’ll use 0.7 to keep it more factual
    • Maximum Tokens: We’ll use 2000 as we’ll be supplying our queried documents in the request
    • Response Type: text
  • Then we’ll configure the Chat Messages section as follows:
    • First, we’ll add a System Message
      • Click ”+ Add an item”
      • Then change Chat Messages-1: Single Message
      • Set Role: system
      • And paste the following prompt into Content
        You are an expert customer solutions engineer at Scout. Your role is to respond to user inquiries in a helpful and guiding manner. You have access to Scout's technical configuration documentation for developers, which is provided below. Please use this documentation to answer user questions accurately and thoroughly. If you are not confident in your answer or if a question falls outside the scope of the provided information, kindly inform the user that you do not have that information. Maintain a professional and courteous tone in all your responses. Do not speculate or provide information not supported by the documentation.
      • The final configuration for the System Message should look as follows:
    • Then, we’ll add the User Message
      • Scroll to the bottom of the Chat Messages section and click ”+ Add an item” to add another Chat Message
      • Then change the newly created Chat Messages-2: Single Message
      • Set Role: user
      • And paste the following prompt into Content:
        <<<Scout Technical Documentation>>>
        {{YOUR_COLLECTION_BLOCK.output}}
        <<</Scout Technical Documentation>>>
        <<<User Inquiry>>>
        {{inputs.user_message}}
        <<</User Inquiry>>>
        Important: You will need to replace the YOUR_COLLECTION_BLOCK.output variable in the snippet above with your actual collection block ID. You can easily copy your collection block ID by hovering over it and clicking copy. For example, mine would be collection_rmdz0c.output
        Lastly, click the “Save” button in the upper right-hand corner. Your RAG app (workflow) is ready!
3

Run your workflow

There are a variety of ways to run workflows; Slackbots, Scout’s embeddable Copilot, SDKs, API, directly from the Console in the Scout workflow UI, and many more.

In this guide, we’ll keep it simple and test the output directly from the Console in the Scout workflow UI:

On the upper left-hand side of the workflow canvas, click the play icon to open the Console.

In the User’s Message text area, paste the following query then click “Run”:

Please build me a guide including relevant code snippets and information I'd need to install the Scout Copilot module into my website.

The output will be automatically formatted and rendered below the input, and should look something like this:

Voila! And there you have it; we built a RAG app in under 5 minutes that can guide you in building more powerful and complex AI apps on Scout!

Want to keep building? Check out our free Workflow Templates which can help jumpstart your use case!

Built with