Skip to Main Content
Libraries
askus Ask us
 

Prompt Design For Beginners

Make the robot work for you.

Key Points Of The Module: Under The Hood

  • This module provides a brief overview of the process involved when ChatGPT-3.5 responds to a user's initial question or prompt. 

  • It also provides definitions for terminology that will be used throughout the workshop. 

Under The Hood: How Does ChatGPT Work?

Diagram providing an overview of how ChatGPT works.

Image Caption: A diagram that provides a simplified overview of how an interaction with ChatGPT-3.5 works.

ChatGPT, classified as a generative AI (or artificial intelligence) model within the realm of supervised machine learning, creates new content by discerning patterns in the information it has encountered before (Chapman, 2023). This includes predicting the next word in a sequence given the context of preceding words during its training. While ChatGPT excels in generating contextually relevant text, other models within this category have extended their generative capabilities to produce diverse content formats including audio, images, and videos.

Basic Explanation of How An Interaction With ChatGPT-3.5 Works

Here is a brief explanation of the process involved when ChatGPT-3.5 responds to a user's initial question or prompt. Please also refer to the above diagram. You will see the terminology used in this section throughout the workshop.

  1. The user initiates the process by submitting an initial question or instruction, referred to as a prompt.
    A prompt is the input you provide to ChatGPT, whether it's a question or a command. It instructs the model on what action to take or what information to provide during your conversation.
     
  2. The prompt is transmitted to a Large Language Model (LLM), a sophisticated AI system designed to process text input and understand user questions by analyzing structure, semantics, and intent. The LLM leverages its extensive language understanding capabilities to comprehend the nuances of human communication.
     
  3. Next is the contextual analysis step. ChatGPT analyzes the prompt specifically to identify keywords and phrases. This analysis delves into the broader context of the question and the user's intent, enabling ChatGPT to pinpoint key elements within the prompt and provide a more precise and context-aware response.
     
  4. Subsequently, ChatGPT proceeds to search its extensive training database - a curated compilation of diverse sources such as websites, books, and articles. The model retrieves relevant information related to the prompt from its vast knowledge database, enriching responses by integrating insights from various sources and improving the quality and depth of the generated content.
  • It's important to note that ChatGPT-3.5 does not have real-time internet access but relies on the knowledge it gained during training; the last update was January 2022.
  1. ChatGPT utilizes natural language processing (NLP) techniques, a branch of artificial intelligence that enables computers to understand, interpret, and generate human language, to craft a response. It leverages its understanding of the user's intent, retrieved knowledge from its extensive training database, and its language generation capabilities to deliver responses tailored to the user's needs and context.
     
  2. The response or output is presented to the user.
  • If the user is satisfied with the response then she can choose to end the session.
     
  • Alternatively, the user can continue the conversation with the model. It is often an iterative process where the user provides additional prompts to refine the model's response. 

References

Ball, J. (2023, February ). How does ChatGPT work? [Diagram]. Compose & Consult. https://composeandconsult.com/the-edit-effect/ai-platforms-hallucination-effect-content-generation

Brown, T., Mann, B., Ryder, N. ... Amodei, D. (2020). Language models are few-shot learners. arXiv. https://doi.org/10.48550/arXiv.2005.14165
(See "Table 2.2: Datasets used to train GPT-3" on p. 9.)

Chapman, J. (2023). What is ChatGPT? [MOOC lecture]. In J. Chapman, & A. Peterson, Introduction to ChatGPT. Datacamp. https://app.datacamp.com/learn/courses/introduction-to-chatgp

Gewirtz, D. (2023, September 20). How does ChatGPT actually work? ZDNET. https://www.zdnet.com/article/how-does-chatgpt-work/

Li, J. (2023, July 14). ChatGPT in a nutshell. Medium. https://medium.com/@lij061703/chatgpt-in-a-nutshell-37ea5ddbc362

ACTIVITY: Your Turn!

Creative Commons License
This work by The University of Victoria Libraries is licensed under a Creative Commons Attribution 4.0 International License unless otherwise indicated when material has been used from other sources.