Testing Prompts with Interactive Learn Prompting Embeds
This section will walk you through setting up and using the Learn Prompting Embed, an interactive tool that allows you to test prompts directly on the Learn Prompting website.
What is the Learn Prompting Embed?
The ChatGPT website is great, but wouldn't it be even better to write and test prompts right here on this website? With our Learn Prompting Embeds, you can! Keep reading to see how you can set it up. We'll be using these interactive embeds throughout most of our articles.
Get Set Up
Here's what the embed looks like:
You should see a similar embed just below this paragraph. If it's not visible, try enabling JavaScript or switching to a different browser. Still no luck? Reach out to us on Discord and we'll help you troubleshoot.
If you see the embed, click Generate. If it's your first time, you'll be prompted to sign in with your Google account.
We currently only support Google Authentication, but we're working on integrating all providers!
-
For Learn Prompting Plus subscribers: If you have a Learn Prompting Plus subscription, use the same email to sign in.
-
For non-subscribers: If you're not a Learn Prompting Plus subscriber, the setup process involves adding your OpenAI API key. Here's how to find it.
Get an OpenAI API Key
- Go to platform.openai.com/account/api-keys.
- Sign up or sign into your OpenAI account.
- Click Create new secret key to generate a key. You'll see a string of text like this:
- Copy and paste this key into the embed on this site and click Submit.
If you need to update your API key, clear your browser cookies and re-enter the new key.
Now, you're all set! You can use the embeds throughout the site. Keep in mind that OpenAI charges for each prompt. If you've just created a new account, you'll get three months of free credits. After that, don't worry β it's very affordable. You can generate about 7,000 words for just $0.02 .
Never tell anyone your API key, since they could charge your account with prompts.
Using the Embed
Let's see how to use the embed. Edit the "Type your prompt here" field in the embed. It's just like using ChatGPT, except you can't have long conversations. In this basic guide, we use these embeds to demonstrate prompt engineering techniques.
You can see four pieces of information under the Generate button. The left one, 'gpt-3.5-turbo' is the model (gpt-3.5-turbo is the technical name for ChatGPT). The three numbers are LLM settings, which we will learn about in a few articles. If you would like to make your own embed, click the edit this embed button.
Conclusion
Learn Prompting Embeds make it easier to experiment with prompts without leaving the course site. But if you prefer ChatGPT, you can keep using that. Just remember to save your API key since OpenAI shows it only once.
Quick Recap
Sander Schulhoff
Sander Schulhoff is the CEO of HackAPrompt and Learn Prompting. He created the first Prompt Engineering guide on the internet, two months before ChatGPT was released, which has taught 3 million people how to prompt ChatGPT. He also partnered with OpenAI to run the first AI Red Teaming competition, HackAPrompt, which was 2x larger than the White House's subsequent AI Red Teaming competition. Today, HackAPrompt partners with the Frontier AI labs to produce research that makes their models more secure. Sander's background is in Natural Language Processing and deep reinforcement learning. He recently led the team behind The Prompt Report, the most comprehensive study of prompt engineering ever done. This 76-page survey, co-authored with OpenAI, Microsoft, Google, Princeton, Stanford, and other leading institutions, analyzed 1,500+ academic papers and covered 200+ prompting techniques.