What Is ChatGPT?

ChatGPT is an AI chatbot developed by OpenAI. It is built on top of OpenAI’s GPT-3.5 and GPT-4 foundational GPT large language models (LLMs).

AI chatbots like ChatGPT are tools that can help people in their work. It is important to learn how to use them effectively and safely to avoid risks such as leaking confidential information through them. When used safely, AI chatbots can assist engineers and scientists with coding, documentation, and other writing tasks.

How Educators Can Use ChatGPT and MATLAB

ChatGPT and generative AI have the potential to transform student learning experiences.

ChatGPT can be an effective tool for implementing the flipped classroom strategy, in which lectures are done offline to enable interactive, hands-on learning in the classroom. Traditionally, the flipped classroom approach involves creating MATLAB® tutorials to help students learn the basics of MATLAB before class sessions. For example, Carnegie Mellon University professors used online MATLAB tutorials to teach computational methods for biomedical engineering.

Instructors can use ChatGPT to assign topics for students to complete on their own to prepare for labs and hands-on learning in class. Using ChatGPT requires less effort than developing tutorial materials.

ChatGPT also brings some disruption, however. To ensure that students achieve learning outcomes, some professors have stopped giving take-home exams, fearing that the ChatGPT crutch eliminates the value of the exam as an assessment tool.

Nevertheless, educators can focus on providing students the new skills they need to use ChatGPT effectively, both for their academic work and in preparation for their postgraduate careers. This includes developing skills such as:

  • Prompt Engineering

    Developing and optimizing prompts to efficiently use ChatGPT and other LLMs helps to get the most useful and relevant responses. Prompt engineering can help students develop critical thinking skills, learn to articulate their thoughts clearly and concisely and improve their writing skills.

  • Research and Information Literacy

    Students can use ChatGPT to seek information and gain insights on various topics. They can learn to evaluate and verify the information provided by ChatGPT, enhancing their research and information literacy skills. This includes discerning reliable sources, fact-checking, and critically assessing the credibility of the information obtained.

How Engineers Can Use ChatGPT and MATLAB

ChatGPT can help with engineering applications, such as writing MATLAB code, including text for comments and tests to validate code.

Engineers can also use ChatGPT to guide requirements for design and engineering as well as summarize knowledge from internal documents:

  • Writing aid
  • Summarizing documents

A potential future use of ChatGPT is to augment human interactions as part of engineered systems such as integrating ChatGPT in the voice control of vehicles. An example is how Mercedes-Benz took in-car voice control to a new level with ChatGPT. These applications will require the systematic use of modeling, simulation, and integration of LLM technology into the proven Model-Based Systems Engineering methodology to manage the overall system complexity.

ChatGPT Cautions and Recommendations

There are still many limitations and cautions related to using ChatGPT. The GPT model it’s built on is trained on large amounts of data without regard to ground truth, so it can sometimes produce biased or unreliable results. Potential issues with LLMs like ChatGPT include:

  • Bias: LLMs may learn biases and stereotypes from the data sets they are trained on.
  • Limited understanding: LLMs are based on statistical patterns in data, and they may not understand the concepts or contexts they are predicting in the same way humans do.
  • Lack of common sense: LLMs lack the “common sense” and critical thinking abilities of humans, so they may not always be able to comprehend the nuances of text and language in the same way that we do.
  • Hallucinations: LLMs can generate text that is not grounded in reality or makes little sense in context. This can happen when a model generates text based on statistical patterns found in its training data, rather than on a real understanding of the content.

ChatGPT Recommendations

  • Review the generated text before using it publicly or sharing it with others.
  • Ensure compliance for the use of ChatGPT with relevant laws such as data protection laws or intellectual property rights.
  • Educate yourself and others on the safe and ethical use of AI language models, and stay up-to-date on industry standards and best practices.

Background on Large Language Models (Written with ChatGPT)

Large language models (LLMs) are machine learning models that are powerful natural language processing systems. They are designed to create human-like text responses based on a given input or prompt. LLMs are trained on vast amounts of data to recognize patterns and relationships in language, allowing them to generate coherent and meaningful output. These models can perform various tasks such as language translation, question-answering, chatbot conversations, and text summarization.

Examples of well-known large language models include transformers such as GPT (Generative Pretrained Transformer) and BERT (Bidirectional Encoder Representations from Transformers).

  • Transformers are a type of deep learning model architecture that has revolutionized various natural language processing (NLP) tasks. The transformer architecture is based on a self-attention mechanism that allows the model to weigh the importance of different words or tokens in a sequence while processing them. Transformers have achieved state-of-the-art performance in various NLP tasks, including machine translation, text summarization, sentiment analysis, question-answering, and language generation.
  • BERT (Bidirectional Encoder Representations from Transformers) are transformer-based models that are pretrained on a large corpus of unlabeled text and then fine-tuned for specific downstream tasks such as text classification, named entity recognition, and question-answering. The bidirectional nature of BERT allows it to capture contextual information effectively, leading to improved performance on a wide range of tasks. There are several implementations of BERT models in MATLAB; see this GitHub® repository: Transformer Models for MATLAB. You can use BERT, FinBERT, and GPT-2 to perform transfer learning with text data for tasks such as sentiment analysis, classification, and summarization.

The diagram below shows the relationship of LLMs, transformers, and ChatGPT.

Examples and How To

See also: MATLAB for deep learning, Text Analytics Toolbox, artificial intelligence, ground truth