Quidest?

GCP Prompt Design

Prompt design or prompt crafting is a fundamental skill for utilizing generative AI effectively.

There are 3 main methods that we can use to shape the model’s response to our desire:

  1. Zero-shot prompting is a method where the model is given a prompt that describes the task without additional examples.
  2. One-shot prompting is a method where the LLM is given a single example of the task that it is being asked to perform.
  3. Few-shot prompting is a method where the model is given a small number of examples of the task that it is being asked to perform.

Structured Prompts

On Vertex AI we can use the structured prompt mode to construct a more sophisticated prompt.

The structured mode allows you to provide:

Best Practices

Save prompts and model parameters

If you designed a prompt that you think is working pretty well, you can save it and return to it later. Your saved prompt will be visible in the prompt gallery, which is a curated collection of sample prompts that show how generative AI models can work for a variety of use cases.

In addition to testing different prompts and prompt structures, there are a few model parameters you can experiment with to try to improve the quality of the responses:

These parameters all adjust the randomness of responses by controlling how the output tokens are selected.

When you send a prompt to a model, it produces an array of probabilities over the words that could come next. And from this array, you need some strategy to decide what it should return.

A simple strategy might be to select the most likely word at every timestep, but this method can result in uninteresting and sometimes repetitive answers.

By controlling the degree of randomness, you can get more unexpected and, some might say, creative responses.

#certification #engineer #machine #platform #cloud #path #learning #gcp #google #ai #model #development #generative #fine tuning #prompt crafting #temperature #topp #topk