# Example Usage

The workflow below demonstrates Bedrock connector's Create Embeddings and AI Generation operations.
It shows a query coming in through a Webhook and being sent to AWS Bedrock to create an embedding vector. The resulting vector is then passed to a vector database to perform a similarity search.
The AI Generation operation uses the similarity search result to Create a model response for the received query.
![aws-bedrock-wf](https://tray.ai/documentation/images/connectors/artificial-intelligence/aws-bedrock/79uHZHLkjz6Baed8J4vhGv_aws-bedrock-wf%201.png)
To generate the embeddings the Create Embeddings operation requires a model name to use and the query received through the Werbhook trigger
![aws-bedrock-wf-embedded-pp](https://tray.ai/documentation/images/connectors/artificial-intelligence/aws-bedrock/2egORIB4xq9hUXR9Aoiq2V_aws-bedrock-wf-embedded-pp%201.png)
The AI Generation operation requires information for the following mandatory parameters:

* \*\*Messages: \*\*A list of messages comprising the conversation so far. Every message
  * \*\*Role: \*\*The role of the messages author. For example, system, user, assistant, etc.
* \*\*Model: \*\*ID of the model to use. You can choose from the available options.
  ![aws-bedrock-wf-pp](https://tray.ai/documentation/images/connectors/artificial-intelligence/aws-bedrock/1FWm8Ne7oOegZRbkaYNWpe_Group%205.png)
  **Key Configurations**
  **System Message**:
* The system message sets the tone and context for the AI's responses. In this case, the AI is instructed to act as a helpful assistant who creates technical documentations.
* The system message includes specific rules and guidelines to ensure that responses are accurate, relevant, and in the desired format. It also included top 10 relevant searches from a Vector database.
  **User Message**:
* This is where the user’s query is passed to the AI. In this example the query is dynamically fetched from the Webhook trigger
