Guardrails Client Configuration Guide

Note: This process must be completed using an IAM user with sufficient permissions, it cannot be completed as a Root user.

Step 1: generate mock data with the values that will be tested against, such as first name, last name, email address, etc. Can use something like https://www.mockaroo.com/, output as CSV file, at least 1k rows.

Step 2: Create a S3 bucket to store the mock data. Should beGeneral Purpose, and Block all public access.

Step 3: Upload mock data to new S3 bucket.

Step 4: In AWS Bedrock, ensure that the models being tested have been provisioned for access. If not, request access to the desired models.At least 2 models are required, one that will serve as the base model for querying, and another for the embedding of the data with the vector database/knowledge base. Once access has been provisioned, proceed to step 5.

Step 5: Next, create the Knowledge Base in Bedrock. If this is the first Knowledge Base being created, select “Create and use a new service role” and specify a name for the service role, otherwise select an existing service role. For Data Source, select Amazon S3. For Data Source, select the S3bucket that was created in step 2. For the Embeddings Model, select the model that was provisioned in step 4. Note: The Knowledge Base may take up to 5minutes to complete. Do not leave the page while the Knowledge Base is being created. If creating the Knowledge Base fails, try again, it can be finnicky.

Step 6: Select the newly created Knowledge Base from theKnowledge bases tab on the left. Under the Data Source widget, select the DataSource and then Sync. Wait for the sync to complete before proceeding.

Step 7: Once the initial sync is complete, the data is ready to be queried, either programmatically though the AWS API or via the Knowledge bases UI. To query via the UI, first select one of the provisioned models from step 4 using the Select model button. To modify the configuration of the model, including customizing the system prompt, select the 3 lines button within the query window. The system prompt can be modified under the “Knowledge base prompt template” section. It is recommended to confirm that the model is working as expected in the UI before attempting to access it programmatically.