How well do you code and analyze data with ChatGPT?
Six scenarios on writing code, handling data and fixing bugs. Answers show after each pick, and you won't need to create an account.
-
Q1 In a normal ChatGPT chat, it wrote your code and tests and says "all tests pass." What do you do?Why
OpenAI says a ChatGPT project has no direct access to a folder on your computer. Name the edge cases yourself as well, or the tests can only confirm what the code already does.
How Do You Get ChatGPT to Write Tests With Its Code? -
Q2 You need one function that fits into your existing code. What should you give ChatGPT?Why
OpenAI's guide says a handful of input and output examples can steer a model, and to show a diverse range. Your examples then double as tests you can check in seconds.
How Do You Get ChatGPT to Write the Function You Actually Want? -
Q3 You've started using Codex on a repo. Where do your build commands and conventions belong?Why
Codex reads
How Do You Get ChatGPT to Write Code That Fits Your Project?AGENTS.mdfiles before starting work, and files closer to where you're working take precedence. Keep it short and current, since OpenAI lists reducing its size among its tips for making limits last. -
Q4 Your sheet has blank cells in the "amount" column. What should you tell ChatGPT before any analysis?Why
ChatGPT can calculate exactly and still answer the wrong question. A blank could be zero, unknown or not applicable, and each changes the averages differently.
Why Should You Explain Your Columns to ChatGPT First? -
Q5 ChatGPT gives you a clean chart of revenue by region. How do you check that it's right?Why
The danger is in choices such as which rows were dropped, and those show up in the code rather than the chart. A wrong filter gives a correct sum of the wrong rows, and a follow-up may create a replacement chart.
How Do You Check ChatGPT's Data Analysis Is Right? -
Q6 ChatGPT has suggested two fixes, and neither worked. What should you do next?Why
A failing thread keeps feeding its own wrong theories back in, and a new chat doesn't reset your files. Your handoff keeps the facts, including what's already been ruled out.
What Do You Do When ChatGPT Keeps Giving the Same Wrong Fix?