Rag

Enable RAG = boolean

Click Yes to enable Retrieval-Augmented Generation (RAG). Using RAG optimizes an LLM output by invoking an authoritative knowledge base outside of the LLM's initial training data sources. By using RAG, you can extend an LLM's capabilities to specific domains, such as your organization's documentation, without needing to retrain the model.

Defaults to No.


Pretext = text editor

Add text to your LLM prompt before the RAG data is listed, thus instructing the LLM what to do with the RAG data. For example, you might wish to use RAG to search relevant documentation snippets to answer a question.

Example:

"Use any of the following documentation snippets in your response, if relevant:"


Search Column = drop-down

Choose a column in the source table that contains a search term for the vector database. The value is then taken from that column and a vector search is performed. For example, a column value might be a user question such as "How do I log in?". A search is then performed on the vector database using the value string, which will return N number of relevant data. N is defined by the Top K parameter, further down.

If your vector database contained vectors created from chunks of text documentation, in this scenario the RAG data returned may include the chunk "to log in, click on the key button in the top right and enter your username and password". This data is then inserted into the llm prompt to help provide relevant context.


Embedding Provider = drop-down

The embedding provider is the API service used to convert the search term into a vector. Choose either OpenAI or Amazon Bedrock. The embedding provider receives a search term (e.g. "How do I log in?") and returns a vector.

Choose your provider:

OpenAI API Key = drop-down

Use the drop-down menu to select the corresponding secret definition that denotes the value of your OpenAI API key.

Read Secrets and secret definitions to learn how to create a new secret definition.

To create a new OpenAI API key:

  1. Log in to OpenAI.
  2. Click your avatar in the top-right of the UI.
  3. Click View API keys.
  4. Click + Create new secret key.
  5. Give a name for your new secret key and click Create secret key.
  6. Copy your new secret key and save it. Then click Done.

Embedding Model = drop-down

Select an embedding model.

Currently supports:

  • text-embedding-ada-002
  • text-embedding-3-small
  • text-embedding-3-large

Embedding AWS Region = drop-down

Select your AWS region.


Embedding Model = drop-down

Select an embedding model.

Currently supports:


Vector Database = drop-down

Select a vector database to use.

Currently supports Pinecone and Postgres.

Pinecone API Key = drop-down

Use the drop-down menu to select the corresponding secret definition that denotes the value of your Pinecone API key.

Read Secrets and secret definitions to learn how to create a new secret definition.


Pinecone Index = string

The name of the Pinecone vector search index to connect to. To retrieve an index name:

  1. Log in to Pinecone.
  2. Click PROJECTS in the left sidebar.
  3. Click a project tile. This action will open the list of vector search indexes in your project.

Pinecone Namespace = string

The name of the Pinecone namespace. Pinecone lets you partition records in an index into namespaces. To retrieve a namespace name:

  1. Log in to Pinecone.
  2. Click PROJECTS in the left sidebar.
  3. Click a project tile. This action will open the list of vector search indexes in your project.
  4. Click on your vector search index tile.
  5. Click the NAMESPACES tab. Your namespaces will be listed.

Top K = integer

The number of results to return from the vector database query.

Between 1-100.

Default is 3.


Data Lookup Strategy = drop-down

Select the data lookup strategy. Pinecone only stores the vector associated with text data, and a JSON metadata blob. While the text data can be stored in the metadata blob, size limitations can affect coverage—for example when a user has a larger blob of text to be converted to a vector.

  • Raw data in metadata: Choosing this option adds an additional property, Data Path, to provide the path to text data within the metadata JSON blob.
  • Table details in metadata: Database, schema, and table information is used in the metadata to look up the text data in your warehouse table.

Data Path = string

Set the path to the data in the metadata JSON blob.

Default is data.

Host = string

Your Postgres hostname.


Port = string

The TCP port number the Postgres server listens on. The default is 5432.


Database = string

The name of your Postgres database.


Username = string

Your Postgres username.


Password = drop-down

Use the drop-down menu to select the corresponding secret definition that denotes the value of your Postgres password.

Read Secrets and secret definitions to learn how to create a new secret definition.


Schema = drop-down

The Postgres schema. The available schemas are determined by the Postgres database you have provided.


Table = drop-down

The table to load data from. The available tables are determined by the Postgres schema you have selected.


Key Column Name = drop-down

The column in your table to use as the key column.


Text Column Name = drop-down

The column in your table with your original text data.


Embedding Column Name = drop-down

The column in your table used to store your embeddings.


Similarity Function = drop-down

Select which similarity function (distance metrics) to use.


Top K = integer

The number of results to return from the vector database query.

Between 1-100.

Default is 3.


Connection Options = column editor

  • Parameter: A JDBC Postgres parameter supported by the database driver.
  • Value: A value for the given parameter.