Skip to content

Data Organizer

Ask Nova to transform unstructured text into structured JSON data.

System Prompt Template

You are an expert data analyst who can extract structured information from unstructured text.
Follow these instructions:
1. Read and understand the unstructured text in ## Text ##
2. Identify the key entities, attributes, and relationships in the text
3. Create a well-organized JSON structure that captures this information in ## JSON ##. Only enter valid JSON here, without Markdown
4. Add a brief explanation of your JSON structure design choices in ## Explanation ##

User Prompt Template

## Text ##
{text to organize}

Example

Amazon Nova Pro System Prompt

You are an expert data analyst who can extract structured information from unstructured text.
Follow these instructions:
1. Read and understand the unstructured text in ## Text ##
2. Identify the key entities, attributes, and relationships in the text
3. Output a well-organized JSON structure that captures this information

Amazon Nova Pro User Prompt

## Text ##
The quarterly sales meeting was held on March 15, 2025. Sarah Johnson from the North region reported total sales of $1.2M, exceeding her target by 15%. The East region, managed by Robert Chen, achieved $950K in sales, which was 5% below target. Michael Patel from the West region reported $1.05M in sales, meeting exactly 100% of his target. The South region's representative, Lisa Garcia, was unable to attend, but her preliminary report indicates sales of approximately $880K, about 8% below the quarterly target.

Amazon Nova Pro Assistant Prefilled Response

"```json"

Amazon Nova Pro Sample Response

Response

{
  "quarterly_sales_meeting": {
    "date": "March 15, 2025",
    "regions": [
      {
        "name": "North",
        "manager": {
          "name": "Sarah Johnson"
        },
        "sales": {
          "amount": 1200000,
          "target_comparison": {
            "percentage": 115
          }
        }
      },
      {
        "name": "East",
        "manager": {
          "name": "Robert Chen"
        },
        "sales": {
          "amount": 950000,
          "target_comparison": {
            "percentage": 95
          }
        }
      },
      {
        "name": "West",
        "manager": {
          "name": "Michael Patel"
        },
        "sales": {
          "amount": 1050000,
          "target_comparison": {
            "percentage": 100
          }
        }
      },
      {
        "name": "South",
        "manager": {
          "name": "Lisa Garcia"
        },
        "sales": {
          "amount": 880000,
          "target_comparison": {
            "percentage": 92
          },
          "attendance": false,
          "report_status": "preliminary"
        }
      }
    ]
  }
}

API Request

import boto3
import json

bedrock_runtime = boto3.client(
            service_name="bedrock-runtime",
            region_name="us-west-2"
        )

response = bedrock_runtime.converse(
                modelId='us.amazon.nova-pro-v1:0',
                system = [
                    {
                        "text": """You are an expert data analyst who can extract structured information from unstructured text.
    Follow these instructions:
    1. Read and understand the unstructured text in ## Text ##
    2. Identify the key entities, attributes, and relationships in the text
    3. Output a well-organized JSON structure that captures this information"""
                    }
                ],
                messages = [
                {
                    "role": "user",
                    "content": [
                        {
                            "text": "## Text ## The quarterly sales meeting was held on March 15, 2025. Sarah Johnson from the North region reported total sales of $1.2M, exceeding her target by 15%. The East region, managed by Robert Chen, achieved $950K in sales, which was 5% below target. Michael Patel from the West region reported $1.05M in sales, meeting exactly 100% of his target. The South region's representative, Lisa Garcia, was unable to attend, but her preliminary report indicates sales of approximately $880K, about 8% below the quarterly target."
                        }
                    ]
                },
                {
                    "role": "assistant",
                    "content": [
                        {
                            "text": "```json"
                        }
                    ]
                }
            ],
            inferenceConfig={
                "temperature": 0.1,
                "topP": .99,
                "maxTokens": 512
            }
            )


print(json.dumps(response, indent=2))
aws bedrock-runtime converse \
  --model-id "us.amazon.nova-pro-v1:0" \
  --system '[
    {
      "text": "You are an expert data analyst who can extract structured information from unstructured text.\nFollow these instructions:\n1. Read and understand the unstructured text in ## Text ##\n2. Identify the key entities, attributes, and relationships in the text\n3. Create a well-organized JSON structure that captures this information in ## JSON ##\n4. Add a brief explanation of your JSON structure design choices in ## Explanation ##"
    }
  ]' \
  --messages '[
    {
      "role": "user",
      "content": [
        {
          "text": "## Text ##\nThe quarterly sales meeting was held on March 15, 2025. Sarah Johnson from the North region reported total sales of $1.2M, exceeding her target by 15%. The East region, managed by Robert Chen, achieved $950K in sales, which was 5% below target. Michael Patel from the West region reported $1.05M in sales, meeting exactly 100% of his target. The South region'\''s representative, Lisa Garcia, was unable to attend, but her preliminary report indicates sales of approximately $880K, about 8% below the quarterly target."
        }
      ]
    }
  ]' \
  --inference-config '{
    "temperature": 0.1,
    "topP": 0.99,
    "maxTokens": 512
  }' \
  --region us-west-2
{
  "modelId": "us.amazon.nova-pro-v1:0",
  "system": [
    {
      "text": "You are an expert data analyst who can extract structured information from unstructured text.\nFollow these instructions:\n1. Read and understand the unstructured text in ## Text ##\n2. Identify the key entities, attributes, and relationships in the text\n3. Create a well-organized JSON structure that captures this information in ## JSON ##\n4. Add a brief explanation of your JSON structure design choices in ## Explanation ##"
    }
  ],
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "text": "## Text ##\nThe quarterly sales meeting was held on March 15, 2025. Sarah Johnson from the North region reported total sales of $1.2M, exceeding her target by 15%. The East region, managed by Robert Chen, achieved $950K in sales, which was 5% below target. Michael Patel from the West region reported $1.05M in sales, meeting exactly 100% of his target. The South region's representative, Lisa Garcia, was unable to attend, but her preliminary report indicates sales of approximately $880K, about 8% below the quarterly target."
        }
      ]
    }
  ],
  "inferenceConfig": {
    "temperature": 0.1,
    "topP": 0.99,
    "maxTokens": 512
  }
}