How to use GPT-3 in Business Apps

How to use GPT-3 in Business Apps

Working with GPT-3 has been awesome. It's a powerful tool supported by a lovely community. To learn about how I got access, you can visit this post.

What GPT-3 is

GPT-3 is described by OpenAI as "an autoregressive language model that uses deep learning to produce human-like text." Applications like mine can prompt GPT-3 via API and return text completions. This makes it very powerful for creating anything from poems to code to sales emails.

What it isn’t

Although it can seem like it at times, GPT-3 isn't magic. It's only as smart as what you give it. For instance, all training of the model stopped in October of 2019. It has no idea about the current pandemic. If you wanted it to talk about current events, you'd have to be feeding it news. Otherwise, it just isn't going to know about it.

How I use it

I use it to build sales emails. You may think that you could simply tell it who you're sending it to and it would come up with the perfect email. If only it were that simple.

I grab data from a host of different sources. I have a user describe their business. Then they enter the URL of the prospect they're trying to send to. Then I reach out via API and I grab different data about that prospect and the people who work at that company. I gather names, titles, social media information, company news, and industry data.

Then, I feed that all the GPT-3, alongside some high-performing sales emails from my past as a salesperson. GPT-3 then becomes a sort of syntactic glue that ties it all together in a human-like sales email.

Write Sales Emails 10x Faster

Sell more in less time with Magic Sales Bot's AI

Start for Free

Engines

Because there are so many applications of GPT-3, there are different engines for different use cases. The main four engines are Ada, Babbage, Curie, and DaVinci. When you see all the cool things that people are creating with GPT-3 on Twitter, that's usually DaVinci. It's the most capable at coming up with content in a way that seems very human. It's also the slowest and the most expensive to use.

carbon.png

OpenAI is always improving and coming up with new engines. They've recently introduced their Instruct series. Normally when you use GPT-3, you show it what you would like it to model and output after.

For example, if you want to write a poem, you would show it a model of a poem that it should use as a basis for new poems. With the Instruct series, you can literally tell it "write a poem" and it will write a poem (with any guidelines you tell it to follow). This is great for cost savings, because you don't have to feed so much text to it, which eats into your GPT credits. Depending on the use case, it also delivers more straightforward results.

Screen Shot 2021-02-06 at 1.14.28 PM.png

As I write this, the newest engine in testing is Cushman-Alpha. The goal is to combine the best of Curie and DaVinci engines. Curie is like DaVinci, but faster, and less able to come up with creative text completions. The completions it generates are more straightforward and dry. With Cushman-Alpha, OpenAI combines the speed and cost-efficiency of Curie with the more creative completions of DaVinci. It's like a blend between the two, but is not approved for any use in consumer-facing applications yet.

I almost exclusively use the DaVinci engine. It seems to be the best-performing, although it's the most expensive. I toy with the Instruct series sometimes. I could see myself using it more in the future once it's out of beta. I would also like to explore Cushman-Alpha, but it's not allowed for use in production yet. Having used it in a trial setting, it is pretty useful.

Learning 1 - Chunk It Out

When I first started using GPT-3, I told it to "write me a sales email." This returned weird and wonky completions.

carbon (1).png

I've learned not to feed it a bunch of information at once or to ask it to create a giant sales email. Instead, I chunk it out into smaller parts of an email. I ask it to create an intro in one request. In another, I ask it to create a body. In a third, I create a conclusion. This gives me the best completions of any strategy. I have more nuance over what each individual portion looks like. Then, I tie the results together on my back end, creating a cohesive email.

carbon (2).png

This seems to be the current advice: Don't send one giant request to receive one giant chunk of text. Instead, chunk out your request into smaller bits so that you troubleshoot what parts need tweaking.

Learning 2 - Standardize with Dynamic Tags

Even within the remove chunks, there's still room for error. Instead of showing GPT-3 what an email intro should look like, I can be more prescriptive with how I chunk it out. Then, in the description of the prompts, I can tell GPT-3 any specifics about each section.

On my back end, I can dynamically change different parts of the request based on user-inputted information. Now I can guarantee a much more standardized requested to GPT-3. This gives a much more standardized response back.

carbon (3).png

If I were to make everything dynamic, the completions would be way too wonky. If I were to make everything standardized, the emails or come so dry that users would find no value in my service.

Learning the Limitations

Role Reversal

GPT-3 does have limitations. My user may be from Company A, selling to Company B. Sometimes, GPT-3 will miss the mark and write an email as if it's from Company B, selling to Company A.

Cut-Off Completions

You can tell GPT-3 how many characters you want a response to be, but you can't tell how many sentences you want. Because of this, it may try writing a longer response than you've allowed and cut off the text.

Assumptions

If you show it examples, it can tend to make assumptions. If I'm showing it emails where I made a comment about the news, it can act like it read a piece of news and make up a false claim. This is GPT-3 working as intended. It's creative, but it's a shortcoming for a business application where you don't want it to create an output without an input.

I'm still working through these limitations. I'm having a hard time overcoming the reversal of roles that it sometimes does. With cut-off sentences, the standardized inputs with dynamic tags does help. With the assumptions, dynamically changing the prompt can help. But not all the time.

How I’m Working GPT-3 Now

Working with GPT 3 is constant iteration. I understand the importance of small prompts that are dynamically change based on what information is available. I'm going to continue testing new engines as they come up, but in the format I've discovered works for me.

I'll break each desired output into small and discreet potential outputs. I'll break those into even smaller outputs and describe to the engine what each output should look like. After completion, I'll grab them on my back-end and mold them into what the user needs to see.

I may do some further work here, like watching for certain keywords. If GPT-3 returns a "bad" output, I may trigger a new request.

GPT-3 is impressive, and there's still a lot to be discovered with it. I've loved being a part of this experiment so far. I hope that some of these learnings help you get a step ahead in your potential use. As always, you can find me on Twitter if you have any questions.

Write Sales Emails 10x Faster

Sell more in less time with Magic Sales Bot's AI

Start for Free