Prompt Design with the Mantium App
Kedar Kulkarni
?? Architect UI | JavaScript Enthusiast | ReactJS | EmberJS | Docker | RestAPI | Open Source | ChatBot & NLP Enthusiast | Open to Work | Talks about #brand, #change, #business, #innovation, #leadership #growth
Want to generate creative text? want's to use NLP and AI in simple Steps? here you go...
I use Mantium to generate any creative text which meaningful and informational text to the world.
Mantium helps you to generate nice text using natural language processing (NLP) using different providers like OpenAI, Chohear, AI21Labs, and Mantium.
Mantium makes your job easy whether you are a developer or not, you can easily create your intended prompts for disaster outputs using NLP’s.
In this example, I am going to demonstrate an example of a prompt that uses Cohear as an AI Provider and gets the Travel Tip(s).
Requirements
Below is what we are going to build at the end of this tutorial.
Travel Tips: Know Your Bank’s Terms - Make sure you know the terms of your bank’s foreign currency exchange program.
You can experience it live using the following Mantium deployed link, and tell me your experience in the comment.
Prompt Design with the Mantium?App
The first and essential step is to design the prompt (conversational text generation task) with the Mantium platform. Prompt design is our way of guiding the GPT-3 model to give a favorable and contextual response as it enables us to provide a text input and get a generative response from the model.
Think of this like you are playing the game of charades where you give the players information to figure out the secret word. Similarly, with GPT-3, we provide just enough information for the model to recognize patterns in the training prompt.
To do this, you don’t need to have prior deep learning experience, and almost anyone can do this in a No-Code approach to build a simple text application using the Mantium interactive UI .
I will break this down into more straightforward steps that you can follow.
Step 1 — Register for a Mantium Account
Visit the app.mantium.com website to create a free account.
Step 2 — Connect your v API key.
To access the Large model through the Cohere API, you must connect your Cohere API key on the Mantium platform.
Click on AI Providers, paste your Cohere Key in the Cohear input box and click Add API Key. Notice that Mantium supports other AI providers such as Cohere , OpenAI AI21 , you can connect with their respective API keys, but for this tutorial, we build with the Cohere model.
If you don’t have your API key for any of the AI Providers, here is documentation on how you can get one.
Interesting Note: Mantium Provider now supports GPT-J
Step 3 — Add New Prompt
The next step is to add a new prompt. Navigate to the AI Manager drop-down tab on the left sidebar, click on Prompts, and click on the Add new prompt button, as shown below.
AI Manager > Prompts > Add new prompt
Step 4 — Prompt Design
Here, we will provide the information to build our training prompt.
A. Basic Info
Let’s fill in the basic information to identify our prompt. Note that you can provide any name and description.
B. Add a Security Policy
Adding a security policy to your prompt allows for controlling input and output content quality — you can configure your own or use Mantium’s default policy, which is included with every account. Click Add Security Policies under Security Policies and drag Default Policies to Selected Policies. Click Done to save. You will know the policy has been applied when its name is visible under Security Policies.
领英推荐
C. Provider
All providers have an endpoint that supports generating text. Select the corresponding endpoint for the provider you selected. The provider endpoints related to generative text are the following:
In this tutorial, we are using the Cohere API, Please select Cohere from the drop-down.
D. Cohere Info
Travel Tips: Be Passport Ready - To avoid any complications or cancellation of plans, update your passport approximately 9 months before the expiration date
Travel Tips: Pack Enough Medication - If you take prescription medication, or need a certain remedy once in a while, make sure you pack a lot of it.
Travel Tips: Watch for Travel Advisories - As you plan to set off on your international trip, read up on any travel warnings and advisories that your local or national government may have issued.
Travel Tips: Set up Fraud Alerts - Let your credit card company know what countries you’ll be visiting, and on what dates.
Travel Tips: Use a Credit Card- If you have a credit card, use it during international travel. You’ll often get the best currency exchange rates. But, beware of transaction fees.
Travel Tips: Take a Hotel Business Card - When you’re in a foreign country, the first thing you should do when you arrive at your hotel is grabbing a business card from the front desk.
Travel Tips: Sign up for Data Roaming - Make sure your cell phone is set up to accept international data roaming.
Travel Tips: Save the Maps - Before you leave for your international trip, save the google maps to places you know you’ll visit. Also, if your hotel has Wi-Fi, use it to update any maps or information you’ve realized you’ll need.
Copy and Paste the above in the Prompt Line input field. Don’t forget to add an empty line after the last tip.
E. Basic Settings
Here you will provide the basic settings for the OpenAI model, see the image below.
Basic Settings Explanations.
Step 5 — Testing Prompt Results
On the Mantium platform, we can test our prompt. See the image below, I got an interesting response. This prompt does not require an input so just hit the Test run button.
Congratulations on completing the first prompt, now just deploy it.
to Deploy just fill in the basic information that appears on your shared URL
You will be redirected to the shared URL and your shared prompt look like this, just use execute button to generate interactive text.
https://share.mantiumai.com/prompt/9082b73f-6bf3-45a6-827c-99fa0feb152f
I hope this article is helpful, and you learned about what you can do with Mantium & Large Language Model. If you have something to build in mind, you can reach out to me via LinkedIn , and follow me on Twitter .
if you have any questions please feel free to reach out on Mantium Discord !
Thanks to Mantium for giving me a chance to explore the #NLP and use their platform.
Don’t forget to explore more on
API Guide
Mantium AI JavaScript Library GitHub repository and documentation.
Thank you!
Kedar Kulkarni