Inspect Every Decision the AI Makes
ContentAtlas stores the complete reasoning chain behind every AI response — system prompts, LLM reasoning steps, the generated SQL query, and the retrieved data. Every number in an answer links back to the exact row that produced it.
No Hallucinations
Every figure in an AI response is tagged back to its SQL result row. If it can't be traced, it can't be said.
Full Audit Log
System prompts, user messages, LLM responses, and SQL queries are stored for 90 days and exportable as JSON, CSV, or PDF.
Independent Verification
Copy the generated SQL and run it yourself. The results must match. ContentAtlas never hides the query behind the answer.
Every Answer. Fully Traceable.
See exactly how ContentAtlas reasoned through a real executive question — from natural language to SQL-verified data, with every figure tagged to its source.
"What's our most profitable product per category last quarter?"
You are ContentAtlas AI, a business analytics assistant.
Database access (read-only):
orders (id, customer_id, status, completed_at, total_amount)
order_items (id, order_id, product_id, quantity, unit_price)
products (id, name, category_id, cost_price, sku)
categories (id, name, slug)
Rules:
- All monetary values are in USD
- "Last quarter" = most recently completed fiscal quarter
- Only count completed orders (status = 'completed')
- NEVER estimate or invent numbers — every value must originate from SQL
- Tag all numeric values in your response with [TAG:source_key]
matching the SQL result column and row identifier
Request analysis: Profitability by product category, last quarter.
Interpretation:
- "Last quarter" → Q4 2024 (Oct 1 – Dec 31, 2024)
- "Most profitable" → profit = SUM((unit_price − cost_price) × quantity)
- "Per category" → one winner per category, not overall top products
Query plan:
1. JOIN order_items → products → categories → orders
2. Filter: status = 'completed', completed_at in Q4 2024
3. Aggregate profit + revenue per (category, product) pair
4. RANK() OVER (PARTITION BY category ORDER BY profit DESC)
5. Return only rank = 1 rows — top product per category
6. Tag each numeric value in the response for full traceability
WITH ranked AS (
SELECT
c.name AS category,
p.name AS product,
SUM((oi.unit_price - p.cost_price) * oi.quantity) AS profit,
SUM(oi.unit_price * oi.quantity) AS revenue,
ROUND(
SUM((oi.unit_price - p.cost_price) * oi.quantity) /
SUM(oi.unit_price * oi.quantity) * 100, 1
) AS margin_pct,
RANK() OVER (
PARTITION BY c.id
ORDER BY SUM((oi.unit_price - p.cost_price) * oi.quantity) DESC
) AS rnk
FROM order_items oi
JOIN products p ON p.id = oi.product_id
JOIN categories c ON c.id = p.category_id
JOIN orders o ON o.id = oi.order_id
WHERE o.status = 'completed'
AND o.completed_at BETWEEN '2024-10-01' AND '2024-12-31'
GROUP BY c.id, c.name, p.id, p.name
)
SELECT category, product, profit, revenue, margin_pct
FROM ranked
WHERE rnk = 1
ORDER BY profit DESC;
| Category | Product | Profit | Revenue | Margin |
|---|---|---|---|---|
| Electronics | UltraScan Pro X | $124,380 | $298,450 | 41.7% |
| Software | DataBridge Enterprise | $89,720 | $102,400 | 87.6% |
| Prof. Services | AI Migration Suite | $67,250 | $89,000 | 75.6% |
| Hardware | SecureVault 2000 | $43,890 | $78,300 | 56.1% |
Most profitable products per category for Q4 2024 (Oct – Dec 2024):
All figures sourced from SQL query results. No values were estimated or generated without a corresponding data row.
See the Audit Trail in Your Environment
Book a 20-minute session to walk through a live audit of your own business data with ContentAtlas.