In this guide, we will be using Co:here to summarize a complex piece of text. For example, imagine that a second-grader asked you to explain quantum mechanics; we will create an AI to help with that and provide a simple summary.
Below are the steps that you will follow on the Mantium platform to create your first prompt.
If you do not already have an account, register on the Mantium platform.
You will need to obtain a Co:here key to perform its integration with Mantium. Click here to visit the website; then click on the Get Started button to register.
Complete the sign-up information to create your account.
Note that you will have to provide your Credit Card information to receive $25 of free credits each month for three months upon signup. You will not be charged until you've exceeded the free credit. (See Image below)
After you've provided all the necessary information, navigate to your Dashboard, to generate your API key. Click on
Create New API Key button.
Back on the Mantium App, Navigate to the Integration tab to connect your API keys before creating your prompts.
For this guide, we will configure a new Co:here Integration. Click on the "Add new Integration" button as shown in the image above.
You will be presented with the Modal below, click on "Co:here"
Copy and paste the API key for Co:here in the input field as shown below.
Now you are ready to create your first prompt!
The next step is to add a new prompt. On your dashboard, navigate to the "AI Manager" drop down tab on the left hand side, click on "Prompts", and click on the "Add new prompt" button, as shown below.
Now, you are set to create your own prompt, you will need to fill in the basic info. For now, give your prompt a name in the "Name of Prompt" field, and a description in the "Description" field.
As described above, we will create a prompt that summarizes difficult text for a second-grader, so you can provide the details as shown below and leave the rest of the basic info settings empty for now.
Name of Prompt - Summarize for a 2nd grader
Description - This prompt translates difficult text into simpler concepts
Choose a provider and an endpoint as shown below.
- Provider - Select the "Cohere" provider
- Choose an Endpoint - Here you will select the "Compose-Generate" endpoint to generate summaries of the input text from the model.
- Choose a Model - Select the "Baseline-shark" model. This model is suitable for this particular task (Generation).
- Enter the Prompt - Here you will need to enter the prompt. You can copy the text below and paste it into the input field.
Jupiter is the fifth planet from the Sun and the largest in the Solar System. It is a gas giant with a mass one-thousandth that of the Sun, but two-and-a-half times that of all the other planets in the Solar System combined. Jupiter is one of the brightest objects visible to the naked eye in the night sky, and has been known to ancient civilizations since before recorded history. It is named after the Roman god Jupiter. When viewed from Earth, Jupiter can be bright enough for its reflected light to cast visible shadows, and is on average the third-brightest natural object in the night sky after the Moon and Venus. In Summary,
In Summary, line; this is a way of telling the model the intended task (Summarization), and by providing more context, the model will generate a summary.
- Max Tokens - Here, you will provide the value of the amount of text generated in tokens. For this example, we set the value to
50tokens. For reference, a song's verse has about
128tokens, and a short article has about
300tokens. For more, check out this article on Tokens by Co:here
- Temperature (0) - The temperature controls how much randomness is in the output; it is one of the most important settings as it significantly impacts the output. A lower temperature is advised for a prompt that requires a well-defined response. While, for creative and interesting responses, a higher temperature value is suitable.
For this example, you can set the temperature value to 0
- Return Likelihoods - Set this to
- P (1) - Set this value to 1
You can leave the rest of the Settings empty for now.
Test Run Prompt
After completing the above, hit the "Test Run" button, and you can see your response in the Results field. The response summarizes the input prompt; the response is easier to understand, especially by a second-grader.
Now click the "Create and Finish" button to create your prompt.
Congratulations! you've created your first prompt using the Co:here AI Provider. Now it is time to share with the world by deploying your prompt. Mantium makes it simple to share what you've created as a single-page application by clicking a button.
Navigate to the Prompts section by clicking "AI Manager", and then "Prompts".
You will be presented with the interface below, which shows a list of the prompts that you've created. Click on the Prompt, and a pop-out will appear on the right-hand side.
Click on the deploy button as shown below to deploy your prompt.
As shown in the image below, you will fill out the "Name", "Description" and "Author Name", also check the boxes for placeholder text and approval. If your prompt could output anything considered ‘mature’ you should check the "Intended for adult use only" box.
We recommend that all deployed applications are protected by security policies. Try adding a security policy in the Prompt Editor.
Click on the Deploy Button to deploy the prompt. Once your prompt is deployed, anyone will be able to interact with it.
Updated 2 months ago