After my last blog post introducing machine learning, several people have asked if I can write a quick guide to getting started with OpenAI. Let's go!

 

Sign up for an account

First you'll need to sign up for an account at https://beta.openai.com/signup . It's free and they give you some free credit to get you started. 

 

The Playground

Once you've signed up, head to the Playground at https://beta.openai.com/playground and get a feel for how it works.

The system takes its input from any text prompt that you enter, so if you type "Tell me a short story about a friendly dog" and press Generate, the system responds with this:

Melts your heart, doesn't it? But this is almost certainly not the response you'll get if you try it - this is the joy/pain of AI text generation. And if you delete the response text and run the same prompt again, you'll get a different response. 

 

Temperature

On the right of the screen is a temperature slider, which goes from predictable and dull (temperature 0) to creatively random (temperature 1). Depending on what you're using it for, you'll need to adjust the temperature accordingly.

Let's say you're starting a new business in Truro selling camping gear. Enter the prompt "Generate a list of names containing puns for a business selling camping equipment in Truro, Cornwall:" and set the Temperature to 0:

I can't say I'm inspired. But look what happens when we turn the Temperature up to 1:

Pretty cheesy but much more interesting!

 

Writing an article

Let's see if we can get it to write something a bit longer and more useful. Try entering the prompt "Write an essay outline about tourism in Cornwall" and click the Generate button at the bottom. It should start writing a set of bullet points:

If it stops halfway through the list, press the Generate button again, until it gives you the message "The model predicted a completion that begins with a stop sequence, resulting in no output" which is a very long-winded way of saying that it's finished. If you find it's writing very short responses, you can increase the length using the Maximum Length slider. 

 

To flesh out the article, take each heading in turn and use that as the text prompt, then copy/paste them all together into a Word doc. Naturally, you'll want to do some editing, fact-checking and removing some of the inevitable repetitions.

Here's the first point from the outline above, expanded out with more detail:

Wait, where did it get those numbers from? This is where the system really falls short of expectations because it doesn't provide references for the things it says. I wouldn't trust any data that it outputs unless you can verify it independently. Doing a bit of quick research, it looks like those numbers are in the right ballpark, but there's no way I'd publish an AI-generated article without checking. For example, I was asking it to suggest songs by The Cure the other day (don't ask) and it made up a whole load of songs that don't exist, no matter what temperature I had it set to.

 

Other engines

The default engine is called Davinci and it's genuinely amazing, but they also offer some other, cheaper engines. To be honest, I'd recommend sticking with Davinci. It's a bit more expensive if you're using it for a real project, but some of the others put out very weird text. Here's Ada with the same prompt about tourism in Cornwall:

I'm pretty sure the Aconitus Chair Rococo Museum doesn't exist, but thanks Ada. 

 

Other examples

If you want to see what else it can do, check out the Examples section at https://beta.openai.com/examples and have a play!

 

Summary

We're really excited to have started using this system on live websites - for a client who wants long passages of text reduced down to a series of keywords (see example at https://beta.openai.com/examples/default-keywords) and we're creating a chatbot that we can pre-populate with answers (see example at https://beta.openai.com/docs/guides/answers) as an alternative to an FAQ section. If you're keen to see how AI can help your business, get in touch.

Tagged under: Bluffers guide   Build a better website   Hot topics   AI   Content   Software   Data  



Related posts

Nice things people have said about us

"Cracking job of building a really smart website for my business. Made the experience very user-friendly so i can update the site myself. Friendly and professional service."

Tim Fuge, Tim Fuge Leadworks