With E Ocean Digital Connect, you can make your chatbot smarter by adding the GPT model from OpenAI. This makes your chatbot more knowledgeable and helpful, allowing it to provide expert answers and assist users with a variety of tasks.
To begin, you will need to create an OpenAI account and link it to your chatbot. We will provide you with step-by-step instructions on how to do this, as well as information on the AI models that are available for you to use. Additionally, we will guide you on effectively training your bot to meet your business requirements.
Getting Started
The GPT (Generative Pre-trained Transformer) is an advanced AI model developed by OpenAI. It is designed to generate text and code, making it a versatile tool for various applications.
The primary GPT models offer a wide range of functionalities. They can analyze text across different difficulty levels, provide accurate answers to questions, optimize text for SEO and SMM tasks, categorize text into tables, assist with brainstorming, edit and translate text, handle coding and mathematical tasks, and support conversations on any topic, including specific subjects.
To leverage the power of GPT for your business tasks through a chat bot, you need to follow a few steps. First, choose an appropriate GPT model that aligns with your requirements. Then, customize your prompts by adding reply sentiments, narrowing down your list of questions or topics, and incorporating relevant information about your business. You can also provide examples of the desired responses you would like the chat bot to deliver.
Create an OpenAI Account
- Go to OpenAI, and create an account. Click Sign up, enter your email address, and click Continue, or continue with your Google or Microsoft account
-
Enter your email address and then enter a password in the next window. You will receive a confirmation email in your inbox.
-
Click Verify in the email and enter your name and the name of your organization.
-
Enter your phone number to receive a SMS conformation code.
-
Enter the code, and log into your account.
Before choosing a phone number to use, check OpenAI’s list of supported countries and territories.
-
Go to the API Keys tab and click Create new secret Key, and copy your key.
You need to save a key on your device because you cannot copy the same key on this page a second time. If you lose the key, you will need to generate a new one.
Set Up the Integration
Now that you have successfully generated the API key, you will need to enable it in Digital Connect Bot Builder.
To do this:
- Go to the Chatbot Builder in Digital Connect.
- Click on Settings and then click on OpenAI GPT tab. Here you can configure the mandatory details for integrating GPT models with your Bot Builder.
Enter Your API Key
- Enter your Open AI Secret Key and Organization ID.
Choose a Model
Choose your AI Model to generate bot replies. Each engine has its own unique capabilities and is suited for different types of tasks.
Model |
Description |
Recommended use cases |
The most comprehensive yet expensive and slower model, as it works with a large amount of data. It can perform the same tasks as other models but requires fewer prompts in the “Bot instructions” field. Use it to perform tasks where it needs to analyze the context deeper and generate more complex text or code. Also, you can use it to solve logic problems involving cause and effect. |
Analyzing complex intent and cause-and-effect problems, summarization, and explaining and generating code |
|
The model can analyze text, answer direct questions, and provide key points. Use it for Q&A in chatbots. For example, in the “Instruction for bot” field, you can enter your questions and answers that the bot will use. |
Translation, complex classification, text sentiment analysis, and summarization |
|
The model is good at picking up obvious text patterns and using them as references to generate new text. Use it to classify information and assign categories. For creative applications, Babbage is able to understand structure just enough to be able to create simple plots and titles. |
Moderate classification, and semantic search classification |
|
The fastest and cheapest model. Use it when you need to parse text faster without too much nuance. |
Parsing text, simple classification, address correction, keywords |
|
A gpt-3.5-turbo model trained on human conversation data. Able to generate human-like responses with a more natural tone than other models and personalize its replies based on the topic and previous user messages. |
Generating replies for messaging apps and virtual assistants and implementing QA systems. Giving the software a natural language interface. Providing tutoring in various subjects. Simulating characters for video games and much more. |
Only davinci, curie, ada, and babbage models are available for fine-tuning.
In this field, you can also specify one of the OpenAI system models that aren’t in the standard list. The full list is available in the OpenAI documentation.
Add a Prompt to the Bot
GPT Models provide versatile capabilities, from text analysis to generating topic-specific replies. By customizing prompts and incorporating text sentiment and company information, you can create personalized and meaningful interactions with your chatbot.
When creating a prompt, keep the following recommendations in mind:
Here are some simple recommendations for creating effective prompts:
- Provide detailed instructions for your bot, including user interactions, desired reply details, and topic preferences.
- Use examples to illustrate your desired outcomes, such as sorting lists or classifying paragraphs.
- Ensure high-quality and accurate input data and be clear about language preferences.
- Personalize the model by describing specific personas or characters for more tailored responses.
- Test and refine your prompts in the builder workspace until you achieve the desired results.
AI analyzes text in all languages and can answer in a language you specify, but it interacts better in English. If you do not specify a language, the bot will answer in English by default.
If you have any questions about how to create bot prompts or possible scenarios, you can check existing discussions or start a new one in the OpenAI community.
Provide a Token Number and Set Up the Temperature
Tokens refer to the individual units (such as words and characters) used to represent and process text. They are important to keep track of as they contribute to the model's input limit and incur additional costs when interacting with the API.
In terms of the English language, typically, one token in ChatGPT corresponds to one word. However, keep in mind that tokens can also represent single characters or punctuation marks, which may affect the exact conversion rate from tokens to words.
For each request, the token count takes into account the number of words in the following places:
- in the “Bot Prompt” field;
- in the last messages in a chat with a bot;
- in the current question that a user asks a bot;
- in the current answer that a bot provides a user with.
Read more: What are tokens and how to count them and about OpenAI’s pricing plans in the Pricing section.
After completing the signup, OpenAI automatically gives $18 credits for 3 months. This money will be withdrawn when you use tokens. Token fees vary depending on the model used. For example, the Davinci model in a live environment cost $0.1200 per a thousand tokens, while the Ada model in a test environment costs $0.0004.
- Provide token number In the “Maximum number of tokens in response” field, specify a number. For the Davinci model, you can enter up to 2,048 tokens, and for all other models — up to 1,024 tokens.
- Provide a temperature indicator value from 0 to 2.
Temperature is a parameter that determines the randomness of the output. Higher temperature values (e.g., 1.2) lead to more random and diverse responses, while lower values (e.g., 0.2) make the outputs more focused and deterministic. You can adjust the temperature setting based on your desired level of randomness in the generated responses.
Save the Integration
Now you have successfully configured all the mandatory fields to integrate OpenAI GPT into your Bot builder.
- After clicking "Save," you can begin adding data to your Digital Connect account to submit to OpenAI for training your bot.