Introduction to Gen AI

Introduction to Gen AI

The first session as part of the Gen AI rush cohort, an initiative by The Product Folks kick-started with Sudalai Rajkumar - SRK walking us through the basics of Generative AI

No alt text provided for this image

Evolution of AI

No alt text provided for this image

What is Gen AI?

Gen AI refer to describing algorithms, that can be used to create new content including text, images, audio and video

Gen AI in Natural Langaguge Processing(NLP)

Gen AI Large Language Models(LLMs)

Large Language Models are the language models that are trained on large amounts of text data to generate human-like text. They are called Large language models as they accept billions of parameters. Ex. ChatGPT

No alt text provided for this image

As we can obviously make out, the output text that gets generated depends upon the input text. This input text that we provide to the AI models is called Prompt.

Two types of prompting:

No alt text provided for this image


  1. By Instruction - We give an instruction and we get the output text generated based on the given instruction. Ex. Write an email to the customer asking for feedback on the usage of a given product for about a month and it generates an email for us
  2. By Example - We give an instruction along with an example. By providing an example, we prompt the model to make it understand the way we want the output to be generated

Gen AI - Diffusion Models

No alt text provided for this image

The stable Diffusion model is an iterative model which removes noise from images.

Evolution of NLP Models

No alt text provided for this image

Bag of Words: In BoW, we count the number of times a particular word occurs in a particular text and then we put the count over there so it's just counting the words and then we build some machine learning models on top of them. Limitation: For ex. if we are doing a sentiment prediction and the input text had the words happy and glad and if the model has not seen the word glad in the training set, it will not be able to predict that glad is the same as happy.

In order to overcome such limitations, the models have to be trained across all the words that are present in the vocabulary.

Word Vectors & Deep Learning: Each word is represented in a vector representation and words that are close to each other are also closer in high dimensional space. For example, in the above vector representation, the cat and kitten appear closer to each other whereas the word dog or house appears farther. But, the problem here is what if we encounter a word like apple? An apple could mean a fruit or an organization and the model could not differentiate between the two unless we have a clear context.

Context vectors & Transformers: In this model, the entire sentence or the entire paragraph is converted into a vector format

The 4 stages in GPT training process are as follows:

No alt text provided for this image

  • Pre-training - The model must be pre-trained on a significant amount of text input before it can be tailored for a particular purpose.
  • Supervised Finetuning - Once the model has been pre-trained, it can be fine-tuned for a specific task, such as text classification or language translation. In order to do this, the model must be trained on a smaller dataset that is relevant to the given task.
  • Reward Modeling - Reward Modeling?discovers what people want using examples of their preferences. In other words, we tell the model that result A is bad or that result B is better than result C, instead of figuring out the perfect scoring criteria for the results ahead of time.
  • RLHF - RLHF is an approach in artificial intelligence that combines?reinforcement learning techniques with human guidance to improve the learning process. It involves training an agent or model to make decisions and take action in an environment while receiving feedback from human experts.

Some of the tools that can be leveraged for various areas of work:

No alt text provided for this image

This was followed by a Demo of the application called Document QA which is an AI/ML-powered automation platform built using the concepts discussed during the session.




要查看或添加评论,请登录

Maduri Madduru的更多文章

社区洞察

其他会员也浏览了