Tuesday, July 4, 2023

Generative AI Studio

What is Generative AI?

It is a type of artificial intelligence that generates content for you.

Note: The below is from my learning from https://www.cloudskillsboost.google/course_templates/556 (Introduction to Generative AI Studio).

What type of content?

Any type of content like text, images etc.

How does it generate this content?

It generates this content from so many existing content already available. The process of learning from these existing content is called training. Through this it creates a foundational model. e.g of foundational model is LLM (Large language model). The foundational model can be used to generate content and and tasks such as content extraction.

One can add new data sets to the above foundational model for a specific task and thus creating a new model.

How can I create a new model from a foundational mode? Is it easy?

Using Google Cloud tool called Vertex AI. Vertex AI is an end-to-end ML development platform on Google Cloud that helps you build, deploy, and manage machine learning models.

What is Generative AI Studio?

Generative AI Studio allows a user to quickly prototype and customize generative AI models with no code or low code. Generative AI Studio supports language, vision, and speech.

Language - Tune Language models

Vision - Generate images based on prompts

Speech - Generate text from speech or vice versa.

Best practices for prompt design

What is a prompt? 

A prompt is your text input that you pass to the model

Best practices for prompt design:

  • Be concise
  • Be specific and well-defined
  • Ask one task at a time
  • Ask to classify instead of generating (e.g. "is X better to learn?" instead of "what is better to learn"?)
  • Include examples (Adding examples tends to yield better results)
There are a few model parameters once can experiment with to try to improve the quality of responses:
  1. Temperature
  2. Top P 
  3. Top K
Temperature is a number used to tune the degree of randomness.
Low temperature means to select the words that are highly possible and more predictable.
High temperature implies more random, unexpected and some may say "creative" responses.

Top K lets the model randomly return a word from the top K number of words in terms of possibility. For example, top 2 means you get a random word from the top 2 possible words.

Top P allows the model to randomly return a word from the top P probability of words.

Conversations

Before we try to create conversations, we need to specify the conversation context.
Context instructs how the model should respond. 
We can add words that the conversation can or cannot use. Same goes for the topic to focus on or avoid.

Tune a Language Model

Prompt design allows for fast experimentation and customization.
However, we have to understand that changes in the prompt wordings can impact the model significantly.  Hence, we look to tune the model.


 

No comments:

Post a Comment