Building Blocks

This guide explains each of the building blocks available for configuring an App and how to configure them.

Overview

Apps consist of inputs, composable blocks, and outputs. Each App block is designed with its own set of configurations and they can be set to run based on the outputs of other blocks.

LLM

Within the LLM block you'll find configuration for selecting a foundational model, the model's temperature, a maximum token limit, your desired response type, and the system prompt. LLM blocks can be chained together for a variety of use cases like building guardrails or routing an input based on its characteristics.

LLM Block

Model
Scout provides access to Open AI models as well as several open source models such as those from Mixtral. Each model has its own set of strengths so you can experiment with different approaches based on the accuracy, response time, and output style to fit your use case. We'll continue expanding our library of available foundation models as advancements are made.

LLM Block - Model

Temperature
Temperature ranges from 0 (lowest) to 2 (highest). Lower settings (close to 0) produce more predictable, conservative outputs, ideal for factual or straightforward tasks. Higher settings (closer to 2) increase creativity and diversity, useful for brainstorming or creative tasks. This scale adjusts the model's balance between reliability and inventiveness in responses.

LLM Block - Temperature

Max Tokens
This configuration setting determines the maximum length of the model's response, measured in tokens. A token can be a word or part of a word. Setting a higher max token limit allows for more detailed and comprehensive answers, while a lower limit results in shorter, more concise responses. Adjust this setting based on your need for brevity or detail in the model's output.

LLM Block - Max Tokens

Response Type
This sets the data type of the response to be either Text or JSON. Text is the most common response type and JSON is often used for Apps that need to generate a True or False output. These boolean outputs can be referenced within the conditional logic of a block for routing and defining intents.

LLM Block - Response Type

Prompt
Prompt engineering can be useful for specifying the role of the model along with other characteristics that can reduce the likelihood of hallucinations. The system prompt is used by a language model to provide context and structure for generating text. By providing additional information within the system prompt, such as background knowledge or other contextual cues, it can help inform how the model interprets user input and respond accordingly. A pre-written prompt is drafted during the creation of your App which you can change and update to your needs.

LLM Block - Prompt

Collection

The Collection block is used to retrieve information from a Collection so that it can be used by an LLM block. This block is most commonly used for building RAG (Retrieval-Augmented Generation) apps. Content within Collections has been chunked and stored in a vector database for retrieval.

Collection Block

Collection Select

Once you've built a Collection it will be available in this dropdown. Only one can be selected but adding multiple Collection blocks provides the ability to connect more than one Collection within an App. At the bottom of the list you'll find an option titled "By Collection ID" that can be used if you would like to set a variable for this input.

Collection Block - Collection Select

Limit

The Limit input sets the maximum number of documents that will be returned from the Collection. Lowering this value reduces the amount of content used by future block like an LLM to generate an output.

Collection Block - Limit

Minimum Similarity

The Minimum Similarity represents the distance from the query you would like the search executed. A value of 1 is equivalent to an exact match while a value of 0 requires no similarity to return a document.

Collection Block - Minimum Similarity

Query

The Query configuration includes the content you would like to be used when searching the Collection. Dynamic variables (e.g. {{inputs.input}}) can be used here to represent inputs or outputs of following blocks.

Collection Block - Query

Web

The Web block is used to retrieve information from the web using a SERP call. The query can be filtered to a specific URL or set of URLs.

Web Block

Web Page Limit

This input sets the maximum number of pages that will be crawls based on the web search. Similar to a Google search, you may find that most queries work well by retireving one page.

Web Block - Web Page Limit

Chunk Limit

The Chunk Limit sets the maximum number of text chunks that will be returned from the web pages that were crawled based on the search query.

Web Block - Chunk Limit

Search Term

This Search Term represents the query that will be used to search the web. The scope of the Search Term can be filtered using search operators. Dynamic variables can be used here as well to represent inputs or outputs of following blocks.

site:https://scoutos.com {{inputs.input}}

Web Block - Search Term

Save

The Save block is used to create Collection documents from within an App run. Jinja templates can be used in the Value fields, allowing you to store values from the app run state.

Save Block

Collection Select

Once you've built a Collection it will be available in this dropdown. Only one can be selected per block but adding multiple Save blocks provides the ability to store App run results in more than one Collection.

Save Block - Collection Select

Values

Each Save block initially includes a Value for the text column of a document which is the content that is stored as an embedding. This initial Value can be edited by clicking on the more options icon. More values can be added by selecting the plus icon and specifying the Column, Value, and Type.

Save Block - Values

Text

The Text block is used to create variables that can be utilized in following blocks. This is particularly useful for experimentation and abstracting portions of a prompt to improve the readability of custom LLM instructions.

Text Block

Text Configuration

Within the Text area is where you can input the content you would like represented by the block's slug. This content can be referenced in following blocks using the slug output. e.g. text.output

Text Block - Text

HTTP

The HTTP block gives your app to the ability to make HTTP requests. The 5 most popular REST methods can be configured along with the body for POST, PUT, and PATCH requests. Headers can also be congifured for authorization and more.

HTTP Block

Method

There are five methods available including GET, POST, PUT, PATCH, and DELETE. More information on REST request methods can be found here.

HTTP Block - Method

URL

A RESTful service URL is required to successful implement the HTTP block.

HTTP Block - URL

Request Body

The request body is used to send and receive data such as credentials to a RESTful service.

HTTP Block - URL

Headers

Headers can be added as well which are used to pass additional information with an HTTP request or response. More information on HTTP Headers can be found here.

HTTP Block - Headers