Day 04 Day 4

Day 4

Day 4

~1 hour Intermediate Hands-on Precision AI Academy

Today's Objective

Four extraction prompts: one that returns clean JSON from a contract, one that builds a comparison table from product descriptions, one that uses XML tags to structure complex multi-part analysis, and one that extracts structured data from unstructured customer feedback.

Four extraction prompts: one that returns clean JSON from a contract, one that builds a comparison table from product descriptions, one that uses XML tags to structure complex multi-part analysis, and one that extracts structured data from unstructured customer feedback.

Getting Clean JSON from AI

The most common structured output request is JSON. The key is: define the exact schema you want, give an example, and tell the AI to return only JSON (no prose before or after).

contract_data_extraction___json.txt
CONTRACT DATA EXTRACTION → JSON
Extract the following information from the contract below. Return ONLY valid JSON matching this exact schema. Do not include any text before or after the JSON.

Schema:
{
  "parties": {
    "vendor": "string",
    "client": "string"
  },
  "contract_value": "number (annual, USD)",
  "start_date": "YYYY-MM-DD",
  "end_date": "YYYY-MM-DD",
  "auto_renewal": "boolean",
  "termination_notice_days": "number",
  "key_obligations": ["string", "string", "string"],
  "liability_cap": "string (e.g., '2x annual fees' or 'unlimited')"
}

If a field is not found in the contract, use null.

Contract:
[paste contract text here]
customer_feedback___json_array.txt
CUSTOMER FEEDBACK → JSON ARRAY
You are a customer feedback analyst. Extract structured data from the following customer feedback messages. Return a JSON array where each element has this structure:

{
  "feedback_id": "number",
  "sentiment": "positive | neutral | negative",
  "category": "product | support | pricing | onboarding | other",
  "urgency": "low | medium | high",
  "key_issue": "string (1 sentence)",
  "action_required": "boolean"
}

Return ONLY the JSON array. No explanations.

Feedback messages:
1. "The API documentation is excellent but rate limits are killing our use case."
2. "Onboarding took 3 weeks. Should take 3 days."
3. "Your support team responded in 4 minutes on a Saturday. Incredible."
4. "Pricing is fair but we wish there was a mid-tier option."

Comparison Tables from Unstructured Text

vendor_comparison_table.txt
VENDOR COMPARISON TABLE
You are a procurement analyst. one have three vendor proposals (pasted below). Create a comparison table with these exact columns:

| Criteria | Vendor A | Vendor B | Vendor C |
|---|---|---|---|
| Annual cost | | | |
| Implementation timeline | | | |
| SLA uptime guarantee | | | |
| Support tier included | | | |
| Data residency options | | | |
| Contract flexibility | | | |
| Strengths (1-2 words) | | | |
| Weaknesses (1-2 words) | | | |

Fill each cell with a short, specific answer. Use "N/A" if not mentioned. Do not add commentary before or after the table.

Vendor A proposal:
[paste here]

Vendor B proposal:
[paste here]

Vendor C proposal:
[paste here]

XML Tags for Complex Multi-Part Prompts

XML tags help the AI understand which part of a long prompt is which. They're especially useful when your prompt contains document input plus instructions, or multiple sections the AI needs to handle differently.

xml_tags___complex_analysis.txt
XML TAGS — COMPLEX ANALYSIS
You are a business analyst. This lesson is giving you a competitor announcement and our internal product roadmap. Analyze the competitive implications.

<competitor_announcement>
[paste competitor press release or announcement here]
</competitor_announcement>

<our_roadmap>
[paste your Q3/Q4 product roadmap here]
</our_roadmap>

<instructions>
Provide your analysis in this exact format:

OVERLAP: Which of our planned features does the competitor now offer?
DIFFERENTIATION: What do we still have that they don't?
ACCELERATION: Which roadmap items should we ship faster given this news?
RECONSIDERATION: Which roadmap items should we deprioritize or kill?
MESSAGING: One-paragraph suggested update to our competitive positioning.
</instructions>

Why XML tags work: The AI treats the content between tags as a unit. It won't confuse your instructions with your document content. This is especially important when your document input contains words that could look like instructions.

Build 4 Extraction Prompts for Your Work

assList.remove('open')); }); (function(){ const bar = document.getElementById('readingProgress'); const body = document.querySelector('.lesson-body'); function update(){ if (!body) return; const rect = body.getBoundingClientRect(); const total = rect.height - window.innerHeight + rect.top; const scrolled = Math.min(Math.max(-rect.top, 0), total); const pct = total > 0 ? (scrolled / total) * 100 : 0; bar.style.width = pct + '%'; } window.addEventListener('scroll', update, { passive: true }); window.addEventListener('resize', update); update(); })();

What's Next

The foundations from today carry directly into Day 5. In the next session the focus shifts to Day 5 — building directly on everything covered here.

Supporting Videos & Reading

Go deeper with these external references.

Day 4 Checkpoint

Before moving on, verify you can answer these without looking:

Live Bootcamp

Learn this in person — 2 days, 5 cities

Thu–Fri sessions in Denver, Los Angeles, New York, Chicago, and Dallas. $1,490 per seat. June–October 2026.

Reserve Your Seat →
Continue To Day 5
Day 5