GenAI Block
GenAI blocks can be used to connect to LLMs on Bedrock/OpenAI making it suitable for various applications, including text generation, summarization, translation, text to image, and more.
This is integrated off the shelf with Zerve Canvas and can be used for analytics workflows out of the box. Read more about Bedrock here - https://aws.amazon.com/bedrock/
List of Models supported
The GenAI block supports the following models
Titan Text Large
amazon.titan-tg1-large
Text
Titan Image Generator G1
amazon.titan-image ganerator-v1
Image
Titan Text G1 - Lite
amazon.titan-text-lite-vt
Text
Titan Text G1 - Express
amazon.titan-text-express-vi
Text
SDXL 0.8
stability.stable-diffusion-xl
Image
SDXL 0.8
stability.stable-diffusion-xl-v0
Image
SDXL 1.0
stability.stable-diffusion-xl-v1
Image
J2 Grande Instruct
ai21.j2-grande-instruct
Text
J2 Jumbo Instruct
ai21.j2-jumbo-instruct
Text
Jurassic-2 Mid
ai21.j2-mid
Text
Jurassic-2 Mid
ai21.j2-mid-v1
Text
Jurassic-2 Ultra
ai21.j2-ultra
Text
Jurassic-2 Ultra
ai21.j2-ultra-v1
Text
Claude Instant
anthropic.claude-instant-v1
Text
Claude
anthropic.claude-v2:1
Text
Claude
anthropic.claude-v2
Text
Claude 3 Sonnet
anthropic.claude-3- sonnet-20240229-v1:0
Text
Claude 3 Haiku
anthropic.claude-3- sonnet-hlku-20240507-v1:0
Text
Command
cohere.command-text-v14
Text
Command Light
cohere.command-light-text-v14
Text
Lama 2 Chat 13B
meta.lama2-13B-chat-v1
Text
Lama 2 Chat 70B
meta.lama2-70B-chat-v1
Text
Llama 3 8B Instruct
meta.lama3-8B-instruct-v1:0
Text
Llama 3 70B Instruct
meta.lama3-70B-instruct-v1:0
Text
Mistral 7B Instruct
mistral.mistral-7B-instruct-v0:2
Text
Mixtral 8x7B Instruct
mistral.mixtral-8x7b-instruct-v0:1
Text
Mistral Large
mistral.mistral-large-2402-v1:0
Text
All OpenAI Models
as per api
Text
GenAI can be used in two distinct ways.
Usage
The first involves passing prompts within the prompt block to generate output



Using Variable
Additionally, the prompt blocks can be linked with a Python layer, allowing input to be passed as a variable from Python blocks to the prompt blocks. This makes it easier to use Gen AI as part of existing analytics workflows without complex agent integrations.


System Prompt:
The “system prompt” is a prompt or instruction provided to the model before any user interaction occurs. It sets the context, tone, or guidelines for how the model should behave during the conversation. This prompt helps to ensure that the model responds in a manner consistent with the desired role or objective throughout the interaction.
By default bedrock blocks are enabled with the following system prompt.
Messages = (
"You are a data science assistant with great coding skills. "
"Your prompts originate from a code block in a directed acyclic graph of connected code blocks. "
"You have access to the code used to generate variables you have access to the content and a description of each variable. "
"If the user asks about their code, other blocks or variables answer as directly as possible with best practices for machine learning and datascience deployments in mind. "
"If the user asks about a variable, provide the value of the variable."
"Make sure to take additional variables into account but ignore them if your not asked about them"
"If an answer is more verbose, please provide it in markdown syntax with headings and lists. "
"If it is possible to answer accurately with a single statement or string, particularly for non-abstract concepts such as the value of a variable or the content of code, prefer this. "
"Keep the suggestions short if possible."
"Do not give the block IDs in your output"
"If you are tasked with image generation, please strictly generate an image related to the prompt. "
"If you are tasked with image generation, use only the variables or code referred to in the prompt below, ignore any variables or code not referred to, directly or indrectly, below."
)
Last updated