"What is the best way to reply to this stakeholder email?"
"Should these KPIs be on the same dashboard?"
"Am I writing this query most efficiently?"
Every data professional faces these questions. While traditional peer reviews are valuable, they're not always feasible – especially for solo analysts or small teams. But what if you could have an always-available analytics coach, ready to review your work at any time?
In my previous article, I explored how AI can accelerate analytics prototyping. Now, let's flip the perspective: instead of using AI to create, let's leverage it as a critical thinking partner to review and improve our existing work. The best part? It's straightforward. You don't need perfect prompts – typically just a few lines explaining your goal, some basic instructions, and your input are enough to get valuable feedback. Let me show you how.
Understanding AI's Role: The Jagged Frontier
Before diving into specific applications, it's important to understand AI's capabilities in analytics and in general. As Ethan Mollick notes, AI's effectiveness follows a "Jagged Frontier" - an uneven line between success and failure. While AI might excel at reviewing SQL queries, it will struggle with generating SQL based on text input.
The key is experimentation. Start with straightforward tasks like code review or design feedback, then gradually explore more complex scenarios. This approach helps you discover where AI can be a reliable partner versus where human expertise remains essential.
Best Practices for AI-Assisted Reviews
Provide Context: Don't just share the work—explain your goals, constraints, and audience. The more context you provide, the more relevant the feedback. Especially for more sophisticated tasks it is crucial to be detailed in the context and what you tried so far. Also, tell the AI what you want it to do and what you expect. Don't just say "review this SQL query", tell it "I need you to review this SQL query that I am running on BigQuery, please put an emphasis on readability and performance".
Ask Specific Questions: Instead of "What do you think?", ask targeted questions like "How could I make this more actionable for marketing managers?" As is the case with context, AI cannot read your mind and while some vague questions might lead to good results, typically you will fare better and get more profound responses when you are specific. Think of AI as an intern, who is smart and eager to help, but does not know how your business works or what your concrete expectations are.
Iterate Through Feedback: Use AI feedback as a starting point for improvement, then show the revised version for another round of review. Tell the AI to challenge you and act as a certain person. For a SQL query this could be a senior analyst, for a geo experiment it could be a statistician. You can also ask for feedback from different angles by asking to review your work from the position of a statistician, market researcher and brand manager.
Maintain Critical Thinking: Remember that AI is a thought partner, not an infallible authority. Always evaluate suggestions against your domain knowledge and requirements. When you see that an AI starts to hallucinate, it might be a good idea to try to start over the conversation in a new chat or to take a step back in what you are trying to get out of it.
Three Ways to Use AI as Your Analytics Coach
1. Dashboard Design Reviews
Upload a screenshot of your dashboard, and ask the AI to critique its design, information hierarchy, and effectiveness. For example, when I recently showed ChatGPT a marketing performance dashboard, it pointed out:
Problems in the color palette: "The overall color palette is very neutral, which reduces clarity and makes it harder to differentiate between metrics and categories. Use contrasting colors for key metrics and category headers and consider using softer grid lines or removing them entirely for a cleaner design."
Design issues: "The filter section takes up significant space, leaving less room for the data tables. Consolidate filters into a collapsible pane or sidebar to save space and ensure filter names are user-friendly."
Confusing KPIs: "Some metrics are not self-explanatory. Add a legend, glossary, or hover-over explanations for ambiguous terms."
The prompt defines the role the AI should take, its task and gives instructions what to focus on:
You are a senior data analyst with 10+ years of experience in marketing reporting with Power BI. I will send you screenshots of reports and want to get your honest assessment of the report. Focus on things like intuitiveness, completeness, clarity, overall look & feel. Also take into account if there are confusing elements, could the visual hierarchy be improved, what best practices are missing?
Simply drag&drop your screenshot in the chat and you get your evaluation.
2. SQL Query Optimization
Instead of just using AI to generate SQL, use it to review your existing queries. While AI is still not great at translating text to SQL, it is great in understanding queries you already have available and make suggestions on how to improve it or identify errors.
Finding Basic Issues
Getting good feedback from AI is easy. This is the prompt I used for reviewing queries:
You are a senior data analyst and a true expert in writing and improving SQL queries. Your job is to review queries I am going to send you and check for any mistakes, bad practices or typos in them and suggest improvements so that I can use the best query possible for my task.
Let’s start with a simple example:
select
user_id,
count(*) as num_orders,
sum(num_prodcuts) as sum_products,
sum(revenue) as sum_revenue
from orders
where sum(revenue) > 500
group by user_id;
You see any issues with that? While you probably spotted the aggregation function in the where clause, did you spot the typo? ChatGPT did:
SUM(revenue) in the WHERE clause: You cannot use aggregate functions like SUM() directly in the WHERE clause. Aggregates are calculated after the filtering stage. Instead, you should use the HAVING clause for conditions on aggregates.
num_prodcuts typo: The column num_prodcuts appears to be a typo. It should likely be num_products (assuming this is the intended column name).
Inefficient grouping: There is no technical issue with the GROUP BY, but you may want to ensure you’re grouping correctly based on your requirements.
Transforming Complex Queries
While catching typos is useful, AI really shines with complex queries: I asked it to review a highly complex query with nested subqueries that is a real challenge to read as a human:
SELECT CustomerName
FROM Customers
WHERE CustomerID IN (
SELECT CustomerID
FROM Orders
WHERE TotalAmount > (
SELECT AVG(TotalAmount)
FROM Orders o2
WHERE o2.CustomerID IN (
SELECT CustomerID
FROM Customers c2
WHERE c2.Region = (
SELECT Region
FROM Customers c3
WHERE c3.CustomerID = c2.CustomerID
)
AND EXISTS (
SELECT 1
FROM Orders o3
WHERE o3.CustomerID = c2.CustomerID
AND o3.TotalAmount = (
SELECT MAX(TotalAmount)
FROM Orders o4
WHERE o4.CustomerID = o3.CustomerID
)
)
)
)
AND OrderID IN (
SELECT OrderID
FROM OrderDetails
WHERE ProductID IN (
SELECT ProductID
FROM Products
WHERE Category = 'Electronics'
AND ProductName LIKE '%Pro%'
AND LENGTH(ProductName) > (
SELECT AVG(LENGTH(ProductName))
FROM Products p2
WHERE p2.Category = Products.Category
)
)
)
);
Good luck making sense of this! Gladly, ChatGPT took over the tedious task of identifying the myriad of problems with the original query and rewrote it in a concise and readable way:
-- CTE for average product name length in the 'Electronics' category
WITH AvgProductNameLength AS (
SELECT
Category,
AVG(LENGTH(ProductName)) AS AvgNameLength
FROM Products
WHERE Category = 'Electronics'
GROUP BY Category
),
-- CTE for high-value orders by customers in the same region
HighValueOrders AS (
SELECT
o.CustomerID,
o.TotalAmount,
MAX(o.TotalAmount) OVER (PARTITION BY o.CustomerID) AS MaxTotalAmount
FROM Orders o
WHERE o.TotalAmount > (SELECT AVG(TotalAmount) FROM Orders)
),
-- CTE for products meeting the criteria
FilteredProducts AS (
SELECT
ProductID
FROM Products p
WHERE p.Category = 'Electronics'
AND p.ProductName LIKE '%Pro%'
AND LENGTH(p.ProductName) > (
SELECT AvgNameLength
FROM AvgProductNameLength
)
)
-- Main query
SELECT DISTINCT
c.CustomerName
FROM Customers c
JOIN Orders o ON c.CustomerID = o.CustomerID
WHERE o.TotalAmount IN (
SELECT TotalAmount
FROM HighValueOrders
WHERE CustomerID = c.CustomerID
AND TotalAmount = MaxTotalAmount
)
AND o.OrderID IN (
SELECT OrderID
FROM OrderDetails od
WHERE od.ProductID IN (
SELECT ProductID
FROM FilteredProducts
)
);
Key Takeaways:
AI excels at identifying both syntax issues (typos) and structural problems (aggregation misuse)
For complex queries, AI can suggest modern SQL patterns like CTEs to improve readability
AI helps decompose nested subqueries into logical building blocks
Reviews can reveal performance optimization opportunities while maintaining query intent
3. Stakeholder Communication Review
One aspect of GenAI usage that curiously gets overlooked is communication review. While many use AI to draft emails, fewer leverage it to analyze and improve their stakeholder interactions.
Let me share a recent example: One of my team members was struggling with a challenging stakeholder situation. He asked ChatGPT to review their email exchange and suggest improvements. While the overall communication was professional, the AI identified key areas for improvement:
Not enough emphasis on alternative solutions
Technical explanations needed more context
Missed opportunities to align on project goals early
The prompt used was simple but effective:
You are an experienced data analyst with excellent communication skills. Your task is to help me with my stakeholder communication. I will send you an example and want to get your candid feedback.
Use this approach to:
Resolve sticky situations when dealing with stakeholders
Identify blind spots in your communication style
Get ideas for streamlining processes while keeping all parties engaged
Improve how you present technical concepts to non-technical audiences
Key Takeaways:
AI can spot communication patterns you might miss
Regular reviews help develop better stakeholder management skills
Getting an objective perspective helps prevent miscommunication
Use feedback to build templates for similar situations
Conclusion
Ready to leverage AI for better analytics? Start with these steps:
Pick a recent dashboard or query for review
Frame your request using the prompts provided
Implement AI's suggestions iteratively
Document which types of reviews yield the most value
Key to success: Treat AI as a thought partner, not a replacement for human expertise. Use it to catch issues early, validate approaches, and strengthen your analysis before stakeholder review.
What review tasks will you try first? Share your experiences and effective uses of AI in analytics QA in the comments below.
Cooler Artikel! Gute Impulse!