Understanding ChatGPT
ChatGPT, an OpenAI development, is a specialized version of the GPT model designed to simulate human-like conversations. It excels in creating human-like text in dialogues, handling a variety of topics. It’s available for free at chat.openai.com, with a premium ChatGPT Plus option (also known as GPT-4), and can draft essays, generate art prompts, and program code. The premium version offers enhanced features such as visual and audio input and output handling, file uploads, code execution, data visualization with select Python libraries, and customizable GPT capabilities.
You can access ChatGPT simply by visiting chat.openai.com and creating an OpenAI account. It is also available as an app for both Android and iOS. More details can be found on the official website (https://openai.com/).
Figure 3.1: Offerings of OpenAI
How does ChatGPT work?
ChatGPT, paralleling Copilot’s code-oriented approach but in natural language processing, is adept at content generation, challenging traditional search engines. It excels in tasks such as essay writing and summarizing texts. The quality of ChatGPT’s responses heavily depends on the prompts it receives.
ChatGPT leverages extensive training data including books, websites, and a variety of textual sources for comprehensive language understanding.
It employs sophisticated machine learning algorithms, such as deep learning neural networks based on the Transformer architecture, to predict accurate and contextually relevant text responses.
ChatGPT’s contextual understanding is honed through advanced techniques, enabling it to interpret and respond to varying conversation threads intelligently. This approach mirrors the principles used in Copilot for code, adapted here for nuanced, human-like text interaction.
ChatGPT capabilities and limits
Capabilities of ChatGPT:
- Content creation: Generates creative content including marketing material, blog posts, stories, and poems
- Educational explanations: Offers detailed explanations on complex topics for educational purposes
- Coding assistance: Assists developers with code optimization, error debugging, and algorithm design
- Learning aid: Acts as a companion in online learning, offering real-time assistance and clarification of concepts
- Conversational AI: Enhances user experience in virtual assistants and chatbots through natural language interactions
Limitations and concerns of ChatGPT:
- Accuracy issues: ChatGPT may generate responses with factual inaccuracies or biases from training data, also known as hallucinations. These outputs often emerge from the AI model’s inherent biases, lack of real-world understanding, or training data limitations. In other words, the AI system “hallucinates” information that it has not been explicitly trained on, leading to unreliable or misleading responses. Hence, users should always verify and validate the responses and should not use them blindly.
- Ethical implications: Raises concerns about the misuse of AI-generated content for fraudulent activities or harmful information gathering.
- Employment impact: Fear of AI replacing human jobs in certain sectors.
- Security risks: Potential use in phishing, creating malware, and cybercriminal activities.
- Data privacy: Concerns about the use of vast internet data in training, impacting user privacy.
- Message cap: At the time of writing the book, GPT-4 was capped to offer a maximum of 40 responses over 3 hours.
- Limited Python libraries for code execution: The Code Interpreter and Advanced Data Analysis features of ChatGPT use limited sets of libraries, heavily featuring machine learning libraries but not such great support for other libraries, such as Keras or TensorFlow, required for deep learning.
Setup and installation
Setting up and installing ChatGPT involves a few steps:
- Create an OpenAI account: Visit the OpenAI website and sign up for an account.
- API access: Developers need to obtain API access by applying on the OpenAI platform.
For non-developers, using ChatGPT is as simple as visiting the ChatGPT website or installing the Android or iOS app and logging in with your OpenAI account. No installation is required for general use. For more detailed steps and information, please refer to OpenAI’s official documentation and website.
Getting started with ChatGPT
Once you’ve logged in to your OpenAI account on the ChatGPT side of the website, it’s time to get to know the AI tool’s window. Here’s a breakdown of what you will see:
- New chat and hide sidebar buttons: On the left side of your screen, the New chat button can be used to start fresh conversations at any time. It creates a new discussion without context. There’s also an option to hide the sidebar.
- Chat history: The left sidebar keeps your previous conversations accessible. You can edit chat titles, share your chat history, or delete it. Optionally, you can turn off chat history.
- Account: Click your name at the bottom left to access your account information. This includes settings, log out, help, and FAQs. If you don’t have ChatGPT Plus, you’ll see an Upgrade button here.
- Your prompts: Your questions or prompts appear in the middle of the chat window, accompanied by your account photo or initials.
- ChatGPT’s responses: ChatGPT’s responses display the logo on the left. On the right, you’ll see options such as Copy, Thumbs Up, and Thumbs Down. Copy text to your clipboard for use elsewhere and provide feedback on response accuracy.
- Regenerate response: Click Regenerate response if you encounter issues or unsatisfactory answers. It prompts ChatGPT to generate a new reply based on your latest prompt.
- Text area: This is where you enter your prompts and questions.
- ChatGPT version: Below the text input area, you’ll find fine print, including a disclaimer: “ChatGPT can make mistakes. Consider checking important information.” Note that the display of the ChatGPT model version has been discontinued.
The following screenshot illustrates how this looks.
In the top-left corner, you can see the GPTs you have access to if you have the premium version.
At the bottom are your previous conversations.
If you have the premium version, you can choose GPT-4 from the dropdown along with plugins.
Figure 3.2: Selecting different versions of ChatGPT
You can even set custom instructions at the profile level if you wish to apply your configuration to all new conversations.
Figure 3.3: ChatGPT custom instructions
Prompting
Let’s draft our first prompt with ChatGPT.
You just have to ask questions in your natural language and converse with it like you would with a human and it will start sharing its knowledge with you.
[Prompt]
Can you please explain the process of machine learning in bullet points to me?
[End of prompt]
You should see a response similar to the following screenshot. Note that the responses are never identical, and you will not get the exact same text each time.
Figure 3.4: ChatGPT prompt screen