liveBook · Manning

ChatGPT

As explained in Data Analysis with LLMs

ChatGPT is a conversational artificial-intelligence service that lets users interact with OpenAI language models through natural-language messages.

ChatGPT is a conversational service for interacting with OpenAI language models. Enter a request in everyday language, read the reply, and ask follow-up questions when you need a correction or a different result. It can help with data analysis, but its answers can be wrong. section 2.2 section 2.5

To get started, create or use an OpenAI account and sign in through the ChatGPT web interface. A free account is sufficient for the examples here. Type into the input field to begin; use New Chat when you want to leave earlier dialogue behind. Available models and request limits may depend on your subscription. section 2.1 section 2.2

For data analysis, choose how ChatGPT will contribute:

  • Process text directly: provide the text and a clear task. For product reviews, ask it to classify satisfaction, extract particular details, or write a summary to your specifications. section 2.3 section 2.5
  • Use a data-processing tool for larger or structured data: describe the data, task, and desired output so ChatGPT can generate code for the tool to run. This avoids asking the language model to process a large dataset directly. section 2.4 section 2.5

Count reviews by category

Upload a CSV table of reviews with columns for review ID, satisfaction, and product category. Ask, “How many reviews do we have for each product category?” ChatGPT can return a table of counts. In this workflow, it generates and executes Python code to analyze the uploaded data; inspect that code with Show Analysis rather than trusting the answer blindly. section 2.4 section 2.4.1

Figure 2.5 Answer generated by ChatGPT for a question about the input table. Click the Show Analysis button to see how ChatGPT determined the answer.
figure

The example answer shows the category counts and where to open Show Analysis to inspect how they were calculated. section 2.4.1

How Data Analysis with LLMs covers it

How deep it goes
Walks through account access, conversation controls, text tasks, and a CSV upload; stops short of language-model internals.
Examples
Uses product reviews for text analysis and a review table for counting records by product category.
What it assumes
Starts with account creation for newcomers and introduces text analysis through a product-review example.
What you can do after
Apply it via the ChatGPT web interface to ask analysis questions, upload a CSV, and inspect generated code before relying on results.
How it connects
Connects natural-language prompts to text classification, information extraction, summarization, CSV data, and Python code generation.

Also explained in

Compare how 20 books explain ChatGPT →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Analysis with LLMs. The section links point to the parts of the book it draws on.