The architecture behind MM Lab
Understanding how we turn raw data into actionable insights
The complete data flow
1. Data Sources
We securely connect to your ad and analytics platforms using OAuth. Your credentials are never stored.
Google Ads
Meta Ads
GA4
Search Console
{
"period": { "start": "2025-11-01", ... },
"overall": { "spend": 12450, "roas": 4.2 },
"channels": [
{
"channel": "google_ads",
"kpis": [{ "key": "spend", "val": 8200 }]
}
]
}2. Aggregation Layer
Instead of sending thousands of raw data rows to AI, we aggregate metrics in-house:
- Sum totals: Total spend, conversions, revenue
- Calculate changes: Compare vs previous period
3. AI Narrative Engine
The aggregated data is sent to our AI with a structured prompt. The AI returns a JSON object with narrative sections.
This structured approach minimizes token usage while ensuring consistent, high-quality output.
{
"intro": "Strong performance this month...",
"kpiSummary": ["Spend increased 8.2%"],
"channels": [
{
"name": "Google Ads",
"summary": "Conversion rate improved...",
"wins": ["Campaign X delivered 45%"]
}
],
"actions": ["Increase bids on top keywords"]
}4. Report Template & UI
The AI-generated narrative is merged with your custom template. You can:
- Review and edit the narrative
- Add internal comments
- Export as PDF or send via email
Why token efficiency matters
Send 10,000+ rows of raw data to AI
AI has to calculate totals and changes
Conversational output with filler text
High token costs per report
Result: $5-10 per report in AI costs
MM Lab approach
Send compact aggregated JSON (~500 tokens)
Math done in code, not in AI
Structured JSON output only
Minimal token usage per report
Result: $0.10-0.50 per report in AI costs
Multi-language support
Generate reports in your client's preferred language:
We instruct the AI to write directly in the target language, ensuring natural phrasing and cultural context.
See it in action
Try our internal demo and experience the power of automated reporting
Start free demo