Skip to content

Bedrock Data Automation Blueprint invalid schema error

0

I have been adjusting blueprints in the BDA to fit our different document needs, and have tried to utilize the JSON view to copy and paste for quicker edits. However, I have been getting an Invalid schema error when trying to parse or save the blueprint, but it doesn't show any error in the JSON view. I have also tried to use the UI to add exactly the same format and get the same invalid schema error. I am lost on how to troubleshoot going forward.

Here is the custom type I am struggling with

    "patient_contacts": {
      "type": "object",
      "properties": {
        "patient_home_phone_number": {
          "type": "string",
          "inferenceType": "explicit",
          "instruction": "Extract the patient's home phone number exactly as shown. If more than one appears, use the first clearly labeled 'Home'."
        },
        "patient_home_phone_number_formatted": {
          "type": "string",
          "inferenceType": "inferred",
          "instruction": "Transform the patient's home phone number into US phone format (e.g., )."
        },
        "patient_mobile_phone_number": {
          "type": "string",
          "inferenceType": "explicit",
          "instruction": "Extract the patient's mobile or cell phone number exactly as shown. Look for labels such as 'Cell', 'Mobile', 'M'."
        },
        "patient_mobile_phone_number_formatted": {
          "type": "string",
          "inferenceType": "inferred",
          "instruction": "Transform the patient's mobile phone number into US phone format ."
        },
        "patient_other_phone_number": {
          "type": "string",
          "inferenceType": "explicit",
          "instruction": "Extract any other patient phone number that is not clearly Home or Mobile (e.g., Work, Fax, Unknown)."
        },
        "patient_other_phone_number_formatted": {
          "type": "string",
          "inferenceType": "inferred",
          "instruction": "Transform the 'other' phone number into US phone format."
        },
        "patient_other_phone_type": {
          "type": "string",
          "enum": ["work","fax","other","unknown"],
          "inferenceType": "inferred",
          "instruction": "Infer the type of 'other' phone (e.g., Work, Fax) based on labels near the number. Use 'unknown' if unclear."
        },
				"patient_email": {
					"type": "string",
					"inferenceType": "explicit",
					"instruction": "Extract the patient email address if present."
        }
      }
    }

asked a year ago604 views

1 Answer
0

Hello,

Thank you for reaching out regarding the Bedrock Data Automation blueprint schema error.

I understand how frustrating it can be when encountering schema validation issues without clear error indicators. After reviewing your JSON schema, I've identified several adjustments that should resolve the invalid schema error:

  1. Your schema needs some essential root-level elements. Here's what to add at the top of your JSON:
{
    "description": "Blueprint for processing patient contacts",
    "class": "Patient Contacts",
    "type": "object",
    "definitions": {},
    "properties": {
        // Your existing patient_contacts content goes here
    }
}
  1. In your instruction fields for phone number formatting, please complete the example formats:
  • Update "Transform the patient's home phone number into US phone format (e.g., )." to include the format example: "(555) 123-4567)"
  • Do the same for mobile and other phone number formatting instructions
  1. For consistent formatting:
  • Replace the tabs in the "patient_email" section with spaces
  • Ensure uniform indentation throughout the schema

Try implementing these changes and let me know if you still encounter any issues. I'm here to help if you need further assistance or clarification.

Sources
Creating blueprints for images - Amazon Bedrock
Create Blueprints for Validation - Amazon Bedrock
Custom output and blueprints - Amazon Bedrock

answered a year ago

AWS
SUPPORT ENGINEER

revised a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.