In this lesson, we'll cover vertex AI studio for multimodal and language while testing prompts for
common business use cases.
Starting from multimodal, we have prompt design, single turn and multi-turn prompt design chat.
Let's do a quick test with each, starting with prompt design single turn.
We click open and then select any of the recommended prompts going for document classification, you
will notice the User Prompts section that provides the task also provides the template of the answers,
the system instructions with the system prompt, as well as the document that should be analyzed.
Click on the arrow to run the prompt and review the answer.
Now let's delete a portion of the user prompt, but leaving.
What's the document type?
Now let's submit the prompt again and check the results.
This should give you an idea of the capabilities around the multimodal model.
In this use case, we use text to classify documents.
You can keep playing with this use case with other prompts or maybe creating your own use case.
At the top portion of the user interface, you have the prompt title history of the prompt notes for
you to leave, comments that won't influence the prompts outcome and the API reference.
Then right below, you can edit the system instructions that guide how the model should respond.
Use these instructions to provide the model with context, enabling it to understand the task, offer
customized responses, and follow specific guidelines.
These instructions are applied every time you send a request to the model.
You can learn more about it by following this tooltip link.
Then there's the prompt, which we recently just edited, the amount of tokens and an overview of the
prompt tokenizer.
This is valuable for fine tuning prompts for RPA or agents.
We can quickly clear the prompt, insert media or record audios inside media.
We can upload files, images or YouTube video URLs to the right of our vertex AI studio app.
We will have the model settings.
We can select which model to send the prompt and the region if you're happy with your prompt, but the
result is not there yet, you can try changing these settings.
Temperature controls the randomness in token selection.
A lower temperature ensures more accurate and predictable responses.
At the temperature of zero, the model always picks the highest probability Ability token.
A higher temperature produces more diverse and unexpected results, encouraging creativity and variability.
The output token limit determines the maximum amount of text generated from one prompt.
Let's say you prompted your model, but then you notice most results are exceeding or falling short
of what you're looking for.
Depending on your situation, reduce or increase the output token limit.
Usually you won't need to edit this if you've done a good job at the prompt and instructions.
You also have the safety and advanced settings, which we won't cover in this lesson.
So for now, just focus on what we've covered so far.
With the new settings in place, you're all set to keep testing your prompts in order to improve the
outputs.
Let's save so we can explore the Multi-turn prompt design or chat version of the multimodal app hit
open as you can see in this screen.
Our features and settings are the same.
The difference with our previous test is the prompt interface and experience, as we can have a continuous
conversation with the model providing conversation history as context when generating responses.
Let's go for the newsletter design test.
Once again, buckle up as we create our new coffee shop newsletter for vertex AI studio.
Notice as we open the templated prompt, there has been an interaction between the model and the user
already.
We can continue from where it was stopped, or we can clear the conversation and start from scratch.
Let's head to our prompt box type start newsletter creation process.
And since we have a system interaction in place, we can follow along the prompt to create a newsletter
edition So if you're looking to create a similar prompt, you can take the inspiration from here.
After we prompt the model to begin the process, you will be asked a few questions.
Just go ahead and customize to your liking and after answering everything the prompt requires, we will
have the newsletter ready to be created.
Once you're done, edit the name of the prompt and save it again.
Now let's head to language.
And if you notice, we have very similar options to what we just experienced with multimodal.
There is a single prompt option and a chat.
And by selecting them, the only difference you may notice is for generate text at the top right after
notes you will find free form, which is the standard format for prompting the modal and structured,
which provides a UI for adding Few-shot prompting within examples you will add content to help the model
understand what an ideal answer looks like by providing an input and output example.
This will then be added to your prompt and by adding an input here and an arrow over here, it should
generate content considering your examples and the context added in your prompt.
You can achieve the same results using the free form option by adding input and output, plus the content
to the end of your prompt.
The rest is the same from what we just saw on multimodal, except the model can only perform language
and text related tasks, such as creating content or code.
Even though vertex AI might seem a little bit overwhelming, we've started to demystify some of the
most important features already, and I'm sure you can start seeing how useful this tool can be.