Build a RAG app in under 5 minutes

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 ”+ New Collection”
  4. Name and create your Collection
  5. Once your Collection is provisioned, click it to open it

There are 3 primary ways you can add Documents to a Collection in Scout:

  • Give Scout a URL or website to scrape
  • Upload files to Scout
  • Create a Document directly 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 ”+” in the nav at the top to start adding Documents. Then, select the “Website Crawl” option.

  • Enter https://scoutos.com as the Start URL
  • Select HTTP as the Scraper
  • Select Readability as the Text Extractor
  • Click the “Run” button to start scraping the Scout website. You’ll land on a page showing you 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:
  • Hover over the input block and click the ”+” button below it and add a new Collection block
  • Then, click the newly created Collection block, and modify its configurations as follows:
    • Collection ID: Input the ID of the Collection you created in the previous section. You can find your Collection ID by copying it from the end of the URL when viewing your Collection. For example, here’s what mine looks like:
    • Limit: We’ll use 10. This setting controls the max amount of documents retrieved
    • Minimum Similarity: We’ll use 0.7. This setting sets a threshold for similarity match between the RAG input and the documents we’ll retrieve
    • Query: This should be {{inputs.user_message}} in order to supply the RAG app’s input to the Collection query
  • 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:

Hover over the Collection block and click the ”+” button below it and add a new LLM block.

Then, click the newly created LLM block, and modify it’s 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
  • Then, at the very bottom of the LLM block settings, toggle Output Block to on. This signifies that this LLM block will be the last block to run, and will return it’s output and conclude the Workflow. 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!