From BI to AI
Data-Driven Decision Making with Agentic AI
Preface
Traditional business intelligence — dashboards, static reports, and fixed queries — is being replaced by AI that understands your questions, queries your data, and delivers answers in seconds. This book gives professionals from any background a hands-on understanding of how agentic AI transforms analysis, reporting, and decision-making. No coding experience is required.
Chapter 1 introduces the tools. You will install a coding agent, learn how the three major options differ, and understand the environments where AI can execute code.
Chapter 2 explains how to query data and generate visualizations and reports with plain English. You will open a coding agent in a folder containing a spreadsheet and go from raw data to a written recommendation with charts in under ten minutes.
Chapter 3 shows how AI can help you think through decisions. You will use AI as a sparring partner — challenging assumptions, running pre-mortems, and stress-testing your own analysis from Chapter 2.
Chapter 4 shows how AI can be connected to your company’s databases, so anyone on the corporate intranet with proper credentials can query them in plain English. You will learn about MCP connectors, build a reusable “skill” that encodes a database schema, and watch AI interact with the database to extract data for you.
Chapter 5 shows how to use AI to automate activities. We consider the example of generating regular reports from company data. You will learn about agents — AI systems that chain steps autonomously — and use your coding agent to build a reporting pipeline that queries a database, generates charts, writes summaries, and assembles a PowerPoint deck.
Chapter 6 shows how to use AI to query your company’s documents and return answers grounded in your documents (and document its sources) rather than relying on its general knowledge. This is called Retrieval-Augmented Generation (RAG).
Chapter 7 addresses reliability and compliance issues. You will validate AI outputs, red-team skills and RAG systems, and build the governance framework your organization needs before deploying any of this.
Data files
The exercises in this book use two datasets.
The Superstore CSV contains roughly 10,000 retail orders across four U.S. regions with columns for sales, profit, discount, product category, and customer segment.1 It is used throughout Chapters 2, 3, and 7.
The Employee Attrition CSV contains 1,470 employee records with 35 attributes including department, job role, monthly income, overtime status, job satisfaction, and whether the employee left the company.2 It is used in Chapter 2 exercises.
The Chinook database is a SQLite file representing a music retailer’s operations with 11 related tables covering employees, customers, invoices, tracks, albums, artists, and genres.3 It is the primary dataset for Chapter 4 and is revisited in Chapters 5 and 7.
Chapter 6 uses a sample company handbook for RAG exercises.
Prerequisites
You need one of the three major coding agents installed on your machine. Chapter 1 walks through the installation of Claude Code, Gemini CLI, and OpenAI Codex. All three run in the terminal, read local files, and execute code. No prior coding or data science experience is assumed.
The examples in this book use Claude Code, but the concepts and workflows apply equally to Gemini CLI and OpenAI Codex. Where we say “Claude” or “ask Claude,” you can substitute whichever agent you installed.
The Sample Superstore dataset is published on Kaggle at https://www.kaggle.com/datasets/vivek468/superstore-dataset-final. It is widely used in data-visualization tutorials and Tableau exercises.↩︎
The IBM HR Analytics Employee Attrition & Performance dataset is a fictional dataset created by IBM data scientists, published on Kaggle at https://www.kaggle.com/datasets/pavansubhasht/ibm-hr-analytics-attrition-dataset.↩︎
The Chinook database was created by Luis Rocha as a modern alternative to the Northwind sample database. The source repository is at https://github.com/lerocha/chinook-database.↩︎