Many potential roadblocks stand between the conception of a machine learning project and its...
A Beginner’s Guide to ChatGPT: How it Works and Practical Use Cases for Tech Professionals

What is ChatGPT?
ChatGPT is a type of Generative Artificial Intelligence technology. Generative AI is a neural network-based model that has been trained on a large dataset of text from websites like CommonCrawl, WebText, Wikipedia, and a bunch of books to perform natural language processing tasks, such as text generation and text classification. It can produce human-like text and respond to prompts with high accuracy, making it useful for various applications like chatbots and virtual assistants.

The math behind ChatGPT is what allows it to pick up on the complex patterns of the human language. For simplicity’s sake, I will not dive too deep into the math and will try to give a high-level explanation of what makes it so powerful. The “GPT” stands for Generative Pre-trained Transformer, which is a specific type of neural network that takes input information and passes it through a complex network of interconnected processing units to generate text responses. While it does not save humanity from Decepticons, it might very well save us from extra grunt work.”
A Transformer, unlike a traditional neural network, processes text input in parallel rather than sequentially. It transforms human words into numerical representations using a method called ‘Multi Headed self-attention. This method enables the model to read a sentence or prompt the same way we do, word by word in sequential order. However, it will refer to its pre-trained memory from all the data it took from the internet and realize that some words are closer in meaning than others. For instance, the model will notice that ‘Michael Bay’ has a much higher relation to ‘director’ than it does to the word ‘from’. This way, whenever the model stumbles upon the name ‘Michael Bay’ it already knows it is closely related to the word ‘director’ and will denote the strength of this relation with a number called the Weight (this is the self-attention part). Now, the multi-headed component of the model is repeating this process but for multiple words at the same time as it is reading the prompt. It is a way of continually updating the understanding of a prompt based on the new words it encounters.

OpenAI implemented supervised learning into ChatGPT, in which humans manually feed the model the correct answers allowing it to learn what correct answers look like for future predictions. They also incorporated reinforcement learning, a type of machine learning framework where the model learns to make decisions based on trial-and-error feedback, in order to improve its ability to generalize beyond what it has been specifically trained on. This way, ChatGPT can receive feedback and adapt its responses based on how well they are received, allowing it to improve its overall performance and generalize to new unknown prompts. This is all done in a 3-Step process:
- Train Supervised Model: Prompt/Question data is generated by test users and corresponding responses are written by humans. The prompt-response data will act as the ‘ideal’ input-output for the model in order to fine-tune it and generate better responses. Once this supervised training is finished we can call this the “Main model”.
- Train Reward Model: Multiple copies of the Main model will run on a single prompt and each will output different responses. A human labeler will manually go in and rank the responses based on their relevance, coherence, fluency, and overall quality. The reward model runs again with multiple copies of the Main model and will learn what are ‘good’ responses based on these rankings and ultimately output a score to reflect how good of an answer each of the outputs are. The score here is called the ‘Reward’.
- Optimize through Reinforcement Learning: Copies of the main model are again deployed and exposed to NEW prompts and questions. After multiple responses are generated, these responses are then fed to the trained reward model. The response with the highest reward is chosen as the final output and the parameters of the main model that led to the highest-scoring response are updated. This process is done multiple times, which fine-tunes the main model and improves its performance over time.

Best Ways to Use ChatGPT
There are many more applications for this generative AI technology, ranging from business products/services to everyday tasks. As ChatGPT becomes more mainstream, it’s important to be mindful of how to ask high-quality questions/prompts in order to receive high-quality responses. The more details (data) that go into the question, the better it is able to extrapolate meaning, therefore resulting in a better response.
Managers/Executives/Marketing
- Statement of Work (SOW) Drafts: When creating an SOW document, it is important to use industry-specific language. An example of a previous SOW document can be given to ChatGPT as a guide for format and style, but sensitive information should be removed or replaced. To fine-tune the response, prompt the AI to elaborate and re-word details in the document.
- Writing Emails: Have you ever asked your friend or spouse to listen to an email before you sent it? Finding the right words to convey a desired tone in an email can be challenging, but ChatGPT can also help. Get the attitude right by prompting it with phrases like “sound optimistic” or “show that I respect the recipient”.

- Company Newsletters: Brainstorming is an important part of any marketing strategy, but sometimes it’s easier to choose from pre-generated options. Have ChatGPT do the heavy lifting for you.

Scientists/Engineers
- Generate example code: ChatGPT is an excellent tool for easily converting new concepts into working code. You can use it to generate examples of unfamiliar machine learning models written in Python, new React components, or sample code to connect with popular APIs.

- Optimize/Simplify Code: When optimizing or simplifying code, it is important to include a code snippet and specify what you want to be improved, such as time complexity, readability, or maintainability. This will help to make the code more efficient and easier to understand.

- Unit Tests: Finding the flaws in your own code is a tedious yet necessary task for work that is meant to be production-quality. Asking the AI to help write unit tests is a great way to search for edge cases that you might not have thought of but your users surely will.

Use ChatGPT to Write the Conclusion to your Blogpost about ChatGPT

As you can see, the AI is good at summarization, but it fails to add any final takeaways that will leave the reader satisfied, even when specifically prompted to do so. This is why we only recommend using it for specific problems like the ones aforementioned. ChatGPT can be used to explain a technical idea in simple terms or as a jumping-off point for research. Keep in mind that as it is currently rife with misinformation and lacks nuance, don’t go writing your entire Ph.D. dissertation with it. Remember, this is a new technology that’s still in beta form and like the majority of all AI solutions today, It is important to remember that ChatGPT should be used as a tool to assist with your work, rather than a replacement for it.
About the authors
Nick Scipione is a Data Engineer at Valkyrie, where he is also a member of the Algorithm Accountability Task Force. He earned his BS in Chemical Engineering from Northeastern University in Boston, MA where he learned how to use data science to solve a wide range of problems. He is excited to play an important role in shaping the rapidly advancing field of artificial intelligence.
Mo Salinas is a Data Scientist at Valkyrie. He earned his BS in Physics and Biophysics from the University of Texas at Austin where he worked in various research fields from astrophysics to molecular neuroscience. Over the past 2 years Mo has used his insights of natural phenomena to map them to data solutions with real world business impact.