Salesforce’s new marketing message is AI + Data + CRM. It all adds up to customer magic. At the heart of this magic is Generative AI or GPT, not ChatGPT. By the way, it’s important to note that GPT is not short for ChatGPT. GPT stands for Generative Pre-Trained Transformer, which is a technology that utilizes a Large Language Model (LLM) to generate natural language conversations. Join us to Understanding the magic of GPT.
ChatGPT is just one of the interfaces that allows interaction with OpenAI’s GPT/LLM. If you’d like a more in-depth explanation, you can find it in this article.
If you’re a Salesforce customer, like one of the many F1 fans out there, you might be amazed by the magic happening behind the scenes. However, if you work as a Salesforce professional and are involved in building, maintaining, and managing it, it’s important to understand how things work and their limitations, especially when it comes to using GPT effectively.
But before we dive into that, here’s a fantastic video of the famous magician Penn, impressing Rebel Wilson with a rope trick. The interesting part is that Penn actually explains how he does it to the audience. So, we need to be more like the audience, not Rebel Wilson.
Now, let’s talk about how GPT and Large Language Models (LLMs) work in simpler terms.
TL;DR (Too Long; Didn’t Read):
GPT has the ability to predict the next word in a sentence based on probabilities. It can also be as creative as you want it to be. However, this requires a huge amount of trained data, learning algorithms, and powerful computers.
Cliff Notes: The process of predicting each word is actually quite straightforward. Here’s a helpful graphic that shows how it happens. If you’re interested in all the nitty-gritty details, there’s an article in The Economist from April 22, 2023, called “The generation game,” where you can find this graphic.
An even longer read is the OpenAI White Paper from 2020 called “Language Models Few Shot-Learners”
Chat GPT: A Limited Interface into GPT
ChatGPT is an amazing application, but it’s important to understand that it’s just one of many conversational interfaces built on top of OpenAI’s GPT technology. The free version is called GPT3.5, and there’s a paid version, GPT-4, available to a limited number of users. GPT refers to the engine that enables conversational interactions by utilizing a Large Language Model (LLM). The LLM is a dataset that has been trained to enable GPT to deliver natural language responses. So, when people talk about GPT, they are referring to both the engine and its related LLM.
GPT’s Age and Advancements
The first version of GPT is over 5 years old. GPT-3 was trained on a vast dataset of 570 GB of internet snapshots from 2016 to 2021. The estimated cost of training GPT-3 was $4.6 million, and it consumed 1.3 gigawatt-hours of electricity, which could power 121 American homes for a year. The estimated cost for training GPT-4 was $100 million, showcasing a significant leap in its capabilities. GPT, along with its use cases and supporting technologies, is constantly evolving with frequent advancements.
Limitations of ChatGPT
ChatGPT’s factual knowledge is limited to the training of the LLM, which covers the period from 2016 to September 2021. Therefore, it lacks knowledge of recent developments like EinsteinGPT, the end-of-life for Process Builder Workflow, or Lizzo’s song “About Damn Time.” Another limitation is that the conversation stream between the prompt and the results has a maximum limit of 4,000 tokens, roughly equivalent to 16,000 characters or 150-250 sentences.
Learn how to Integrate ChatGPT with Salesforce.
Building a ChatGPT Clone
Building your own ChatGPT clone using APIs is relatively straightforward. This allows you to customize the interface, structure user prompts, and perform useful actions with the generated results, such as copying to the clipboard or storing in a database. For instance, it took me less than 30 minutes to connect OpenAI to an app I built for managing our cover band. The app helps us order songs in a setlist based on the audience and suggests what to say between songs. However, it has limitations when it comes to handling Lizzo’s song “About Damn Time!” I’ve noticed many similar apps being launched at this level of capability.
Future iterations of ChatGPT are expected to address these limitations. However, for truly innovative work involving large volumes of data, such as suggesting Salesforce implementation changes based on requirements, org configuration, and the Well-Architected Framework, alternative approaches are required.
Architecting an Advanced GPT App
Generative AI, often referred to as GPT, has the potential to analyze massive amounts of contextual data without relying solely on the facts taught to OpenAI’s LLM. However, it’s necessary to overcome the token limitations.
Learn about Salesforce and ChatGPT Potential features.
GPT Technologies: A Simplified Explanation
There are technologies that allow the application of GPT (Generative Pre-trained Transformer) to large datasets. These technologies include semantic databases like PineCone and agent frameworks like AutoGPT.
Semantic databases serve as a way to upload and store large text datasets as numerical representations. GPT can then make queries to retrieve a small, relevant set of data needed to solve a given problem.
Agents can be developed for specific use cases, such as a “User Story Agent” or a “Solution Agent.” These agents are provided with information about the resources they can access, such as app queries through APIs, semantic databases, and language models (LLMs). The agent follows these steps, with the assistance of GPT:
- Understanding the prompt: The agent asks GPT which resources it needs to utilize to solve the problem at hand.
- Task list creation: The agent requests GPT to generate a list of actions needed to solve the problem.
- Query generation: For each task, the agent asks GPT to provide the necessary queries for accessing the required resources.
- Task execution: The agent carries out the tasks and obtains results by utilizing GPT.
- Result evaluation: The agent employs GPT to assess whether the obtained results effectively solve the problem. If not, it goes back to GPT to explore alternative approaches.
- Result structuring: The agent gathers the results and asks GPT to format them appropriately.
To make this system work effectively, it is necessary to maintain and fine-tune the semantic databases according to the type of problems being addressed. For instance, if the system is used to query organizational configurations, the semantic databases should be updated whenever changes are made to the organization’s metadata or documentation. Additionally, careful consideration should be given to determining what organizational configuration information should be stored. Too little information would render the results meaningless, while an incorrect structure of the database could overwhelm GPT with an excessive volume of data.
To facilitate the process, the agent should be encapsulated within an application that provides a user interface (UI) for capturing the prompt and potentially retrieving contextual information through querying other data sources. For example, if the task involves writing a user story and the application is launched from an activity box on a UPN (Universal Process Notation) process map, the application already possesses contextual information such as process activity descriptions, resources, inputs and outputs, as well as attached notes.
Finally, the application should display the resulting output and perform appropriate actions with it. In the case of the user story example, the application would generate a user story with acceptance criteria for each resource associated with the activities within the specified scope. These user stories would be stored and linked to the relevant activity boxes.
Expanding on this example, the application could further utilize the semantic database containing the organizational configuration and the semantic database associated with the Salesforce Well-Architected Framework. Based on this information, the application could suggest the most suitable approach for implementing the desired changes.