- 29 Oct 2024
- 3 Minutes to read
- Print
- DarkLight
AI Common
- Updated on 29 Oct 2024
- 3 Minutes to read
- Print
- DarkLight
Module Details | |
Core or Github Module | Core |
Requires Restart? | No |
Steps Exposed | Yes |
Settings Location |
|
Step Location |
|
Requirements |
|
Overview
The AI Common Module is essential for utilizing various AI integrations within the platform. This is a shared module between other AI modules and provides necessary functionalities, tools, and interfaces as a foundational layer for integrating different AI services.
The Common module is installed when any other AI related module (Google Vertex, AWS Bedrock, etc) is installed. For PostgreSQL users there are three steps that are specific for their environment.
In v9.4 users have access to a Prompt Management Dashboard where they can review created Prompts and how each model used responds to them.
Available Steps
Installing the Module exposes the following steps found in the toolbox at AI > Common, AI > Text Manipulation, AI > Prompt Management, AI > Postgres, and AI > Vector Preparation.
Common
Step Name | Description |
---|---|
Chat Completion | This step allows for a prompt to be submitted to a large language model (LLM) and will return the response the LLM gives back. Prompts can added directly or pulled from the Flow. Users can also select the model they want to review the prompt. |
Get Embedding for Text | This will fetch the embeddings for a Text input to allow review. |
Providers
Step Name | Description |
---|---|
Get Chat Completion Models | This will list all the models available for a given Provider. |
Get Feature Names | Fetches a list of all the Feature Names used by a given Provider. |
Get Providers | Produces a list of all available Providers. |
Postgres
Step Name | Description |
---|---|
Ensure Postgres Vector Extension | This step configures the PostgreSQL database to support vector data storage. It allows setting table and column names to store vector data in PostgreSQL. This step ensures that the necessary extensions are in place for optimal vector data management. |
Query Table with Vector Data | This step facilitates querying a PostgreSQL table with vector data. It takes as input the 'Vector Storage Info' and the specific vector to find, which includes a JSON Representation, ReferenceID, and TokenCount. This step is useful for retrieving relevant information based on vector data stored in the PostgreSQL database. |
Save Vector Embedding to Postgres | This step allows the storage of vector embeddings in a PostgreSQL table. It takes the 'Vector Storage Info' and the list of vectors to store as input. This step is valuable for saving embeddings generated from various sources into the PostgreSQL database, providing a centralized location for vector data. |
Prompt Management
Step Name | Description |
---|---|
Escape Json In Text | Removes JSON specific characters from a string so that the data can be cleanly used elsewhere. |
Prepare Text for Embeddings | This step allows users to add text that will be used for an embedding within a LLM. There are also pre-built options like stripping out HTML and removing square brackets [ ]. |
Remove Control Characters From Text | Unneeded control characters are removed from an inputted string with this step. |
Remove HTMLTags From Text | Any text used as an Input for this step will have its HTML removed. |
Split Long Text Into Chunks | This step is used for building chunks that an LLM can more easily use. The text to use and the size of the chunk are defined in the step's properties. |
Text Manipulation
Step Name | Description |
---|---|
Escape JSON in Text | This step takes in text input containing JSON content and escapes special characters, ensuring proper JSON format. This is useful with textual data that includes JSON content to prevent parsing errors or unintended behavior. |
Prepare Text for Embeddings | This step is intended for text preprocessing for natural language processing (NLP) tasks. It aims to optimize text data for embedding models. |
Remove Control Characters From Text | This step helps to process text inputs and eliminate any control characters present in the text. Control characters are non-printable characters that can cause text processing, display, or interpretation issues. This step ensures that the output text is free from such characters, promoting cleaner and more readable text. |
Remove HTML Tags From Text | This step removes HTML tags from the text, ensuring only plain text is left. This is important when dealing with content extracted from web pages or HTML-formatted text. |
Split Long Text into Chunks | This step helps break long text into manageable chunks. Useful for data exceeding maximum size and processing limits. This is particularly helpful when dealing with text data that exceeds a specified maximum size, preventing issues related to processing limitations or model constraints. |
Vector Preparation
Step Name | Description |
---|---|
Ensure Postgres Vector Extension | PostgreSQL users can use this step to guarantee a connection with their LLM's vector database. |
Query Table With Vector Data | This step will send a query to the AI's vector database and return a specified number of results. |
Save Vector Embedding to Postgres | PostgreSQL users will need to use this step when saving text embeddings to their database. |
Feature Changes
Description | Version | Release Date | Developer Task |
---|---|---|---|
Updated the AI Common module to provide more Steps. | 9.3 | October 2024 | [DT-041798] |