AI and Data: How to Use Artificial Intelligence Safely in Analysis

AI and Data: How to Use Artificial Intelligence Safely in Analysis

You may already be using AI for your schoolwork. It can also save you hours of work when dealing with data. It can explain a formula, clean up a messy spreadsheet, or design a graph. At the same time, it can be wrong with absolute certainty. This article provides a practical guide on how to use AI in data analysis so that it helps you rather than hinders you.

What AI Can Really Do with Data

Analysis of an uploaded file. You can upload an Excel, CSV, PDF, or JSON file to ChatGPT. The tool will turn it into an interactive spreadsheet, create a chart, and write a summary. Behind the scenes, it writes and runs Python code (using the pandas and Matplotlib libraries). According to Google’s help center, Gemini in Google Sheets can create spreadsheets, write formulas, analyze data, and generate charts, pivot tables, and conditional formatting. According to Anthropic, Claude can use uploaded data to prepare a cleaned-up spreadsheet, perform statistical analysis, create charts, and generate an Excel spreadsheet with functional formulas.

In practice, AI is particularly useful for:

  • Data cleaning. “Standardize the spelling of town names, remove empty rows, and split the date column into year and month.”
  • Formulas. “Write a formula in Google Sheets that calculates the average of Column C only for rows where Column A contains ‘Prešovský.’” And most importantly: “Explain it to me step by step.”
  • Chart Design. “I have eight regions and one value for each. What type of chart is appropriate, and why?” Then create the chart yourself, for example, following the instructions in “Your First Visualization in Datawrapper.”
  • Error hunting. “Look at these numbers and tell me what looks suspicious.”

Where AI Hallucinates

OpenAI describes hallucinations as situations where a model confidently generates an answer that isn’t true. According to its 2025 research, one reason for this is that when training and evaluating models, it’s more advantageous to make a guess than to admit “I don’t know.” The model struggles particularly with rare, specific facts that cannot be derived from patterns in the data.

When working with data, this means:

  • Made-up numbers and sources. If you ask an AI, “What was the unemployment rate in County X?” without providing any data, it might give you an exact number that doesn’t exist.
  • Fictitious references. In the well-known U.S. case of Mata v. Avianca, a court fined two attorneys and their law firm $5,000 in June 2023. They had filed a document full of nonexistent court decisions generated for them by ChatGPT.
  • Silent calculation errors. The model may misread a column, omit rows, or confuse a decimal comma with a period. The result looks convincing, but it’s wrong.

How to Verify Results

  1. Let the AI work with your data, not with its own memory. Upload a dataset from a verified source (such as the National Open Data Catalog) and ask questions about it, not about “general facts.”
  2. Look at the code. When analyzing, ChatGPT displays a “View Analysis” link where you can see what code it actually ran. The numbers come from that code, not from the text of the response.
  3. Check one number manually. Calculate the sum or average for one region yourself. If it matches, there’s a better chance the rest will be correct too.
  4. Verify every fact in the primary source. If the AI claims that something is reported by the Statistical Office, open the Statistical Office’s website. We explain how to do this quickly in the article “How to Verify Statistics in 3 Minutes.”
  5. Ask “why.” If the AI claims that two things are related, ask it to explain how it determined that. Remember that correlation does not imply causation.

A well-prepared table can also help. OpenAI recommends using clear column headings without abbreviations, one record per row, and avoiding multiple tables, empty rows, or images containing important data.

What Not to Upload to AI

This is the most important part. Never upload the following to a regular chat with AI:

  • surveys containing names, email addresses, or phone numbers,
  • information about health, ethnic origin, or other sensitive data about specific individuals,
  • internal documents from a school, government agency, or organization, unless you have permission to do so.

If you need to work with such data, anonymize it first (we describe how in the article Data Ethics). Or upload only a fictional sample with the same structure and have the AI write a procedure or formula that you can then apply to the actual data yourself.

Also check the settings. In ChatGPT, under Settings > Data Controls, you can turn off the “Improve the model for everyone” option. New conversations will then not be used to train the models. According to OpenAI, Temporary Chats are deleted from the system within 30 days and are not used for training. However, this does not mean that other people’s personal information is stored there.

The AI Act at a Glance

Starting in 2024, the EU will have its own law on artificial intelligence: Regulation (EU) 2024/1689, known as the AI Act. It classifies AI systems based on risk:

  • Unacceptable risk: prohibited practices, such as social scoring or the indiscriminate scraping of faces from the internet to create facial recognition databases.
  • High risk: for example, systems used for assessment in education, in hiring, or in credit scoring. They must meet strict requirements, including human oversight.
  • Transparency-related risk: for example, chatbots. People must know they are communicating with AI, and deepfakes must be labeled as such.
  • Minimal risk: most common applications, such as spam filters.

How the rules are being implemented:

  • August 1, 2024: The AI Act took effect,
  • February 2, 2025: Prohibitions and requirements regarding AI literacy took effect,
  • August 2, 2025: Rules for general-purpose AI models,
  • August 2, 2026: General applicability, including transparency rules,
  • December 2, 2027, and August 2, 2028: obligations for high-risk systems. These deadlines were pushed back by the simplification package (the so-called AI Omnibus), which took effect on July 27, 2026.

For you, this means one simple thing: you have the right to know when you’re interacting with AI or when content is generated by AI. And if you’re publishing AI-generated content, label it as such.

A Final Rule

AI is a good assistant but a poor author. Let it help you with formulas, data cleaning, and ideas. However, you are responsible for the numbers you publish. You can find additional materials on data literacy in the open library of the “Data for Change” project at dataswans.com/data-pre-zmenu.

Sources

The Data for Change project is funded by the European Union under the European Solidarity Corps program. The views and opinions expressed are those of the authors and do not necessarily reflect the views of the European Union or the National Agency (NIVAM). Neither the European Union nor the National Agency assumes responsibility for them.