<instructions>
Your task is to analyze customer data and generate insights.
Follow these rules:
- Maintain data types as specified
- Handle missing fields gracefully
- Round numerical values to 2 decimal places
</instructions>
<input_schema>
{
"customer": {
"id": "string",
"profile": {
"name": "string",
"segment": "string",
"joinDate": "ISO8601 date"
},
"transactions": [
{
"id": "string",
"amount": "number",
"date": "ISO8601 date",
"category": "string"
}
]
}
}
</input_schema>
<output_schema>
{
"analysis": {
"customerValue": "number",
"segmentInsights": "string",
"recommendations": ["string"]
},
"metadata": {
"processedAt": "ISO8601 date",
"dataQuality": "number (0-1)"
}
}
</output_schema>
<example_input>
{
"customer": {
"id": "C123",
"profile": {
"name": "John Doe",
"segment": "Premium",
"joinDate": "2023-01-15"
},
"transactions": [
{
"id": "T789",
"amount": 299.99,
"date": "2023-03-20",
"category": "Electronics"
}
]
}
}
</example_input>
<example_output>
{
"analysis": {
"customerValue": 299.99,
"segmentInsights": "Premium customer with focus on electronics",
"recommendations": [
"Offer extended warranty",
"Suggest complementary accessories"
]
},
"metadata": {
"processedAt": "2023-03-21T10:30:00Z",
"dataQuality": 1.0
}
}
</example_output>
# Task Description
Analyze customer data to generate insights and recommendations.
# Processing Rules
1. Maintain data types as specified
2. Handle missing fields gracefully
3. Round numerical values to 2 decimal places
# Input Schema
```json
{
"customer": {
"id": "string",
// schema continues...
}
}
{
"analysis": {
// schema continues...
}
}{
// example input...
}{
// example output...
}
## 3. Using Delimiter-Based Sections
===== INSTRUCTIONS ===== Analyze customer data and generate insights.
===== RULES =====
- Maintain data types as specified
- Handle missing fields gracefully
- Round numerical values to 2 decimal places
===== INPUT SCHEMA ===== { // schema definition... }
===== OUTPUT SCHEMA ===== { // schema definition... }
===== EXAMPLES ===== Input: { // example input... }
Expected Output: { // example output... }
## Best Practices for Section Demarcation
1. Consistent Delimiters
- Use the same style throughout the prompt
- Make delimiters visually distinct
- Ensure delimiters don't appear in the content
2. Hierarchical Structure
- Move from general to specific
- Group related information
- Use clear section titles
3. Visual Spacing
- Use blank lines between sections
- Maintain consistent indentation
- Align related elements
4. Clear Transitions
- Signal transitions between sections
- Use numbered steps for sequences
- Include section descriptions
5. Validation Markers
<validation_rules>
- Required fields: ["id", "name"]
- Data types: { "id": "string", "amount": "number" }
- Constraints: { "amount": "> 0", "date": "ISO8601" } </validation_rules>
6. Error Handling Specifications
<error_handling>
- Missing fields: Return null for optional fields
- Invalid types: Report in metadata.errors array
- Constraint violations: Include in validation_results </error_handling>
7. Processing Steps
<processing_steps>
- Validate input structure
- Transform data according to schema
- Apply business rules
- Generate insights
- Format output </processing_steps>