[MUSIC PLAYING]
RAY THAI: Hi.
I'm going to show you how to start
prototyping with large language models in just
minutes with MakerSuite.
I'm Ray, and I'm the product manager for MakerSuite, which
is a browser-based tool to prototype with the PaLM 2 model
quickly and easily.
MakerSuite allows you to create three types of prompts.
Let's start by creating a new text prompt.
This is an interface that lets you send a prompt string
directly to Google's PaLM 2 large language
model using the PaLM API.
What are Large Language Models or LLMs for short?
You can think of them as a very sophisticated autocomplete.
If I send text like you can lead a horse to water to the LLM,
the LLM is going to respond with a text
that's statistically most likely to follow based on its training
data.
In this case, that's the phrase, but you can't make it drink.
You can call the text you can lead a horse
to water the prompt since you're prompting
the LLM on what to say next.
There are countless things that you can build with the PaLM
API, whether that's an email writing assistant, a content
summarizer, or a movie recommender.
MakerSuite lets you start prototyping
your idea in minutes.
This lets you immediately get a sense
of whether your idea is feasible and shows you how the PaLM 2
model performs on it.
For example, let's say I want to try using
the PaLM API to create poems.
I can use MakerSuite to send the text write a poem about dogs
to the PaLM 2 model and see how it responds.
In this case, it created a pretty good poem.
So I now know that the PaLM API could
be used as a poem generator.
I just showed you how to use the text prompt by providing
the model with instructions.
However, one of the most common ways to prompt
is with what's called a few shot prompt.
It's called a few shot prompt because you
give the model a few examples.
For example, let's say I was interested in using
the PaLM API to build a grammar character.
I can provide the model with examples of input
it might receive and outputs it should provide.
In this case, inputs are sentences
with incorrect grammar, and outputs are
sentences with fixed grammar.
Then I can see how the model responds to an input
that it's never seen before.
I can hit Run and see that the model correctly
fixed the sentence.
This style of prompting with examples
is so common that MakerSuite has an interface
for it called a data prompt.
Let's go to a data prompt now.
In a data prompt, you're given this table
to provide examples of what you want the model to do.
Let's add the same examples that you just saw.
I can also provide the model with labels
of the inputs and the outputs.
In this case, inputs are labeled as original,
and outputs are labeled fixed grammar.
What's happening here is that this table
is being converted directly to the same free form
text that was provided to the model in the text prompt.
This data table just makes it easier
for you to visualize and manage your examples.
Like you saw earlier, I could just
stop here and prompt the model with only examples.
However, I'm provided with the field
to optionally add instructions if I think
the model needs more context.
Let's try the context rewrite sentences to fix mistakes.
You can see that the context is being
sent to the model alongside the text of the examples.
If I wanted to experiment further,
I also have settings I can change.
For example, if I wanted more variability in my answers,
I can turn up the temperature.
Temperature injects more randomness
into the model's output, so it can sometimes
lead to more creativity and unexpected outputs.
I can test the model again with the input.
Again, I see that the model correctly fixed the sentence.
I now have a functional prototype of the PaLM
API as a grammar improver.
You saw that I was able to build this in seconds
without writing any code.
I can hit the Save button to save my prompt in Google Drive.
I can also hit the Share button to share my prompt
with teammates.
I'm now satisfied with my prompts,
and I want to work with it in my developer environment.
I can click this Get Code button and get code for an API call
to the PaLM API.
My work in MakerSuite, including my settings, instructions,
and test examples are all stored in this code snippet.
There are an endless number of new ideas
to try out in MakerSuite.
To get started, go to makersuite.google.com or follow
the links in the description.
Thanks for listening, and happy prototyping.
[MUSIC PLAYING]