Why is this needed?
Connecting Bedrock into the Verodat system enables users to leverage data management and AI querying capabilities in conjunction with multiple powerful language models available through Amazon Bedrock.
Verodat facilitates the structuring of queries, instructions, and workflows, which are then routed through the Bedrock API to prompt the chosen AI model.
Step 1: Create your query
Log into your Verodat account.
In your workspace, select the Cog icon in the bottom left corner and then select ‘AI Configuration’ tab.
In the ‘Queries’ tab select ‘+ Add Query’
The business question should be the full initial prompt. See example below:
You are tasked with creating a comprehensive product comparison report based on the given input. Your goal is to analyze two products objectively and provide a detailed comparison based on specific criteria. Follow these instructions carefully to produce an informative and well-structured report.
You will be given information about two products and a set of comparison criteria.
Begin by thoroughly analyzing each product based on the provided comparison criteria. Consider all aspects mentioned in the product descriptions and how they relate to each criterion.
Next, create a comparison table that summarizes the key features of both products side by side. Use the following format:
<comparison_table>
| Criterion | Product A | Product B |
|-----------|-----------|-----------|
| [Criterion 1] | [Product A's feature] | [Product B's feature] |
...
</comparison_table>
After the table, provide a detailed analysis and comparison of the two products. Discuss each criterion in depth, highlighting the strengths and weaknesses of each product. Use specific examples from the product descriptions to support your analysis.
In your analysis, consider the following:
1. How well does each product meet the comparison criteria?
2. What are the unique selling points of each product?
3. Are there any notable differences in quality, features, or performance?
4. How do the products compare in terms of value for money?
Based on your analysis, draw a conclusion about which product performs better overall or in specific areas. Provide a recommendation for potential buyers, considering different use cases or consumer needs.
Present your entire report within <product_comparison_report> tags, structured as follows:
<product_comparison_report>
<introduction>
[Brief introduction to the products being compared]
</introduction>
<comparison_table>
[Your comparison table here]
</comparison_table>
<detailed_analysis>
[Your detailed analysis and comparison]
</detailed_analysis>
<conclusion_and_recommendation>
[Your conclusion and product recommendation]
</conclusion_and_recommendation>
</product_comparison_report>
Ensure that your report is objective, well-reasoned, and based solely on the information provided in the input. Do not make assumptions or include information that is not given in the product descriptions or comparison criteria.If the query requires parameters to be provided, then add parameter names and values.
SELECT “”
In the instructions tab, you should select ‘Add Instruction’ and add any additional detail not in your ‘Business Question’.
Step 2: Add your Model
In the LLM Configuration tab select ‘Add Model’ and then enter the following:
Name: Whatever descriptive name you’d like
URL: The Invoke URL of the API you created - you can find this under ‘Stages’ in the API gateway you created earlier in AWS. It will look something like this:
https://lettersandnumbers.execute-api.eu-central-1.amazonaws.com/dev
API Key: You can create this under the API Keys section of the API gateway. Just select “Create API Key’ and post the key into the API Key Field in Verodat.
Select ‘Test Connection’ to ensure that you have set up the correct settings. Verodat will let you know if your test has passed, and if it has not it will return an error message explaining the issue. Once you’re happy, select ‘Save’
💡 Want to know more about AI models? Find more details here:
Using the Verodat API
Why use the Verodat API?
The Verodat API is used to programmatically execute AI queries and manage workflows in a structured manner. By using the API, you can automate the submission of queries to AI models and receive results directly from Bedrock-powered models.
Steps to follow:
Now we’re ready to test the Verodat API.
To do this, we need to constrict a command which specifies the displayed IDs for model, query and inthe Verodat UI. This command will trigger your AI action to run.
Below is an example in curl (the API docs include details of how you can do this in your preferred language):
curl --location "https://dev-app.verodat.io/api/v3/ai/accounts/{accountId}/workspaces/{workspaceId}/execute-ai-query" --header "Authorization: ApiKey API_KEY" --header "Content-Type: application/json" --data "{\"model\": 1, \"queries\": {\"2\": {}}, \"instructions\": [2]}"Below is the API documentation for reference - see more details here.
openapi: 3.0.0
info:
title: Api documentation
description: Api documentation
version: 1.0.0
servers:
- url: https://dev-app.g360.io/api/v3
components:
securitySchemes:
JWT:
type: http
name: Authorization
scheme: bearer
bearerFormat: JWT
description: 'Prefix the value with "Bearer" to indicate the custom authorization type'
ApiKey:
type: apiKey
name: Authorization
in: header
description: 'Prefix the value with "ApiKey" to indicate the custom authorization type'
security:
- JWT: []
paths:
/ai/accounts/{accountId}/workspaces/{workspaceId}/execute-ai-query:
post:
summary: Execute an AI query
description: Execute an AI query on a configured LLM model with optional payload, queries with parameters and instructions
parameters:
- name: accountId
in: path
required: true
schema:
type: integer
- name: workspaceId
in: path
required: true
schema:
type: integer
security:
- ApiKey: [ ]
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- model
properties:
model:
type: integer
description: The ID of the AI model to use.
inputPayload:
type: string
description: The input payload for the AI query.
instructions:
type: array
items:
type: integer
description: An array of instruction IDs for the AI query.
queries:
type: object
additionalProperties:
type: object
properties: { }
description: An object containing database queries to execute. The keys should be the IDs of specific queries, and the values should be objects containing parameter names and values if query requires parameters to be provided.
example:
'1':
first_name: John
last_name: Doe
'2':
product_id: 123
quantity: 5
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
response:
type: string
description: The AI-generated response.
'403':
description: Insufficient privileges or license expired
content:
application/json:
schema:
type: object
properties:
statusCode:
type: integer
example: 403
description: HTTP status code
message:
type: string
example: License has expired
description: Error message. 'License has expired' in case of license expiry. 'Access denied' in case of insufficient privileges
accountId:
type: string
description: Account ID associated with the error
'400':
description: Bad Request
content:
application/json:
schema:
type: object
properties:
message:
type: string
description: Description of the error
