Hello everyone and welcome to this full course on prompt engineering for beginners. Your practical starting point to master how to communicate effectively with AI models. In this course, you will learn how prompts work, why they matter, and how the right instructions can dramatically improve AI outputs. We will start with the fundamentals of crafting clear and structured prompts. And you will also get hands-on experience with Real world use cases from generating content and writing code to automating workflows using large language models. And by the end of this course, you will have the skills to design smarter
and more powerful prompts that help you get the best out of any AI system. So before we begin, please like, share and subscribe to Edureka's YouTube channel and hit the bell icon to stay updated on the latest content from Edureka. Also check out Edureka's prompt engineering Course with LLM. Learn to build next generation AI solution and intelligent applications with our comprehensive online prompt engineering course. This training and certification program is designed to equip you with the skills needed to interact effectively with large language models by crafting clear impactful prompts. It is designed by industry experts
for real world skill development, limp prompting techniques, rag and vector databases and build and Deploy end to-end geni applications with top tools and frameworks. So check out the course link given in the description box below. Now let us get started with the first topic that is what is prompt engineering. Prompt engineering is an interesting field that combines artificial intelligence and human language understanding. In this field, professionals and researchers work to create prompts or instructions that Effectively guide AI systems to produce the expected outcome. Whether it's fine-tuning language model, designing prompts for specific tasks, or optimizing
human mission communication, prompt engineering is crucial for leveraging the power of AI for a variety of applications. Imagine you're developing a virtual assistant application using a large language model such as GP3. The goal is to provide users with an engaging and helpful Experience by designing effective prompts that generate informative and relevant responses from the model. So let's consider a scenario in which the virtual assistant assist users with the travel planning. So here's how prompt engineering plays a major part. So the scenario is you're planning a trip to Paris and want the virtual assistant to provide
recommendations for activities, restaurants and landmarks to visit during your stay. So let's say you're Looking for a help with a traditional prompt and you ask for what should I do in Paris and virtual assistant will assist you here like here are some recommendations for activities in Paris and here's how the enhanced prompt through prompt engineering respond to your queries. So if you input a query that goes like hey there I'm super excited about my upcoming trip to Paris. So could you please recommend some must visit places and activities for me then The virtual assistant will
generate the response as something like this. So of course Paris is an amazing city with so much to offer. So here are some must visit places and activities and it continues with the explanation about each place. I hope you got the idea of how enhanced prompt provides users with an engaging and helpful experience by designing effective prompts that generate informative and relevant responses from the model. So now let us Understand what exactly is prompt engineering. Prompt engineering is a method used in natural language processing that is NLP and machine learning. It's all about crafting clear
and precise instruction to interact with large language model like GPT3 or B. So this models can generate humanlike responses based on the prompts they receive. Think of prompt engineering as giving direction to these models. By crafting specific and concise prompts, We guide them to produce the response we want. So to do this effectively, we need to understand the capabilities of the model and the problem we are trying to solve. Fine-tuning prompts allows researchers and developers to improve the performance and usability of LLMS for a variety of applications including text generation, question answering, language translations and
others. Effective prompts engineering necessitates a thorough understanding of The underlying models capabilities as well as the problem domain and desired result. Now let's find out why prompt engineering matters for AI. So prompt engineering is important in AI because it improves model performance, customization and reliability. By creating clear and tailored prompts, developers can help AI models produce more accurate and relevant result, reduce biases, improve user experience and address ethical concerns. In simple Terms, prompt engineering ensures that AI system produce useful and reliable result that meets the needs of users while adhering to ethical principles. So now
let's consider an example in the context of text generation for generating product description. Assume you're using an AI model to create product description for an online store. So without prompt engineering, you may issue a generic prompt such as generate a product description for a smartphone. So without prompt engineering you would get something like this. This smartphone has a high resolution display, powerful processor and a longlasting battery life. The given prompt is less effective because it lacks specificity. So it simply says generate a product description for a smartphone. So this may make it difficult to come
up with an idea and write something engaging and informative. So having a good prompt can make a significant difference in your Writing. They give you a clear idea of what you need to write about and keep you focused and organized making it easier to generate ideas and express yourself. On the other hand, by using prompt engineering techniques, you can provide more specific instructions or constraints that will tailor the generated descriptions to the target audience or brand style. So with prompt engineering if you input a query such as create a product descriptions for a Budget friendly
smartphone perfect for the young professionals highlights it's affordable sleek and packed with a top-notch camera features and the generated response would be something like this. Introducing our sleek and affordable smartphone designed for young professionals with its stylish design and advanced camera features capturing life's moments and have never been easier and it goes on giving its key features along with it. So through this Example we understood that prompt engineering enables the creation of a product description that is useful to the target audience and highlight specific features based on the instruction provided. So this shows how prompt
engineering can improve the importance and effectiveness of AI generated content for specific applications. To help AI models give accurate answers, it's important to create clear prompts. So here are some Simple rules for generating effective prompts. First, make it clear. So clearly explain what you want the AI to do. Unclear prompts might confuse the AI and lead to wrong answers. So make sure that the prompts is clear. For example, the unclear prompts is something like write about cars. So where we have not mentioned which type of car or anything much in details whereas the clear prompt
is write a description of a red convertible sports car. Next give Context. So provide enough information so that AIS understands the task. So this helps it give accurate response that makes sense in the given situation. So for example, prompt without context is write a story. Prompt with context is write a story about a girl who discovers a magic book in her attic. Next, show examples. Use examples to show the AI what you are looking for. So this helps it understand the type of response you want. So for example, the prompt without Example is describe a
beat scene. So prompts with examples is describe a beat scene with the palm trees, crashing weaves, and people playing volleyball. Next is keep it short. So don't overload the AI with too much information. Short prompts help the AI focus and give quicker, more accurate responses. For example, long prompts are like this. Write a detailed essay discussing the impact of climate change on biodiversity and ecosystems in tropical rainforest. And short prompts look something like this. Write about climate change effects on rainforest. Next, avoid biases. So, make sure your prompts are fair and don't include any unfair
assumptions. So, biased prompts can lead to biased answers which isn't helpful. So, for example, write about a woman who struggles with her weight. So unbiased prompts are right about a person overcoming challenges. Next, set limits. So tell the AI any rules or restrictions It needs to follow. This helps guide its response and ensures they meet your specific needs. For example, prompt without limits are write a story and prompt with limits are write a story set in a haunted house with a maximum word count of 500 words. And I hope it's very clear. Next, moving on
to some example of prompts for generating text using chat GPT. For text generation task, prompts usually consists of a textual instructions or starting point that Directs the model to produce coherent and relevant text. Prompts can be story prompts, questions, or incomplete sentences. Text generation prompts provide context and directions to the model, allowing it to generate humanlike text responses. They influence the generated text tone, style, and context. So let's say the prompt is write a short story about a character who discovers a hidden treasure. So by providing a specific story line and theme in the Prompt,
the model is guided to generate a coherent and engaging narrative centered around the discovery of a hidden treasure. So the picture illustrate how Chad GPT crafts stories with the engaging touch making them more captivating and interesting for readers. Next question answering. So prompt is can you describe the common signs and symptoms of COVID 19 along with any precautions that can be taken to stay safe and just like that it can generate Answers to all your questions in mere seconds. So by framing the prompt as a question the model is directed to provide a concise answer
regarding the symptoms of COVID 19 ensuring relevant and informative responses. Next, language translation. Translate the given English sentence. The quick grown fox jumps over the lazy dog into Spanish while maintaining its original meaning. So, by specifying the source and target language in the prompt along with the Input sentence, the model is instructed to perform a precise translation task ensuring accurate language conversion. Next, code autocomp completion using OpenAI codeex or Tajik. you can perform code auto completion task. So here we go with TPD. Code generation prompts are usually partial code snippets or descriptions of programming task.
They specify the desired functionality or behavior that the model should show. Code generation prompts allow the model To generate code that satisfy specific programming requirements such as implementing algorithms, defining functions, or solving coding problems. So the prompt is complete the following Python function to calculate the factorial of a number and here you have also added the function. So by presenting an incomplete code snippet along with clear instructions the model is directed to suggest appropriate code completion helping developers write code More efficiently. Now moving on to the text to image generation. Image generation prompts specify the
visual sense, objects or concept that the model should generate. They may include textual descriptions, keywords or images. So image generation prompts allow the model on what visual content to generate. They influence the generated images, composition, style and detail. For example, the prompt is imagine a tree where the branches are Made of stacks of books. So can you paint me a picture of that? And for the given prompt, we got the image generated as something like this. An imaginative portrayal of a tree with branches composed of stack books. Eight book representing a leaf and covers visible.
And the next prompt is picture a cloud in the sky that looks like a huge heart. Can you draw that for me? And here we go. These AI tools leverage prompt engineering techniques to generate text, Perform language translation, code auto completion, and text to image generation, demonstrating the versatility and power of prompt based on interactions with AI models. Next, why is machine learning useful in prompt engineering? Machine learning is very helpful in prompt engineering especially in linguistic and language models because it helps create better prompts and interactions by analyzing lots of data and finding patterns.
So first Understanding language patterns. Machine learning algorithms can analyze large amounts of text to understand linguistic patterns like grammar, syntax, semantics and context. So this understanding is critical for developing effective prompts that generate desired responses from language models. Next, generating relevant prompts. Machine learning models can suggest or generate prompts based on input data and user preferences. These prompts can be Tailored to specific task, domains, or user requirements, making them more useful and efficient for guiding language models. Next, optimizing prompts design. Machine learning techniques can be used to optimize prompt design by comparing the performance of
various prompts and selecting the one that produce the best result. This iterative process improves prompt engineering practices and the overall performance of language models. And the next is personalizing interactions. Machine learning enables personalized interaction by creating prompts to individuals users preferences, history and context. This personalization increase user engagement and satisfaction with the language model interaction. Next, improving model performance. Machine learning algorithms can be used to fine-tune language models based on prompt response pass increasing their performance and accuracy over Time. Language model can be trained on a variety of data set and prompts to produce more
relevant and contextually appropriate responses. And next, mitigating bias and misinformation. Machine learning techniques can help identify and mitigate preferences in prompt engineering by examining prompt responses pairs for potential biases or inaccuracies. Language models can produce more fair, inclusive, and reliable results by Detecting and correcting for preferences. And I hope it is clear why machine learning is useful in prompt engineering. [Music] Now let's answer the fundamental question that is what exactly is generative AI? Generative AI refers to algorithm capable of creating new content whether text, images, audio or even videos. It's like having a creative AI
assistant that can take a simple Input and produce engaging outputs. For example, GPT and llama can write essays or code while image generation models like DAL e and stable diffusion can visualize unique scenes from descriptions. But let's look at some of the popular tools driving this innovation. Well, some of the standard tools in generative AI includes GitHub copilot which assists developers with code suggestions and charg for text based interactions. Image generation tools like stable diffusion and midjourney helps creators bring visual concepts to life. Google's Gemini merges text and image capabilities while Adobe Firefly extends AI's
reach to creative souls. So if you want to know how to use these tools then check out our generative AI examples video link in the description. So you might wonder where are these tools being applied. Now let's explore them. Generative AI is transforming multiple Creative fields. Image generation tools power visual design. Music compositions algorithm create original scores and AI assist video editors in automatic task. LLMs help generate and translate text while code generation tools like GitHub copilot boost developer efficiency. AI generated voices are even being used in audio books and voice assistants. So now let's
take some of these tools and check. So this time we will use Ptory AI and Flicky AI. First let's explore Ptory AI. So for that let's go to its site and check its functions. So we are at the Ptory AI site. And on the left side we have the home project and brand kits. And on the main screen we have different features Ptory AI provides. So let's choose text to video. Here let's write some names and description and press generate. Pictory AI is a tool designed for video creators that helps transform long- form content such
as articles or blog post Into short engaging videos. It uses AI to automatically extract key highlights and create professionallook videos with minimal efforts. Due to its simplicity and time-saving capabilities, Ptory AI is a popular for social media content creation and marketing. Now let's see our next tool which is Flicky AI. So now we are at the flicky.ai site. Here we have different features like videos where you can create videos from all of these blogs, prompts etc. You can also Create audios from these features and then we also have a design feature. And on the left
hand side you can see options like files, templates, brand kits, voice clones etc. So now let's take an idea and convert it into a video. Now let's write our topic and generate. Flicky AI is a content creation tool that turns text into videos using AI generated voices and visuals. It helps users create professional videos quickly by pairing Written content with the stock images, animations, and voiceovers. Flicky is ideal for marketers, content creators, and educators looking to create engaging video content efficiently. Now that we have seen the applications, so let's step back and look at the
journey that brought us here. So basically our journey starts in 1947 with Alan Turing's concept of intelligent machines. By 1961, Joseph Venbomb introduced ELA, the first chatbot. The 1980s saw the birth of recurrent neural networks while 1997 brought long short-term memory networks to tackle sequential data and then GANs emerged in 2014 transforming creative task. Fast forward to 2017 when transformers like GPT entered the scene. By 2023, GPT 3.5 and Google's palm marked significant milestones. And by 2025, we are on the brink of AI breakthroughs in chemistry and genome editing. So what exactly are these LLMs
and why are they so powerful? An LLM or large language models analyzes and understands natural language using machine learning. Examples include OpenAIS GPT, Google Spal, and Metas Lama. These models drive applications such as chatbots, language translation, and more by learning from extensive data to predict and generate text sequences. But before this, there was a very famous term called language model. A language model is a machine learning model that uses probability, statistics, and Mathematics to predict the next sequence of words. Suppose you have a sentence like I have a boy who is my dash. Here if
we ask a language model to predict the next word, it considers the context provided by the words before the blank. Based on common usage patterns from its training data, it may predict words like boyfriend, brother or friend, which fit naturally. However, it's less likely to predict colleague or sibling as those words may not commonly follow these type Of phrases. So this process shows how language models predict text by calculating probabilities for each possible word based on their likelihood in context. So when a language model is trained on massive amounts of diverse text, it gains a
wider vocabulary and more understanding of language enabling it to make more accurate predictions. For example, if we give it a phrase like you are a dash to me, a model trained on Extensive data might suggest various fitting words. for example, friend, inspiration or anything else. So based on the sentiment or context, it has learned from the data. Now here reinforcement learning is used to improve the model's responses over time. By giving feedbacks, be it positive or negative on the responses, we help the model learn which type of responses are preferred in specific context. For example,
if the model frequently Misinterprets the tone or intent, the reinforcement learning helps adjust its productions to be more contextually appropriate and aligned with the intended meaning. But what do these models look like under the hood? Well, LLMs are built on neural networks composed of input, hidden, and output layers. The hidden layer process information to learn complex patterns and more layers means the model can capture deeper insights. This structure Allows LLM to perform task from generating text to complex code completions. Now how do these layers interact and function in real time? Now LLM is based on
the transformer and a transformer uses deep learning to process any information coming to it. Now let me tell you a story of three friends. Imagine we have three characters. First is our friend. The next character is Minion Bob. And the third character is Gru. So our friend Asks Bob, "What's the price of the jet? It must be $50,000." Minion Bob isn't sure. So he goes to Gru and asks, "Is the jet $50,000?" Gru replies, "No, it's $70,000." In this back and forth, Minion Bob is like the neural network layer trying to make an accurate guess.
So each time he goes back to group like receiving more data or feedback he gets corrected if his guess is wrong leading him to refine his response. Now after the first check Minion Bob returns to our friend saying I guess it's more than $60,000. Our friend assumes it might be around $65,000 and sends Bob back to group to verify. Again group corrects him no it's actually $70,000. So this process repeats with Bob adjusting his guess each time. Eventually he learns that the correct answer is $70,000 and updates his knowledge. So just like minion Bob, neural
networks make initial guesses Based on available information with each feedback loop like Bob going back to group. The model's hidden layers adjust the parameters to refine its guesses ultimately arriving at the most accurate prediction possible. So after getting corrected multiple times, Min and Bob's guesses improve until he knows the price is $70,000. Similarly, in a neural network, gradually learning the correct answer through training. So once the network Learns, it can give accurate answers in future cases without checking every time. Now let us move on to understand how LLMs work. LLMs begin the collection of data
sets, then tokenize text and break it into a manageable pieces. Using a transformer architecture, they process the data sequence all at once, leveraging vast training data. LMS contain millions of learn parameters that predict the text tokens and generate coherent outputs. Models often Undergo pre-training for general knowledge and fine-tuning for specific task. So now let's see some practical uses of LLM. LLM power content generation, creating anything from articles to code. They excel in language translation, enhanced search engines, personalized recommendation, code development assistance, and sentiment analysis, which also owe much to LLM's predictive capabilities. So guys, are
you ready to Use all that knowledge in coding and witness how these LLMs come together to drive innovation? Whether through developing applications, analyzing data or building smart assistance, the gear of technology keep turning to unlock AI's full potential. So now let us look at our problem statement. So one of the difficulties in the healthcare industry is effectively evaluating medical pictures such as MRIs, CT scans and X-rays in order to identify anomalies And illnesses. This procedure takes a lot of time and calls from specialized understanding. Automated methods must be developed to help medical personnel recognize possible
health problems in medical imaging. In order to provide better patient care, a system that integrates cuttingedge machine learning models with image analysis can greatly help in the early detection of diseases including cancer, infections, and other illnesses. So, the method uses Generative AI to evaluate medical photos and generate a thorough diagnosis report based on the findings. This technology allows users to upload medical images which the AI model then processes. Now let us build our project on a medical image analysis application using streamlit Python and an LLM of Google Gemini AI. So this app helps healthare professional
analyze medical images such as X-rays, MRIs and CT scans to detect anomalies and diseases. First let's Import the necessary libraries. So first import streamllet as st. So if this is not working or showing an error then open the terminal and write pip install streamllet and from path lib import path. Next import google dot generative AI as gen AI. So we are importing streamllet for the app interface and path from path lip for handling file paths and Google Generative AI which allows us to interact with the Gemini AI model. Next we will configure Google's Gemini API
by setting up our API key. So this will allow us to connect to the AI model and generate insights from medical images. So before proceeding let's get our API key and we will go to the Google to generate an API key. So on your left there is an API key option and after clicking you will get the create API option. So just select Your model and create your API key. So as you can see the screen just copy this API key and go back to terminal. So now let's configure our model. So just type gel
AI dot configure and inside the bracket give API key equal to and over here paste the key. Now we set up the system prompt which defines the role of the AI model. So the prompt specifies that our AI is a medical image analysis system capable of detecting diseases like cancer, Cardiovascular issues, neurological conditions and more. So guys I have already researched the prompts and written here. So basically the system prompt should be inside the triple quotes. So this prompt guides the model to analyze medical images for conditions such as cancer, fractures, infections and more making
it a valuable tool for healthcare professionals. Now let's configure the model settings for Generating responses. We define parameters like temperature and top K to control the creativity of the model's output. First type generation_config equal to and inside the double quote we will give temperature which is 1 then top_p which is 0.95 next top k 40 Then max output tokens which is 819 92 next response_m type which is of text or plane. So over here the temperature one that controls randomness a value of one given balanced output diversity. Next top P 0.95 uses nucleus sampling selecting
tokens from the top 25% cumulative probability distribution for diverse responses. Next, the top K 40 which limits token selection to the top 40 tokens based on the probability. Narrowing possible outputs to high probability tokens. Next, max output token. This setting allows for longer responses by limiting the maximum length of the generated text to 8,192 tokens. And then we have response m type which specifies the format of the output as plain text. So for more information read the Google Gemini documentation. Next we will also configure safety settings to ensure that the model doesn't generate harmful content.
So for Example we block categories like harassment, hate speech and sexual explicit content. Here we are using two things. First categories and then the threshold. Then copy this four times like harassment, hate speech and sexual explicit content. Now let's set up the layout for our streamlit application. So for that we will configure the title and the layout of the page and even add a logo to make the interface more user friendly. So first type st dot set Page_config and inside the bracket let's give page title equal to and inside the double quotes we will give
diagnostic analytics comma page icon equal to robot now let us type column 1 comma column 2 comma column 3 is equal to st dot columns and inside the bracket give 1 comma 2a 1 1 2a 1 next with column 2 so I'll be using edurea and medical images so this Will show you how to set up images using streaml now type st dot image and give a bracket and inside the double quotes let's type edurea dotpng and give a comma and give width is equal to 200. Now let us copy and paste it for medical.
So let's type medical.png. Here we are using streamllets column to center the logo and title and this makes the app look professional and visually Appealing. Next, let's allow the user to upload medical images for analysis. So, we use Streamlits file uploader widget to accept image file in PNG, JPG or JPEG formats. For that, let's type upload file equal to ST dot file uploader and inside the bracket inside the double quotes, let's type please upload the medical images for analysis. Comma type is equal to so basically the image type is equal to and inside the bracket
Inside the double quotes let's give PNG comma jpg and jpeg next let us type submit button equal to st dotbutton and inside the bracket let's give generate image analysis is. So here when the user uploads a file and click the generate image analysis button, the model process the image and prepare it for analysis. So once the user submit the image, we send it to the AI model for analysis and then the model Generates a response based on the prompt and image which we then display in the app. So here as you can see the screen
we have another function. So the if submit button which runs the code when the submit button is pressed. Next the image data is equal to upload file.get value. This actually gets the raw image data from the uploaded file. And next we have the image parts where it creates a list with the image data in a structured format. Then we have the prompt parts. So this combines the image data and a text prompt for the model. So this part of the code actually sends the image and text prompt to the model to generate a response. And
then we have the st.right which displays the model's responses in the app. So here we use the image data and system prompts to generate content with the Gemini AI model. The result is displayed as a detailed report with insights about the medical image. Now it's time to test the code. So open the Terminal and type streamllet run main. py. So once you enter it will redirect you to our model interface. And there you go. So the model is ready. So here's a live demo of the app. We will upload a sample image and the app
will analyze it and provide a detailed diagnosis based on the AI models inside. So this is how we use streamlate and Google's Gemini AI model to create a medical image analysis app. So this app can help medical Practitioners by offering precise and thorough analysis of medical photos. Now it is the time for testing. So let's take one image of any disease and test it. So upload the image from your computer. Then we will select an image and press the generate button. So as you can see it's running. So it generates fabulous response and can help
doctors in assisting their patients saving time and money. So this Is how we built a realtime medical diagnostic helper using Streamlit Python and Google Gemini AI. [Music] AI is transforming the way we interact with technology and two key players in this revolution are LLM and SLMs. LLM stands for large language models whereas SLM stands for small language models. LLMs like GP4 and Gemini 2.0 are massive models trained on huge data sets capable of generating highly sophisticated and Nuanced responses. On the other hand, SLMs like Dist or Tiny GPT are smaller, more efficient models designed for
faster and more lightweight task. So, understanding the differences between them is crucial for selecting the right model for your needs. Now, let's dive right in with our first question. What exactly are LLMs and SLMs? LLMs which are large language models are powerful AI systems trained on vast data sets offering deep contextual understanding And sophisticated responses. So models like GPT4 and Gemini 2.0 are the examples whereas SLMs like dist or tiny GPD are streamlined for speed and efficiency exceling in lightweight task. So both serve distinct purposes balancing quality cost and performance. All right. Now that we
have got a good idea of what LLMs and SLMs are, let's talk about why this comparison is so important. As AI adoption grows across industries, the choice between LLM and SLMs becomes more important. LLMs offer deep contextual understanding and complex outputs while SLMs provide efficiency and speed. So choosing the wrong model can lead to excessive cost, slow performance or supple results. And by understanding the strengths and trade-offs, you can make more informed decision and optimize your AIdriven solution. So now let's dive into the core differences between LLM and SLMs and see what sets them apart.
So first Let us compare in terms of model size and complexity. So when it comes to model size and complexity, LLMs often have billions of parameters and require vast computational resources to train and run. Their large size enables them to generate high quality context rich responses. And on the other hand, SLMs are designed with fewer parameters often in millions making them lighter and faster. They prioritize efficiency over complexity which makes them ideal for Simpler task. Next, let us compare in terms of performance and output quality. So when it comes to performance and output quality, LLMs
are known for their exceptional ability to handle complex conversations, creative writing, and deep analysis. Their vast training data ensures diverse and sophisticated responses. On the other hand, while SLMs are efficient, they may sometimes struggle with nuanced or open-ended queries. However, they excel in Straightforward well-defined task. Next, let's compare them with speed and latency. When it comes to speed and latency, LMS can experience longer response time and higher latency due to their large size, especially when processing extensive input data. Whereas SLMs are designed for speed, offering quicker responses and making them well suited for real-time applications
where low latency is fusion. Next, in terms of cost and resource efficiency. So when it Comes to cost and resource efficiency, LN require significant hardware investments such as powerful GPUs and extensive cloud resources which lead to higher operational costs. Whereas SLMs with the smaller footprints are more affordable to deploy and maintain making them accessible even with limited computational resources. Now let us explore the real world use cases of LLM and SLM. LLMs are ideal for creative content generation, customer service Chat bots with advanced capabilities, deep data analysis, and long form conversations. On the other hand,
SLMs are perfect for lightweight virtual assistance, realtime customer support, simple automation and tasks that require quick turnaround times. Now, let us see its advantages and disadvantages of using LLM and SLMs. The key advantages of LLMs include their superior understanding of complex language. The ability to generate high quality nuance Responses and better generation across wide range of diverse task. The main drawbacks of LLMs are their high computational and cost demands along with slower response times due to their large size and complexity. Now let us have a look at the advantages of SLMs. SLMs offers several advantages
including their speed and efficiency, lower operational cost and easier deployment even on limited resources. The primary disadvantages of SLMs are their limited Contextual understanding and their tendency to struggle with complex open-ended queries. Now that we have explored the strengths and limitations, so let's take a look at what the future holds for LLMs and SLMs in AI development. So both LLMs and SLMs will play vital role in the future of AI. We can expect ongoing improvements in efficiency, quality and adaptability. Hybrid approaches that combine the strengths of both models could become More common offering balanced performance
and scalability. So the conclusion we get is that the choice between LLM and SLMs depends on your specific needs. So if you prioritize depth, nuance and high quality output, LLMs are the best. So if speed, efficiency, and cost are more important, SLMs are the way to go. So by understanding their strengths and limitations, you can select the right model and unlock AI's full potential for Your projects. [Music] Imagine the world just a few years back when technology quietly advanced in the background. Then suddenly generative AI hit the headlines. Media channels everywhere were a buzz with
articles exploring the capabilities and potential of this new wave of technology. The real tipping point came in March 2023 when OpenAI launched GP4, a model so advanced it could outperform 90% of human test Takers on the SAT, which determines college admission in the US. However, GPT4's capabilities extended far beyond academics. OpenAI revealed that it also excelled in fields like law and medicine, taking test and demonstrating proficiency in knowledge intensive domains. Within just 2 months of its release, Chad GPT powered by GPD4 had captivated over 100 million users. This unprecedented adaption made waves sparking discussions on
AI's role in the Future of work, communication, and knowledge sharing. Yet alongside the fascination came a fair share of concerns. Experts began to speculate about the future. Could AI evolution hit a plateau by 2030? The excitement of this advancement was tempered by reports predicting that AI could significantly impact the job market as tools like charge GPT found real world application in areas as high stakes as legal trials where lawyers were reportedly using Large language models to assist in cases. In today's transformative era, it's clear that generative AI is reshaping our world. So what exactly is
generative AI and how does it work? More importantly, what does the rise of GPT4 means for us and where might it lead? So, let's examine some real world application and see how they work. Generative AI is at the core of many revolutionary applications today. We have text generation. From producing Entire articles to summarizing content, tools like GP4 are transforming content creation across industries. Next, language translation. AI powered translation tools are improving cross language communications by understanding context. Then writing assistance. Grammarly are similar tools refine grammar, tone and clarity, assisting professionals and student alike. Next we
have business AI models are making business insights accessible, automating Support and enhancing decision making. Next, music generation. AI is now venturing into creativity, composing unique tracks and musical elements. Finally, machine learning models. Platforms like H2O.AI are giving access to machine learning models, allowing users without deep expertise to create powerful models. Now that we understood the potential of generative AI, and now let's go deeper into how it actually works. So to understand how generative AI operates, let's break down the process. First define objective. So start with a clear goal whether it's generating text, creating an image
or assisting with code. Next gather and preprocess data. So collect and prepare data ensuring it's clean and structured with the model. Then choose appropriate model. So select or design a model tailored to your needs. Sometimes building on pre-existing models. Next, train the model. Feed data into the Model so it can learn patterns and build into knowledge base. Next, evaluate and refine. So, fine-tune the model as needed to optimize its efficiency and accuracy. Then, test and validate. Run test to measure performance and accuracy ensuring it align with the objectives. And finally, deploy and iterate. So, once
ready, deploy the model and continue refining it with user feedback and data. And this cycle ensures generative AI models stay relevant and Improve over time. Now moving on to the examples of generative AI tools. So many generative AI tools are available today each with its own specialtity. Tools like GitHub copilot for coding, DALI 3 for image generation and advanced language models like GPT are among the top layers. And if you're curious to explore these tools further, check out the video link in the description covering popular generative AI examples. Now let's look at the growing presence
Of generative AI across different sectors. First in healthcare, generative AI is projected to reach a 17.2 billion market by 2032, transforming clinical applications and healthcare systems. Next, education. The AIdriven education market is expanding, especially for students, teachers, and administrators, making personalized learning more accessible. and then workspace. Generative AI adaption is rising with the highest impact in marketing and tech Industries followed by sectors like consulting and healthcare. Each graph shows a significant trend as generative AI is becoming integral in diverse fields and reshaping workplace roles. As we look ahead, generative AI is set to transform even
more areas. And here are some key impacts we can expect in AIdriven creativity. From art to music, AI will open new creative horizons. Next, AI personalizations. Tailored user experience will become the norm. Then Real time generation. Realtime content generation will improve virtual assistance and automated responses. Next, AI in architecture. AI will assist architects in design and material optimization. Then human AI collaboration. As AI matures, humans and AI will work in tandemss to maximize productivity and innovation. Then advanced AI models. We will see even more sophisticated models pushing the boundaries of what AI can achieve. Generative
AI's future is promising. So with potential benefits that will enhance lives and drive economic growth. Now, are you guys ready to get hands-on? Stick around for a mini LLM project where we will build a YouTube video summarizer. We will show you how to extract video transcript and then we will use an LLM to generate summaries and build a user-friendly interface using Streamlit. Are you excited? So, now let's jump in. So, first things First, we need a solid environment for our project. First, open your terminal and let's create a new cond environment to keep everything organized.
Let's run the code using VS Code. You can also use other code editors such as PyCharm, but let's use VS Code for now. Now, in the terminal, let's type the command for setting up the environment in your editor. For that, run this command. Just type create - p virtual environment which is v nv python And equal equal to we are using 3.10 which is the python version and give hyphen y. Here the hyphen p v and v specifies the path and the environment name while the hyphen y skips prompt for a smoother install. So now
while that's setting up let's create a few essential files. So first we will create a env file for our API keys and environment variables. Next we will create a requirements.txt file for the libraries we will need Such as YouTube transcript API to extract transcript from YouTube and streamlit for our front end. Then Google generative for accessing the Google Gemini API. also the Python env for handling environment variables and part lip for the better part management. Now with our files in place, let's set up the Google Gemini API access. Now head over to the makers.google.com and
as you can see on the screen in the top left corner, you will get the API Key interface and once you click that, it will redirect us to the API key interface. Here you can see a button which is create API key. So simply click on that and select your model and press create API key in the existing project and then your API key will be generated. Now copy your API key and once you have got the API key open your environment file and add it there. So for that let's create a variable Google API
Key. Over here we will paste the API key. So once that is done back in the terminal activate your new environment with the command activate virtual environment back slash which is venv. Since I've already installed in my system it's not taking much time. So while you are installing it might take little time. Now let us install requirements.txt Terminal. And for that the command is pip install - r requirements txt. So once you enter the files present in the requirements txt will get installed. Awesome. So now let's move to the main code setup. So for that
open app. py and start with imports. First let us import some important libraries. So for that import stream list as st from env Import load env. And next load env which will load environment variables. And next let's import google.generative as genai and also import os. and from YouTube transcript API, import YouTube transcript API. So let's go to the YouTube transcript API and check if you're doing it correctly because in some system it Doesn't work. So you can simply go here and copy this command and paste it into your terminal. Now let's move on to configure
the API key. So for that just type genai dot configure and inside the bracket just type API key equal to OS dot get env and inside the bracket let's add the Google API key here. Now to prompt a model we will use a template like this. So simply type Please summarize this YouTube video transcript in 250 words or less highlighting key points. Now moving on to extracting YouTube transcript. So for that to fetch the transcript we will create a function. So here in this code as you can see on the screen the function extract transcript
details takes the YouTube URL as an input and retrieves the transcript of the video if available. First, it extracts the video ID from the URL by splitting the URL at The equal sign and taking the second part and using YouTube transcript API dot get transcript video ID, it fetches the transcript data for the video ID and it then combines the text from each part of the transcript into a single string and if there is an error like example no transcript available, it prints the error and returns none. So this function effectively converts a YouTube video
URL into its textual transcript. Next, let's write a function to generate the Summary. Here the generate Gemini content function generates the content based on the combination of transcript text and a prompt. So it first initializes a generative AI model called Gemini and then the model creates a content processing the combined input of prompt and transcript text and finally it returns the generated text from the model's response. So this function effectively uses the Gemini model to produce AI generated content based on The specific text inputs. Now let's move on to building the front end. Now to
connect it all with streaml first add a button label get detailed notes. So when clicked it prompts the user to enter a YouTube link in a text input field and it uses the extract transcript details YouTube link to get video transcript. So if the transcript is successfully retrieved, it generates a detailed summary with generate Gemini content transcript text or prompt. So finally it Displays the summary under the headings detailed summary. Now let's give a finishing touch to our app. So for that let's make it look great. You can add headers and also you can give
a footer and maybe you can also add a YouTube icon to it and even customize colors and incorporating thumbnails if the link is valid will create an even richer experience. Now let us test the app. So finally let's run a command streamlit run app. py. As you can see on the screen our app is successfully running. And now let's check if it's running fine. So for that let's open our YouTube and here select a video that you want a summary of. So copy the link paste a YouTube link into the app and hit generate. As
you can see on the screen it is running and in just a second you will get the summary of the video. It has given us the summary of the video. Also, there is no limit to the app and It will consider even the longer videos. And that's it. With just a few lines of code, we created a powerful YouTube summarizer using Streamlit and Google Gemini. Have you ever wondered about employing AI models for code generation? These models help with a task like software development automation by converting natural languages into executable code. Let's explore the principles
and examples of prompt engineering which Helps to improve software development processes by enabling efficient code generation. What is prompt engineering for code generation? Prompt engineering is a process that creates a specific prompts or instructions for AI language models to generate a code snippets or scripts. It involves defining objects, using relevant keywords, providing examples and being specific and concise. This process enhances the accuracy, efficiency, and relevance of code Generation tasks performed by AI models. understanding how prompts LLMS can lead to more powerful and efficient applications. Now let's understand the principles of prompt engineering. These principles provide
a basic guidelines that can create a consistently used to increase prompt engineering effectiveness when it comes to code generation tasks. First one is clarify objective and understand task or goal. And second one is utilize Keywords and specificity. And the third one is provide examples for context. Next one is conciseness and relevance. And the last one is encourage creativity and adaptability. Let's understand them in brief. First one is clarify objective and understand task or goal. Here understanding what you want from code output including inputs, outputs, evaluation criteria and any constraints or difficulties is essential before creating
a prompt. It is easier to Develop prompts that accurately guide the model towards a desired outcome where there is a clarity. And the second one is utilize keywords and specificity. Including a appropriate keyword in a prompt helps to communicate the specificis of the task to the model. By avoiding inconsistency and using a clear language and instructions, you can make sure that the model produces a precise and focused code rather than requesting a function to process data. For example, Be explicit about the kind of data and expected actions. And the next one is provide examples for
the context. The model can better understand the expected output format and functionality by referring to the examples. Prompts are made more understandable by providing a specific examples of the desired code which helps the models to understand the task. This will increase the probability of producing a code that is in align with the expectation. And next one is Conciseness and relevance. The prompts needs to be brief concentrating on relevant information that is crucial to the assignment and excluding unnecessary informations. Code generation is made more efficient by the model. Simplified decision making process and clear and concise
prompts reduces the confusion. Removing irrelevant informations lowers noise and improves the timely efficiency. And the last one is encourage creativity and adaptability. Flexible prompt formulation allows for experimentation with the various strategies such as linguistic structures, constraints or templates, continuous improvements in prompt by tracking a model outputs and iteratively improving prompts. This design creativity maximizes the code generation results by adapting to a various scenarios. Now how prompt engineering is employed in various tools for code generations. First one is GitHub Copilot. Based on given prompts, GitHub copilot suggest completions, creates documentations and suggest new features to help
developers write code. And second one is Google AI code dincy. This helps developers to write code in a variety of programming languages by using prompt engineering producing code snippets in line with a predefined prompts facilitating a variety of task from web development to a natural language processing and machine Learning. And the third one is open AI codeex. Codex assist developers with the coding task in a variety of domains such as data science, web development, and game development by utilizing prompts engineering. It creates a code in a number of programming languages based on the precise instructions
that users provide. Now, prompt engineering is crucial for guiding AI models in generating code accurately. Let's explore practical examples across Different complexity levels. First we will try for universal starter code that is hello world program in Java. So for that we have to give a prompt like generate a hello world program in Java. Hit the enter button. You will get a code of hello world program in Java. Next we will look into the basics one that is sum of two numbers. For this we have to give a prompt like Generate a function in Python that
takes two numbers as input and returns their sum. So now you can see here the Python code is generated with a function name add numbers. So now we have seen how easy level task works. Let's move on to the medium level examples. We'll try for to turn the commands into code. First we'll create a list of countries and then Generate a list of their respective capitals. After that merge the list to create a dictionary mapping each country to its capital. To get this we have to give a prompt as generate Python code to create a
list of countries and generate their corresponding capitals and combine them into a Dictionary. Mapping countries to capitals. Hit the enter button. Here is the generated Python code for given prompt. Here you can see the country's name and also generated a corresponding capitals. So this function define generate capital which gave us dictionary mapping countries to capitals. Next one complete function or next line. If I want to complete a function to calculate the area of rectangle, then we have to give A prompt as write a Python function named calculate rectangle area that takes the two parameter as
length and width and returns the area of rectangle. And to include the comments, we just have to type it as include comments to explain each step of the function. So in this code you can see the function Name which we have given in the prompt that is calculate rectangle area with the parameters length and width. You can also see the comments here. If you use this code, you can get a area of rectangle value. Next, we will try for MySQL code generation. To get a names of employees, we have to give a prompt like generate
a MySQL query to retract the names of all employees from the employee table. This also generated a MySQL query with a select statement. You can see here the last example is about how to get a explanation of generated code. To get explanation of a code, you have to give a prompt as provide a line by line explanation of the Python function named calculate factorial which takes a parameter yen and returns the factorial of y. Here in this code you can see a function name so-called calculate factorial which we mentioned in our prompt. After that you
can see a line by line explanation of a code. This is how you can get the explanation of a code. [Music] Imagine [Music] how it would be for you if you got a virtual site pair alongside you while you're coding. The site pair is helping You to automatically generate code and improve your code by making it faster and more efficient. You can chat with him. You can ask questions, ask suggestions and much much more. Sounds good, right? Well, GitHub copilot is that AI site pair of yours that makes it all possible. It is an AI
coding assistant that helps you to write code faster and with less efforts, allowing you to focus more energy on problem solving and collaboration. GitHub Copilot is proven to provide 55% faster coding and also proven to increase developers productivity and accelerate the pace of software development. If we take a look at the industry standards, then we can see that around 50,000 plus businesses have adopted GitHub copilot. One in three Fortune 500 companies use GitHub copilot and 55% of developers preference GitHub copilot. Now if you want to learn more about this and you want to know how
to use this amazing AI Tool then you just clicked on the right video. Now very firstly let's check how you can install the GitHub copilot into your system. So very firstly we have opened our visual studio code and in order to install the GitHub copilot go to the extensions and as an extension type GitHub copilot. You can see over here now I have already installed GitHub copilot in my system but over here you can just click on the install button and it will start Installing in your system. After that once you have installed GitHub copilot
you have to create an account in the GitHub. So over here you can see the GitHub link. Click on that and we'll redirect it to a page of GitHub. Now I've already installed GitHub. Now one more thing comes is that this GitHub copilot needs a paid subscription. So if you want to check the paid subscription for the GitHub copilot, we can visit this particular website. I'll be putting The website in the description. You can check it out from there. Now once you come to this website which is the GitHub copilot official website you can scroll
down and over here you can check the subscription plan for GitHub copilot for the $10 you can start a free trial over here then according to your usage you can check whichever plan you want. So once we have installed getup copilot and we have subscribed to the getup copilot it's time for us to use the gup copilot For our coding. So once you're done with the installation part of GitHub copilot, you can check this icon over here of GitHub copilot. This icon basically puts that your GitHub copilot is active and it's ready to run. And
in case if you don't see this icon, just restart your Visual Studio Code. And once you restart, you're going to see this icon over here. Now I have already created a folder of GitHub Copilot in which we are going to store our files in which we are Going to check the capabilities of GitHub Copilot. So before we jump into the coding part, let me show you something interesting. So for example, let me create a Python file. So I'll put edurea dot python. Now if I put a comment over here, comment and if I put a
question like what is inheritance in Python. So as you can see that it is already predicting my question. I'll put enter and it's going to generate an Answer for me. You can see the answer over here. If I want to accept that answer, I have to just click on tab button and for the convenience I'll put alt + z and over here you can check the answer for this particular question. Inheritance is a mechanism in which one class requires a property of another class and has also given us an example. Now if I check another
question so see over here it's also predicting my next question. It's already asking example of Inheritance in Python. So if I accept that I would enter and it gave me the example of inheritance. It also gave me a piece of code. So for now I won't get into the coding part. So this is how you can check that copilot is also good in predicting our next questions and predicting our next moves. So this is how you can also put a Q&A with GU copilot. So now let's move to the coding part. Let me make a
index.html file. I'm going to put the tags over here. Then I'm going to put the title as let's say edure and in the body let's say if I make a container. Now over here you can also see the H1 and par that GitHub copilot is suggesting us for the title edure. So the text which is appearing over here is called as a ghost text. Now if I want to accept this ghost text I have to click on the tab and if you just want to reject just click on escape button. So for this it has
already given an h1 and A par for this I'm going to put alt + z to put it in a better format. Now let's add a stylesheet into that. So if I put style dot CSS and in style dot CSS I want H1 tag as let's say blue in color. Now I have to link the stylesheet into a HTML file. So for that it's already giving a code for us. So if I click on tab button it's going to link the stylesheet. And then if we run this whole file you can see it has applied
the stylesheet. It has given the heading And blue color welcome to and also given us the text. So here you can see how Gup copilot is helping us with HTML and CSS. Now let's check some other capabilities and features of GitHub copilot. So after playing with the HTML and CSS using GitHub copilot let's check some more interesting features in GitHub copilot. So again we'll go to the py file which we created in the initial stages of our tutorial and you can see this option oftrl + i. Now if you press ctrl + i It's going
to open an option of inline chart feature in github copile. So let's say we give it a prompt of generate a code for calculating the number of days between two dates. Let's keep it simple. Once you press enter, it will start generating the code snippet for you. Now if you are satisfied with the code snippet, just click on exit. I can see the code Snippet is appearing in your code editor. Now let's say there is some error in this particular code. So let's say if I remove this end date from here and I don't know
what is the error in this particular piece of code. How to find it? Now in order to find this G copilot helps you with this particular feature of fix this. Now if I select the whole code right click I'll go to copilot and if I click on the fix this option it's going to fix the whole code By giving you the suggestion and giving you the solution for this particular problem that you are facing. So it already says that your problem is with the function is expecting one argument but two are provided. So if I
accept this you can see again it puted the last argument over here which is of end date. Now get of copilot sometimes gives the accurate code snippet which you want and sometime it might differ from what you Actually want. Now in order to do that just select the whole code and putt controlless enter. Now once you press control plus enter you can see GitHub copilot coming up with a lot of suggestions for this particular piece of code. Now if you're satisfied with any of the suggestion you can just accept the suggestions and it's going to
implement the particular suggestion for your code. Now let's check one more feature. Now you can even ask a copilot To explain the whole code separately. Now in order to do that again go to the copilot and go to this option of explain this. Now once you click on the explain this option. Now you can see in the chat box it comes up with the whole explanation of this particular code. Now this chat box is very much similar to the other AI chat boards that you use like chat GPT or Google Germany or Google board. Now
you can even ask for more questions to this chat box. So Let's say if I ask him write a code for bubbles algorithm. Let's see. So here you can see that is coming up with a code snippet of bubbles. Now this is very much similar to what we do in chat GPT or other AI bots like Google Germany and all. But the main feature is that this chatbot is appearing in your code editor and you can just directly copy paste this particular piece of code. You don't need to go to the separate browser then you
Have to copy paste the whole code from there. So in short it makes your job more easy. Now to make it visually more appealing you can even drag this chat box anywhere in the code editor. For example if I put it over here you can see the chat box appearing over here. or you can make it appear anywhere in the code editor according to your convenience. Now after checking this basic features, let's check how this features of GitHub copilot actually help Us while we build something. So for now let's try to make a simple chatbot
using Python with open AI API and let's see how quickly we can complete building this chatbot. So very firstly we're going to start by importing OpenAI library. Now to install this OpenAI, you have to go to your terminal and type pip install OpenAI. So after that, let's put our API key. And now you can see that GitHub copilot is already ready with its Suggestions in the form of a ghost text. So we're going to type and let me change my API key. Now in case if you don't know how to generate the openi keys then
you can just simply visit the openi website and over here in the platforms you can generate your API key. I'll be putting this link in the description. You can go to this website and make your API keys. So I'm going to copy my API key and then I'm going to paste it over here. Then let's make a Function of def chat with GPT. And you can see once we write the function it's already ready with the code and in this case we exactly want the same code response equal openti completion create engine 3.5 instruct exactly
prompt is from max tokens is 150 decent enough now what is this code about what is this function about let's understand now this function will generate text based on the input prompt using open AI's language model. The parameters for the completion Model include the engine, prompt, and the max token. This engine basically specifies which version of the language model to use. In this case, it's using the GPT3.5 Turbo Instruct engine. And then it comes to the prompt. Now, this prompt is a text provided to the model to generate a response. It's what the user wants
to chat about or to get information on. Then we have the max token. Now, this parameter limits the number of tokens in the generated Response. Here it is set to 150. It means that response won't be too long. Now once the response is received from the open API, the function returns the generated text. The dot choice.extrip part extracts the generated text from the response object and removes any extra white spaces from beginning and the end. Now let's move forward and create the main function. So we going to put if name dot main. And you can
see again it came with the host text which Is exactly I want. Now what is this main function? Let me explain you. Now over here the code first check if it's being run directly. Then it enters a loop where it continuously prompt the user for input. If the user inputs an exit command the loop breaks otherwise it prints a user input and the bot responses. So now let's go and run our chatbot. We're going to run it in the terminal. So over here I'm going to ask who are You? So over here you can see
the generated response. It's like I'm opening SGB3 language model program to assist you with a variety of this. Okay great. So you can see that our chatbot is working. Let's say one more question of like what is the difference between a class and a object. Let's say again it came with a answer. A class is a template or blueprint that defines the characteristics and behaviors of a type Object where an object is an instance of class. So it typically answers the question which you want. Now you already witnessed that how easily we build this chatbot
with just a few clicks by accepting the recommendations from the GitHub copilot. Now after the chatbot let's also try to make a linear regression model for us. So we'll start off by importing our required libraries. So firstly I'm going to start by import Numpy. It is already showing me over here. I'm going to click on tab. Then I don't need torch but from scikitlearn I need to import the data sets and the linear model and then from scikitlearn I need mean square error. Yes, I do need mean squed error. So I'm going to accept that
and then I will start by loading the diabetes data sets which it's already showing me over here. So I'm going to tab and then it's going to give me a code. So again I'm going to click On tab. So again I'm going to click on tab. Now what I want is yeah this is exactly what I want. I just wanted to use only one feature of it. So I'm again I'm going to click on tab enter. It's going to give me a code for that. It's already did its slicing and then I'm going to print
it. So print diabetes X and let's check the data set. This is the exact data set which we wanted or this one feature we are taking To train our model. So I'm going to delete that. I'm going to move forward by building our model. So after that we have to split the data into training and test. It already knows what we are planning to do. Put enter. Yes. So over here it is taking the first 80 elements for the training data set. So I was like so I'm okay with that. And then for testing it's
taking the last 20. I'm even okay with that. Then for target I need training and testing. Yes. Again I'm going to split the target into training and testing. So diabetes by train diabetes by test. Exactly what I want. And then I'm finally going to create the linear regression object or the model. So as you can see I'm just writing the comments and it is already showing me the code for that. So for this particular model I don't even have to code a single line or rarely maybe a Line or two I have to code but
everything get copilot is suggesting me. So I'm going to click on tab then I have to train my model exactly what I wanted to do enter. So it's going to fit diabetes extreme diabetes by train enter and after that I'm going to make some predictions again exactly enter. So, diabetes by predict. Good. I'm going to predict the X testing set. So, this is exactly what I want. And then I also want the coefficients. It's giving me the code to print the coefficients. And then again, the mean squed error I want. It's giving the code for
mean squared error. Tab enter. Tab enter. And then I'm going to give the plot outputs. For that, we need the plt.scatter. Exactly. And then plt.plot plot for that one straight line and then I want plot to show plow. So a linear regression model is ready and as you can see how much coding I did it by myself or manually get copilot Made the job as easy as it can be. So I'm going to run the python file in the terminal. So you saw how conveniently and quickly we made this project using GitHub copilot. However, these
were just the basic projects we built in order to give you an idea about GitHub copilot. [Music] Embarking on the creation of AI persona chatbots opens up a thrilling and financially rewarding chapter in the Realm of artificial intelligence chatbots. This innovative venture stand outs because it normalizes the field of AI removing the barrier of technical expertise. In other words, you don't need to be a programmer or have any coding background to dive into this creative process. Platforms like Flow Wise are at the forefront of this revolution, offering intuitive tools that simplify the creation of this
sophisticated chat bots. With such Platforms, the process becomes accessible to everyone, empowering users to bring to life digital avatars of well-known personalities, celebrities or influencers. These virtual entities can serve various roles acting as personal assistant ready to manage task or offering guidance and tailored advice to users needs. Firstly, we need to equip our systems with some tools. So, let's proceed with installing flow wise. Now, in order to install flow wise, we need To visit the flowise official website. So, let's check that out. So, I'm going to type flow wise. Okay. So, here's the official website
of the flow wise. I'm also going to add this link to the description. You guys can also access it from there. Then in this official website, you can see the GitHub link over here. So we'll go on GitHub. Then we'll scroll down and here we see the quick start option and this quick start we have all the Steps to start with the flow wise. So firstly it says to install NodeJS. So we'll do that. So over here based on your system you can just download the NodeJS. So I have already downloaded the NodeJS in my
system. So I'm not going to repeat the step but you guys can follow on that. Then again over here these are the commands which we have to type on a command prompt. And over here the first command that you see on your screen is to install the flow wise. Okay. I have already installed flow wise in my system but you guys have to follow the step if you are new into the flow wise. I have already installed a flow wise in my system. But for the first timers, you have to put this command in your
command prompt. So I will go directly with the start flow wise. So this command I'm going to copy and I'm going to put it on my command Prompt. You might have to wait for some time. Okay. So over here we can see the flow wise is listening at port 3000 and data source is being initialized. So after getting these two messages you can directly go to port 3000. So we'll go into that and here is the flow wise user interface in front of us. Okay. So very firstly we have to start gathering the data to
feed into our chatbot. Okay. So you can Choose any of the mediums. You can refer any blogs, any of the YouTube videos or anything. For us, we are going to take some Steve Harvey motivational videos. So, we'll go to YouTube and over here I'm going to type as Steve Harvey motivation. We'll try to look for longer videos because the larger the transcript is, the more accurate your data is going to be. So, this is pretty long. So, in order to download the transcripts, what you have to do is just copy the link of this video.
Copy. I'm going to mute it. Not this one. And then we need to go to the site YouTube transcripts. Then over here we need to paste a URL. Go. And over here you have the access to the Complete transcript. So what we're going to do is just copy the transcript from here. And then we need to save it to our system. So I've already prepared a folder called transcripts and you can see two transcripts I have already written. So you can see the transcripts in any of the documents. I have put it in text documents.
You can even prefer as PDFs or docs or anything. Now this was for the previous Chatboards that I have prepared. So let's delete those because I don't need them. And we'll prepare a new one. So, new text document I need and let's save it as Steve Harvey part one. Yes. So, over here I'm going to paste the entire transcript. Ctrl S. It got saved. Yeah. And we're ready to go. For this particular video, I'm going to take one more video of Steve Harvey. So, let's search one more video. This already took Any other. Yeah, this
one looks good. Just pause it for now. Copy link again to the same site. We're going to paste the URL. Yeah. And we going to copy the entire transcript. And again, we're going to go to our system, new text file. Let's give it Steve Harvey part two. Open. Ctrl + V control S. Yeah. And we're ready to go. So after downloading this transcript, let's go back to our flow wise. So here we have flow wise. Then I'm going to click on add new and here's the canvas where we are going to make our chatbot. So
in order to start that go to add nodes go for chains And here we have conversational retrieval QA chain just drag and drop it to the canvas. So this conversation retrieval QA chain is a tool that is used in creating chatbots which helps the chatbot to find and provide answer to the questions in a conversation. You can think of it like a library system inside the chatbot that helps in understanding what you asking and then search through its knowledge to give you best possible answer. This Chain is a sequence of steps that the chatbot follows
to make sure it understands the questions correctly and retrieves the right information to help you. And over here in the conversation retrieval QA chain you can see a chat model vector store retriever and memory as the inputs and the final output is a conversation retrieval QA chain. So let's find the input of these. Okay. So our first input is chat model. So we are going to go to add nodes And we'll look for chat models over here. And for this chat model we are going to choose chat open. Again drag and drop. We're going to
put it here. Now we can check out the output as chat open. We are going to connect its output to the input of conversational retrieval QA chain especially to the chat model section. Yes. Now let's check the second input which is vector store retrieval. So We're going to go to plus nodes. Then we're going to look for the vector stores and where is it? We need inmemory vectors too. This one. So drag and drop over here. Now this in memory vector store is actually a database that our chatbot is going to follow through. In this
document section particularly we are going to put our transcripts. So Let's connect its output to the vectors to retrie input of conversational retrieval Q. So as I already told you in this document section we are going to store the transcripts that we have downloaded. So how to do that? Again add nodes. Go to document luders and then select folder with files. Drag and drop. Put it over here. Output to the input. Now in the folder path section we have To put the path of our transcript. So over here C and again to flow wise folder
path Ctrl + V. Okay. Now we can also see one input as text splitters. So let's also take care of that. So we go down here we have text splitters and we're going to take cursive character text splitter. Drag and drop over here. The chunk size is already 1,000 which is good enough. And chunk Overlap let's put it to 200. Again it's output text splitter input of folders with files. Yeah. Now we have one more thing called embeddings. So we are also going to add embeddings. So okay over here we have embeddings and we have
open AI embeddings. We're going to put it over here. Yeah. So our chatbot is almost ready. So over here you can see this connect credentials spot. So let's also check That we have to add a credential and for that we are going to take the API keys of the open AI. How to do that? Let's check that out. So we are going to go at open website. So I'll take this platforms do openai accounts and API key. this one. Now for the API keys, so we are going to go to platform Openai. So this particular
link I'm going to paste it to the description and get it from there. And here we have the access to the API keys. So just click on create new secret key. You can type anything like test key or anything like that. Create secret key. and it's going to generate a secret key for you. So, I'm just going to copy that and then I'll come back to the blue wise. Yeah, I'm going to save it. Let's Save that as AI Steve Harvey. Save. Okay, our chat flow got saved. Back and go to credentials. Let's set this
one. Just go to add credentials. put here as open AAI API. No. And here it ask for credential names and OpenAI API key. So just paste your API key and let's put here as open AI add. Yeah. So here we have our credentials. Now again we are going to go to our chat flow And over here in the current credentials part we're going to paste as open yet one in our chat model and another one we have in our embedded section. Again we have open. So our chat flow is fully ready. So again we're going
to save it and then in Google section of chat. So it already shows a message. Hi there. Hi, can I help you? Firstly, I'm going to say hello. Now it's going to take some time and it's going to show error. Okay, it showed how hello can I assist You? I'll tell him to introduce yourself. Okay, I'm an AI assistant. I'm here to provide you with information assistant. So our chatbot is kind of working. But we want our chatbot to have a personality of Steve Harvey. How to do that? Let's check that out. Now, in order
to give that personality of Steve Harvey, let's go to the additional parameters of the retrieval QA chain. And over here, you have a space. Now, Put a prompt similar to like this. So, this is a prompt like your Steve Harvey and American television host. All this I've gathered from different sources like Wikipedia or like Steve Harvey personality blogs or anything like that and get it from there. So, I'm going to select it all. I'm going to copy and I'm going to paste it over here. You can also pause the screen and read the full prompt.
But what I want you to read is is the last line because it's important. So the last line it's like if you have no relevant information within the context just say hm I'm not sure or don't try to make up an answer never break the character. Again the same thing answer the user question as you are Steve Harvey and only answer questions found in the context. If you don't have any answer, just respond with something like I have no idea or could you please rephrase that or hm I'm not sure. So yeah, so this prompt
will help A model to stick to the relevant information and answer it as Steve Harvey. So again we are put Okay, so firstly we need to save it. Yeah, we saved it. chat again we're going to put something like hello okay hi there and again I will say introduce yourself okay so here you can see now I'm Steve Harvey and television host producer actor comedian I'm known for my hosting shows like family feud and all like Whatever we have given in the prompt so now I'll tell him to you know just tell me a joke.
Okay, sure thing. Here's a joke for you. Why did the scarecrow win an award? Because he was outstanding in this field. Okay, let's tell him. I need a motivation. What is I need a motivation. I need some motivation. I'll tell as I am feel very lazy. So here we have our answer. Don't worry, I've got you covered. Remember, success requires a tremendous work ethic and faith. Imagination is the key to achieve your dream. So dream big, believe in yourself and take action to make those dreams a reality. You have the potential within you to achieve
great things. Keep pushing forward. Okay. So it is working properly. So our chatbot actually got a personality of Steve Harvey. [Music] Let us understand what lang is and why it is a valuable tool for building AI applications. You must be aware of popular applications such as GPT and Gemini. These applications utilize APIs and GPT uses Open AI's API while Gemini operates through the Gemini API. To process prompts, they leverage models like GPD 3.5, GPD 4, Palm and Gemini 1. Additionally, these are other advanced models such as Llama, Gemini, Cohair, Cloud version one, Falcon, Palm, GPT4,
And GPT3.5. Langchain is a framework designed to help developers build flexible and powerful AIdriven applications by integrating and utilizing these diverse models effectively. But why exactly do we need lang? You must be thinking if lang is this important then why do we need langchain? So let's break down this question using some real world examples. So imagine simply asking an LLM a prompt and getting an answer. That's easy. But What happens when the complexity increases? For example, let's say you're working with data from SQL databases, CSV files, PDFs, or Google Analytics, and you need the model
to write code, perform searches, or send emails. Handling such intricate workflows manually can get overwhelming. This is where Lang steps in. It simplifies the process by offering components like document loaders, text splitters, vector databases, prompt templates, and tools. So this helps you assemble tasks such as document summarization, question and answer systems or even advanced workflows like Google searches or customer support automation. Let's visualize this process with a diagram. Here's how it works. So first you load a document like a CSV file using a document loader. Then use a text splitter to divide it into a
smaller chunks and then store those chunks into a vector database and add a prompt Template to guide the model. And finally, use a LLM like a GP4 or LMA to perform tasks like searching the web or automating workflows. And lang chain also offers chains that will help you assemble components to achieve single task such as summarization and an agenda to figure out what each component must do like password, customer services, etc. Now that we understand Langchain's core components, now let's explore how it streamlines the LLM application life Cycle. So it typically involves three key stages.
First is the development where you build and test your application. Then productionization where the system is fine-tuned for a real world use. And finally deployment where the final product is launched for users. So Langon simplifies this life cycle allowing you to focus on building without worrying about the underlying complexity. Now let's take a step back and understand The role of APIs in powering these L&M applications and how LinkedIn effectively integrates them. In all these applications and models, one thing is common that is they use API. So now let's discuss APIs. APIs act as an intermediaries
that enable different systems to communicate with each other. For example, they allow apps like Swiggy or Blinket to display your delivery driver's location in real time. So now let's look at the steps to explain APIs And API keys. So apps like Zipto, Swiggy and Blinket use APIs to show the location of your delivery driver. So these apps don't communicate directly with Google Maps but follow a layer process involving servers and security mechanism. First the app sends a request to Google Maps API. Then the API forward the request to Google servers. Then the servers validate the
request with the system. So once approved the response follows back through the servers, APIs And finally to the app. So previously apps like Swiggy allowed login using phone numbers. Now they use API for login via platforms like Google or Facebook. So this demonstrates the versatility of a APIs in enabling seamless user interactions. To prevent misuse, APIs require API keys which are unique identifiers for secure access. So this keys authenticate request and ensure that only authorized users can interact with the APIs. Next, security Systems closely monitor API usage to detect and prevent misuse. This ensures that
APIs remain safe and functional for their intended purpose. And these steps simplify the So let's explore some real world applications of lang chain. So what can you build with lang chain? Here are few applications. First application we have is customer support. So, customer support for your shopping websites to interact with customers. Next, conversational chat bots for Helping you study. Content generation tools for blogs or social media. We also have question answering systems for knowledge bases and then document summarizers for legal or academic content. Lenin simplifies AI development by integrating LLM with various data sources and
tools. Its applications are vast from chat bots to document summarization. So let's examine a practical example to see lang chain in action. All right. In today's datadriven World, understanding and effectively using SQL queries is crucial for managing and analyzing large data sets. However, beginners and even experienced users often need help with complex SQL queries, their syntax, and how they work. This creates a barrier to efficiently interacting with databases and limits their potential to solve real world problems. To address this challenge, we propose a SQL query fetcher application that leverages the Gemini AI, Python, and Streamlit
to simplify SQL learning and usage. The application allows users to input or select a query, generates the SQL syntax, and provides a detailed explanation of its components and functionality. This tool bridges the gap between technical understanding and real world database operations, empowering users with an initiative and interactive SQL learning experience. Let's jump right into the code. So the first step Is setting up your dependencies. Here we import streamlit for the user interface and then Google generative AI for using Gemini. So first import streamllet as SD and next import Google dot generative AI as Gen AI.
So to get this API you have to go to the Google Gemini API key and here click on get a Gemini API key in Google AI studio and then once you scroll there is a button on the left called create API. Now click on it and select your model Here and let's copy it. And now let's go back to our VS code editor and paste it here. So to paste let's type Google API key and inside the double quote let's paste it. And now let's type genai dot configure and inside the bracket let's keep it
as api key equal to and give it as google_appi Key. Now let's type model equal to genai dot generative model and inside the bracket let's keep it as gemini pro. So we use the Google Gemini API to generate SQL queries dynamically. So make sure to configure your API keys securely. Now let's display the streaml layout code. Now let's set up the app's user interface. So we use streaml to create an interactive page where users can Input plain English queries and get SQL code in return. So we write st dot set page_config and inside the bracket
let's give it as page title and inside the double quotes let's give a title as edureka sql query generator and give a comma and let's type it as page icon equal equal to and inside the double quote let's keep it as robot. Now let's put some images. So I'm using Edurea image and SQL logo and also to Make them center we will type it as column 1 comma column 2 comma column 3 equal to st dot columns and inside the bracket let's keep it as 1a 2a 1. Next, let us type width column 2 colon
and let's type it as st dot image and inside the bracket let's give the image address and then width is equal to 200. Now let us add another image. So let's copy the same and give the other image address. Our layout includes a title, logo and text input box to keep the interface simple and initiative. So here's where the magic happens. So when a user clicks the generate SQL query button, we format their input into a prompt for the Gemini model to generate SQL code. So let's create template by writing template equal to and inside
the triple quotes, let's type it as create uh SQL query snippet using the below text. Next, let us also give text input and We'll also type I just want a SQL query. Now let's type the response. So type response equal to model dot generate generate content and let's keep it as template dot format and inside the bracket let's give text_input equal to text_input and next let's type the SQL query. So give SQL query equal to response Dot text dot. So let's give the strip function dot lstrip function dot r strip function. So the AI generates
the SQL query and we clean up the output for display. So once the SQL query is ready, we take it a step further by generating a sample expected output and a clear explanation of the query. Now let's type the logic for showing explanation and output. So let's type st dot markdown and inside the bracket we will give HTML Tags. So first div style is equal to we will align the text and center. So text align center and next let's give H1 tag and inside H1 tag we will write SQL query generator and let's close the
H1 tag. Next, let's open H3 tag and write I can generate SQL queries for you. And let's close the H3 tag. And inside the H4 tag, let's type it as with explanation as well. Now close the H4 tag and let's open the paragraph tag which is the P tag. And Inside the P tag, let's type it as this tool allows you to generate SQL queries based on your data. Now let us close the P tag. Also close the div tag. Now to make the markdown visible, let us type unsafe allow HTML equal to true. Now
let's write text input equal to st.ext area and inside the bracket let's give it as enter your query here in plain English. Now let us give a submit button. So for that let us type submit button equal to st dot button and inside the bracket let us give generate SQL query. Now if submit button colon write it with st.spinner and inside the bracket let's keep generating SQL query and then let's create a template and inside the trible quotes let's type it as create a SQL query snippet using the Below text. Now using the about template
we will write three more templates for SQL query which are text input and then SQL query which will include expected output and also explanation output. Now to merge all the templates together we will make a container. So we will write with st.container. So it's a function and let us also write it as st dot success And inside the bracket let us give it as SQL query generated successfully also we will give here is your query below next st code and inside the bracket let us give SQL query Okay. And comma language equal to SQL. Now
let us give once again st dots success and inside this let us keep it as expected output of this query will be And now let us keep it as st dot markdown and inside the bracket a output once again st dots success and inside this let us keep it as explanation of this SQL query Next let us give st dot markdown and inside this function let us keep it as explanation. So over here this shows a green success message indicating the SQL query was generated successfully and next the show SQL query. This displays the SQL
query as a formatted code block Highlighting it as a SQL. Next is the display expected output. So this provides a success message for the query's expected output followed by st markdown e output which displays the expected output in markdown format and followed by st domarkdown e output which displays the expected output in the markdown format. So now this line of code introduce an explanation and st.mmarkdown explanation displays that it is in markdown format for clarity. So This makes the tool valuable for both learning and debugging SQL. So now let's see it in action. So open
the terminal and let us type streaml run and give your file name. Now as you can see the screen your SQL query generator is ready to go. Now let's test it. So for that here I will input a prompt asking for a query which is give me the query for create table. Now let's click on generate SQL query and as you can see it's running. So Let's wait for it to generate. So as you can see on the screen the app generates a SQL query expected output and even a plain English explanation in seconds. So
how cool is that right? And that's it. Our SQL query generator powered by line chain, Gemini API and streamlate is complete. So this project is perfect for simplifying SQL learning and enhancing productivity. [Music] Are you tired of AI illusion and ready For more accurate and informative AI responses? Then dive into the world of retrieval augmented generation. Rack is a hybrid approach in artificial intelligence that combines retrieval systems with generative models to produce highly accurate contextually relevant responses. It brings the gap between fractual accuracy and natural language generation. Now let's understand it with the help of
diagram. So it's a hybrid approach involving Artificial intelligence that combines a retrieval system with a generative system to produce highly accurate responses. Now that we know what RAG is, so let's explore why it is crucial for large language models and see a real world example. So rag addresses several limitations of traditional LLMs. It mitigates illusions by grounding responses in factual retrieved data by dynamically accessing up-to-date information. Rack stays relevant in Rapidly challenging domains. It improves accuracy and relevance by fetching specific relevant documents during inference. By outsourcing factual knowledge retrieval, RAG enables smaller, more efficient models
and it can adapt to domain specific knowledge bases for specialized applications. Additionally, rack provides explanability by showing the retrieved documents or data sources increasing trust and transparency. Now, let us see Some of the use cases. So without rag the sentence would be when was the last Mars rover launched. So this is just the incorrect response. So with rack the sentence would be dynamically retrieved from NASA's database and it would be the perseverance rover was launched on July 30, 2020. Now that we have seen why RAG is important. So let's dive into how it works. Well
rag operates in three-step process. A user submits a query which Triggers the retrieval stage. Here a retriever searches a database or knowledge base using tools like BM25 to fetch the most relevant information. The retrieved data is then fed into a generative model like GPT or T5 which process it and generates a coherent contextually grounded natural language response. Now let's take an example here. The query is who wrote 1984? Retrieve would be fetching a document containing George Orwell wrote 1984. Now Generative response would be the author of 1984 is George Orwell. This hybrid approach makes rack
ideal for real world applications like chat bots and knowledge systems. Now that we understand how rag works, let's explore some of its real world applications. Rack's versatile applications span various domains. In knowledge management, it can summarize large databases or documentation, aiding corporate teams. Legal and compliance Task benefits from RA's ability to answer queries based on case law and regulations. While in healthcare, it can support medical professionals by summarizing research papers and guidelines. Education and e-learning can leverage rack for virtual tutotoring providing detailed explanations based on the textbooks and research papers. Interactive virtual assistants like Alexa
and Siri can utilize Rack to generate accurate and informative Responses to user queries such as news headlines or product recommendations. Rack's unique ability to combine retrieval and generation makes it essential for task demanding both factual accuracy and fluent natural language responses. Now let's compare retrieval augmented generation with traditional AI model across three features. First we have fractual accuracy. Rack provides highly accurate responses by using realtime data whereas Traditional models may give less accurate answers and may give errors. Next is the context adaptability. So here Drag adapts quickly to new queries using live data whereas traditional
models offer fixed answers based only on pre-trained knowledge. Next we have knowledge updates. Rank is easy to update. Just change its data source. Whereas traditional models need retraining which takes time. Then we have scalability. Whereas traditional Models are limited by day size and training data. And then we have use cases. Rag is great for task like legal advice or customer support. Whereas traditional models work well for creative rating or casual queries. So here I want to conclude that rag is ideal for knowledge based task needing accuracy and flexibility while traditional models are better for creative
users. While rag offers significant advantages, it's essential To acknowledge its limitations. So let's discuss the challenges and future of rack. So the first challenge is the latency. Rack systems can suffer from latency issues especially when dealing with large data sets or complex queries. Next is the data quality dependency. The quality of the generated responses heavily depends on the quality of the underlying data. The next challenge is complex integration. Integrating React systems with existing applications and Infrastructure can be challenging due to the need for data synchronization, query optimization and model management. And finally, scalability issues. As
RA systems becomes more complex and are deployed at scale, they can face scalability issues. This includes handling increased query loads, maintaining data freshness, and ensuring model performance. Now, while rack faces limitations, its potential is undeniable. So now let's discuss Rag's Future. The future of Rag holds immense potential. It will power dynamic real-time applications like new summarization, financial analytics, and live sports commentary. Rag will be customized for specific domains like healthcare, law, and science through integrations with specialized knowledge bases. Advances in retrieval models and compression techniques will reduce latency to enhance efficiency. Rag will expand to
handle multimodel data Enabling use cases like multimedia question answering. Additionally, RAG will facilitate personalized AI assistant and improve transparency and explanability by attributing sources and providing clear explanations. Now let us move on to generative AI project using rack. So imagine you're working with a massive library of documents. You need a way to quickly search and answer question based on the content. So manually flipping through Pages takes time and effort. Wouldn't it be great to have a system that retrieves relevant information and answers your questions directly within those documents? So that's where our Streamlit app comes
in. This app utilizes the power of natural language processing and advanced retrieval techniques to turn your complex document collections into a powerful question and answer system. So let's take a look at the code behind this app. This app will allow users to Ask questions about a collection of PDFs and get answers directly from the documents using the power of natural language processing. Now, first let's create a virtual environment. Now, in the terminal, let's type the command for setting up the environment in your editor. For that, let's type create - p. Let's type v E Nv
Python and its version give equal equal to 3.10 - Y. Okay, let's enter. In this command, the hyphen PB env Specifies the path and the environment name while hyphen Y skips the prompts for a smoother install. Now, while that's setting up, let's create a few essential files. So let's activate your new environment with the command cond activate v e n d and forward slash. So as you can see our environment is ready. Now let's import libraries. So let's start by importing the libraries we will need. In the first Line we will import stream as st.
This gives us access to all the functionalities of the streamly for building our web app interface. So next we will import OS for various operating systems functionalities. After that now we will import libraries from lang which is a framework for building NLP pipelines. So we will use these for task like text splitting for document chain creation, prompting, retrieval and more. So we will explain Each library in detail as we use them. So let's type from langchen_group import chat group that is gr and next we will type from langin.ext spplitter import recursive character text splitter. So
let's type recursive character text splitter. Again let us type lang chain dot chains dot combine documents import Create staff documents chain again from lang chain core dop prompts let's import create create retrieval chain next import f import f ais f from langchain community dot vector stores. So this will help us to create a vector index for efficient document retrieval. So let us type from lchain community vector stores import f ais. Similar imports will follow for other functionalities like document loading and generating embedding but we will Introduce them as they appear in the code. But before
this go to the group cloud website and on your left you have API key option. So select and create your API key and copy this. And if you want to check your model then go to the playground and at the top right corner click on the llama model and check there are so many of them latest also. So choose your model and generate your free API. Now go to the terminal and paste it inv file Using variable group API key. Now again go to the Gemini AI studio. On your right you have the create API
option. So select your model and create your API key. Now copy the key and paste it into your environment variable that is the env file using a variable Google API key and paste it here. Now we will load environment variables from av file that will securely store our API keys. So for that use env to Achieve this. Let's type from env import load env. Also let's type load env function. Next we use os to retrieve the gro api key and google api key from the environment variables get env. So let us type gr api key
equal to os dot get env. And inside the function, let's type it as G OQ API key. And inside the single code, let us type gr OQ API key. And in the next line, let us type OS dot environ and and inside the bracket under double quotes, let us type Google API key and equal to OS dot get env let us type Google API key. So here these keys are the required to use specific NLP services. Now let us write code for displaying app title and images. So for that load your image. Since I'm using
edureka image name Edureka.png along with the app title edureka document question and answer we will use st. image and stitle for this purpose. So for that let us type st dot image. So inside the double quotes let us keep the image name and comma width is equal to 200 and let us also keep the title. So for that stitle and let us type edure document question and answers. Now the next step is to initialize chat group and prompt template. Now it's time to interact with The lang chain group API. So initialize the chat group object
using group API key and specify the llama 38b8192 which is the language model we will be using for our NLP task. So for that let us type lm equal to chat group and inside the bracket give the group key equal to group API key comma we will give the model name as well. So for that type model name equal to and inside the double quotes give the Model name. So here we are using llama 3 - 8b - 819. All right. Now let us define a prompt template using chat prompt template. So this template ensures
that AI responses are based on the context provided and user questions. So keeping answers accurate and concise. So for that we will type prompt equal to chat prompt template dot from template and inside the bracket let us paste the prompt. So here we have the prompt which says Please answer the question strictly based on the provided context. Also ensure the response is accurate, concise and directly addresses the question. Now let's create function for embedding vectors. For that let's define vector embedding function. So type def vector embedding function and give colon. Next in the next line
give if and under the double quotes give vectors not in st dot session state colon then type st dot session state dot Embeddings equal to Google generative AI embeddings give equal to Google generative AI embeddings AI caps and inside In the bracket give the model equal to and inside the double quotes let us type models forward slash embedding -001. Now make a folder where you will load your PDF. So I am creating ed PDF and paste your PDF here. Now set the session. So that is let us type dot Session state.loader loader equal to py
pdf directory loader. Here inside the double quotes let us paste the path of the pdf. Next is the data ingestion. For that let us type sd dot session_state do.d docs equal to std dot session state dot loader dot load function. So this particular line of code is for data injection and here this particular Line is for document loading. Next let us type st. session state dot text spplitter and give equal to recursive character text splitter and inside the bracket let us give chunk size and mention the size here I'll give equal to,000 and comma chunk_lap
is equal to 200. Now here these are for the chunk creation. Now let us type st dot session State dotfal documents equal to st dot session state dot textsplitter dotsplit documents. Now inside a bracket let us give stession state dot docs. Let us give bracket col 20. So this line of code is for splitting. Now let us type ST dot session state dot vectors equal to fis Dot from documents and inside the bracket let us again type st dot session state dotfal documents comma type st. session state dot embeddings. Okay. So this line of code
is for vector openi invarings. Now to input field for question let us type prompt one. So give prompt one equal to st.ext import and let us type here enter your questions from any document. Now to create a button to load Embeddings let us type if st dotbutton and inside the function let us give under the double quotes load edure db give colon and in the next line let us type vector embedding function next type dots success and the message would be edure db is ready for queries if the question is asked then if prompt one
is true then Type document_chain equal to create_star document chain and inside the bracket Let us give llm prompt and in the next line to retrieve let us type retriever equal to st dot session state dot vectors retriever function and in the next line let us type retrieval_chain equal to create retrieval_chain and inside the bracket let us give retriever document chain. Now to measure response time let us type start equal to time dot Process time function. So for response type response equal to retrieval_chain dot invoke and inside the bracket give input prompt one and in the
next line let us type response time equal to time dotprocess time function start. Next let us write code to display the response. So for that let us type st dot markdown and inside the bracket let Us keep it as AI response. Now in the next line let us type st dots success and inside the bracket give response and give answer inside the single quotes and in the next line write st dot write. Let us type f inside the bracket and and inside the flower bracket let us type as response time col 2f and seconds. Now
moving on let us write the code to display similar documents in an expander. So for that let us type with St.expander inside the bracket under double quotes type document similarity search results and give colon. And in the next line let us type st dom markdown and inside the bracket let us type it as below are the most relevant document chunks. So type below are the most relevant document chunks. Give colon inside the bracket. Close the double quotes and come to next line. Here let us type for i, dot in en in enumerate and inside the
Function give response dot get context. Now in the next line let us type st dot markdown and inside the bracket keep f and let us give the html tag which is div class is equal to card and open the p tag and inside the p tag let us keep doc dot page_c content and now close the p tag. Now let us close the div tag as well. Now let us come outside the triple code and give comma and type unsafe allow HTML equal to true. So you can also add inline styles and HTML tags and
also icons and emojis to make your application fabulous for the user. Now it's time for testing. For that open your terminal and write streamlit run and give your file name. So once you enter and there we go. Here's our document question and answer loader. Now select the question from the PDF you have loaded in the file and ask your loader. So as you can see this is my PDF. So I'm Going to copy some question from here. So let me just copy this. Okay copied. So I'm going to paste it here. So I'm going to
click on the load edure DB. So guys as you can see it provides an answer in context given in the PDF. So this is our answer that it has generated. So that's all we have used simple Python code and langin techniques of rack and some inline HTML and styles. [Music] Have you ever wondered how massive AI Models like TPD are managed and optimized? That's where LLM ops, which stands for large language model operations, comes in. LLM ops is a key to training, deploying, and scaling large AI models efficiently while keeping cost low and performance high.
It ensures faster responses, ethical AI, and seamless integration into real world applications. Large language model operations is a set of practices, tools and frameworks designed to efficiently Manage, deploy and maintain large language models like CHP, cler and Gemini in real world applications. Just like MLOps streamlines the development of machine learning models, LLM ops optimizes the life cycle of LLMs from data processing and training to deployment and monitoring. Now that you know what LLM ops is, so let's explore why it's important. As LLMs become widely integrated into business applications, customers support Chat bots, content generation tools,
and automation systems. They need to be continuously monitored and optimized. Without proper LLM ops practices, large language models can become inefficient, leading to slower response times and increased computational costs. So, they may also become unreliable, generating outdated or biased outputs that impact user trust and decision making. Additionally, these models can be difficult to scale and struggle to Handle increasingly user demand which can result in performance bottlenecks and degraded user experience. For example, imagine running strd like AI on a customer support chatbot. Without LLM ops, responses would be slow, repetitive, and expensive. LLM ops optimized the
entire workflow. So now that we understand why LLM ops is important, so let's take a look at how it differ from MLOps and what makes it unique. All right. So LLM ops is a Specialized branch of MLOps. But it is tailored for large scale language models rather than traditional machine learning models. So here are the key differences between LLM ops and MLOps. LLM ops differs from MLOps in several key aspects. So in terms of data complexity, LLM ops require vast amounts of diverse text data whereas MLOps typically works with structured or tableau data. Next, compute
power is another major differences as training LLM depends high performance GPUs and massive cloud resources while traditional ML models generally require lower compute power. And when it comes to real-time processing, LLM ops necessitate scalable deployment to handle continuous inference efficiently whereas MLOps often relies on batch processing or periodic inferences. Lastly, ethical and bias considerations are more prominent in LRM ops. requiring constant monitoring to detect and Mitigate biases and misleading outputs. Whereas bias monitoring in MLOps is important but generally less complex compared to LLMs. Next let us see how LLM ops works. So LLM ops follows
a structured workflow to ensure the efficient management of large language models. So it begins with data collection and pre-processing where large text data sets are cleaned and structured for training. Next, model training and fine-tuning help the AI Learn to understand and generate text effectively. Once trained, the model moves to deployment where it is run on cloud servers, edge devices or APIs for real world applications. And during inferences and optimization, the model's response speed is improved while minimizing computational cost. Next, monitoring and feedback loops play a crucial role in tracking performance and making adjustment based on
real world usage. Finally, continuous improvement Ensures the model remains relevant by updating it periodically with fresh data. And here are some real world examples. Companies like Open AI, Google and Meta use LLM ops to maintain their AI products without frequent manual retraining. So now that we understand how LLM ops works, so let's explore some of the popular tools and frameworks that make it possible to manage and optimize large language models efficiently. LLM ops professionally rely on specialized Tools to manage the model life cycle efficiently. So one of the top three most popular platforms is hugging
face, an open-source tool for NLP and transformer models. ML flows is widely used for tracking experiments, model versions, and training metrics. While CubeFlow provides a scalable MLOps framework for deploying AI in Kubernetes and companies use a combination of these tools to streamline their LLM ops pipelines and ensure smooth deployment. Now that we have covered the tools and frameworks used in LLM ops, next let's explore the career opportunities and the future prospects in this rapidly growing field. LLM ops is a rapidly growing field with a high demand for skilled professionals. A machine learning engineer focuses on
designing and optimizing LLM models, ensuring their frequency and effectiveness. An AI product manager oversees AI model deployment for businesses, ensuring Smooth integration into real world applications. The role of LLM ops engineer involves managing AI infrastructure and scaling models for optimal performance. And if you have a background in machine learning, cloud computing or DevOps, transitioning into LLM ops is a great move. So, LM ops plays a crucial role in managing large AI models efficiently, ensuring optimal performance, reduce cost and ethical AI development. By Leveraging top tools like hugging face, ML flow and cube flow, professionals can
streamline model training, deployment, and monitoring. And with the increasing adaption of AI across industries, career opportunities in LLM ops are booming, making it an exciting and rewarding field for AI enthusiast looking to build a future in artificial intelligence. And what do you think about LLM ops? Drop your answers in the comments. Agentic AI is transforming industries by Allowing machines to learn, adapt, and evolve independently. Similar to live organisms, unlike traditional AI, this intelligent agents investigate, optimize, and develop solutions over time without requiring direct human participation. Recent advancements include OpenAI's deep research, which automatically analyzes massive
amounts of data to provide detailed reports, and Google's Gemini 2.0, which improves AI's capacity To plan and reason across different data types. Service Now's AI agent orchestrator is transforming enterprise automation by coordinating many AI agents to address difficult business concerns. As these systems become more powerful, they have the potential to unlock ideas beyond the human imagination, ranging from wind turbine blade design to AIdriven company management. Let's start with our first topic. What is agentic AI? Agentic AI Denotes artificial intelligence systems capable of autonomously executing actions to attain designated objectives. Unlike reactive AI which only responds
to the inputs, agentic AI is proactive, capable of planning, adapting and making decisions autonomously. So let's explore deep into agentic AI and see its capabilities. Agentic AI is a type of artificial intelligence that exhibits autonomous behavior enabling it to take actions and operate without continuous Human guidance. It is goal-driven, actively working towards achieving specific objectives rather than passively responding to inputs like reactive AI. And with advanced decision-m capabilities, it can evaluate multiple options, select the optimal course of action based on current conditions and acquired knowledge and adapt its strategies dynamically in response to unforeseen changes
in its environment. Moreover, agentic AI Demonstrates proactiveness by taking the initiative to act rather than waiting for external triggers making it highly effective in dynamic and complex scenarios. Now let us see its relevance in the current AI market. When AI systems can act autonomously to accomplish predefined objectives, we call that agentic AI making it highly relevant in the current AI market. Its autonomy allows it to operate without continuous human guidance, making Decisions and adapting dynamically to achieve objectives. This capability is complemented by its advanced problem solving skills, enabling it to evaluate complex situations, strategize and
respond effectively to challenges. However, the growing adoption of agentic AI also rises important ethical considerations such as ensuring responsible behavior, minimizing unintended consequences and maintaining transparency in its decision-making Processes. Now that you know about agentic AI, so let us discuss how it differ from other AI systems. Agentic AI differs significantly from other AI systems in its autonomy, decision making and adaptability to achieve long-term goals. Unlike reactive AI which performs predefined task only when prompted such as spam filters or image classifiers, agentic AI takes the initiative and operates independently. It also contrast with the generative AI
which focuses on Creating content like chat GPT generating text but it is not goal-driven by combining autonomous behavior, strategic decision making and the ability to adapt dynamically. Agentic AI stands out as a powerful system designed to achieve specific objectives in evolving environments. Now since we know a bit of differences, let us see the comparison between generative AI and agentic AI. Generative AI and agentic AI differ in several key aspects That define their functionality and applications. Generative AI is primarily focused on creation, excelling in output focused tasks such as generating text, images or other form of
content. Its adaptability is limited as it relies heavily on prompts for guidance and lacks the ability to operate independently. In contrast, agentic AI emphasizes autonomy, making it goal-driven and capable of dynamically adapting to changing environments. Unlike the prompt dependent nature of generative AI, agentic AI is self-directed, enabling it to take the initiative and execute strategic task effectively. These differences highlight the complimentary roles of both AI types in addressing distinct challenges. Now let us see the impact of agentic AI on various industries. Agentic AI has had a profound impact across various industries transforming operations and solving
long-standing challenges. Autonomous logistics systems such as those in Amazon warehouses have significantly improved operational efficiency by 30 to 40%. In healthcare, AI enabled surgical robots like the Davinci system have performed over 10 million less invasive procedures worldwide, enhancing precision and patient outcomes. Scientific advancements have also been transformed by systems like Deep Minds Alpha Fold, which successfully solved the decades Old protein folding problem. On a global scale, the World Economic Forum predicts that by 2025, AI will displace 85 million jobs while creating 97 million new ones, reshaping the labor market. And in the energy sector, AI
powered smart grids can reduce electricity waste by up to 10%. Promoting greener energy solutions. Additionally, over 90 countries are investing in AI enabled military technology to modernize their defense systems, showcasing the Strategic importance of agentic AI in global security. Now, let us see the applications of agentic AI. Agentic AI is transforming various industries by enabling systems to make autonomous decisions, adapt to changing environments, and achieve specific goals. Autonomous vehicle powers self-driving cars and drones to navigate roads, avoid obstacles, and make realtime decisions as seen with Tesla autopilot and autonomous delivery Drones. In robotics, agentic AI
allows industries, healthcare, and exploration robots to perform complex task independently as demonstrated by Boston Dynamics robots used in logistics and rescue operations. Personalized virtual assistants like Google Assistant and Amazon Alexa leverage agentic AI to predict user needs, manage schedules, and execute task without direct commands. And in gaming, adaptive AI agents enhance the experience by Creating challenging humanlike opponents such as Alph Go and AI boards in the realtime strategy games. In healthcare, Agentic AI supports personalized treatments, accurate diagnostics, and surgical assistance with examples including AIdriven surgical robots and systems for remote patient monitoring. These applications demonstrate
the transformative potential of agentic AI across diverse domains. Agentic AI is making a significant impact across Various industries by enabling autonomy, adaptability, and efficiency in diverse applications. In finance, it powers algorithmic trading systems and fraud detection tools, optimizing financial operations such as managing investment portfolios and identifying fraudulent activities. In smart cities, AI systems manage energy consumptions, optimize traffic flow, and enhance public safety with examples like smart traffic lights adapting in real time and autonomous Energy grid optimization. In space exploration, autonomous spacecraft and planetary rovers such as NASA's Mars rovers perform exploration task independently. In education,
AI powered tutors like Carnegie Learning provide personalized instruction by adapting to individual learning styles. In military and defense, autonomous drones and surveillance system improves situational awareness and decision making such as AIdriven surveillance drones in defense Applications. Now let us see the challenges and risk associated with agentic AI. While agentic AI offers tremendous potential, it also faces several challenges and risk that must be addressed to ensure its safety and ethical deployment. So one key concern is misalignment with human goals where AI system may pursue objectives that conflict with human intentions due to poorly defined parameters or
intended unintended consequences such as Autonomous robot prioritizing efficiency over safety. Ethical questions arise regarding accountability and decision-m demonstrated by the challenge of determining who is responsible when an autonomous vehicle causes an accident. The complexity of decision-m in agentic AI can also lead to a lack of transparency making it difficult to understand or explain its actions particularly in sensitive fields like healthcare or finance. Ensuring safety And reliability is another challenge as AI systems must operate effectively in unpredictable environments such as autonomous drones encountering extreme weather or medical failures. Additionally, agentic AI systems often require substantial computational
resources making their deployment costly as seen in advanced robotics and self-driving cars. Security vulnerabilities pose further risk as autonomous systems could be targeted by Cyber attacks potentially leading to harmful consequences like the manipulation of autonomous vehicles. Lastly, overdependence on AI may reduce human oversight or lead to skill degradation in critical areas such as relying too heavily on autonomous systems for medical diagnosis without human validation. These challenges highlight the need for robust design, rigorous testing and ethical frameworks to mitigate risk and maximize the Benefits of agentic AI. Now let's see the future of agentic AI. The
future of agentic AI is set to be transformative with advancements across various domains influencing its deployment. Future systems will exhibit increased autonomy and adaptability, enabling them to make a complex decisions in real time and operate effectively in dynamic environments without human intervention. The integration of agentic AI with advanced technologies like quantum Computing, IoT, the edge computing will further enhance its capabilities allowing for faster decision making and realtime processing at the edge. These systems will have the widespread applications in sectors such as healthcare where they will enable autonomous medical diagnostics, personalized treatment plants and robotic surgery.
Climate action with advanced systems for environmental monitoring and response and space Exploration where smart rovers and spacecraft will carry out missions on their own. As these technologies evolve, ethical concerns and accountability will need to be addressed. promoting the development of regulatory frameworks to ensure responsive AI usage. Additionally, agentic AI will foster human AI collaboration, enhancing productivity and creativity in the fields such as education, engineering, and research. [Music] Imagine asking Chad GPT for a poem and it writes one instantly. Now think about an AI assistant planning your entire day, booking meetings, and even handling emails without
your constant input. That's the difference between generative AI which creates content and agentic AI which acts with autonomy making decisions. In 2025, as AI becomes more than just a tool, understanding the shift is very critical. Are we heading Towards just smarter chatbots or truly independent digital agents? Let's break it down through this video. Let's first break down what generative AI is. Generative AI is a type of artificial intelligence designed to create content, whether it's text, images, music, or even code. Instead of making decisions or even taking action on its own, it focuses on producing outputs
based on the patterns it has learned from the vast amounts of data. At its core, Generative AI models use deep learning techniques like transformers to generate new content that resembles human created work. For example, chat GPT generates humanlike text based on prompts. Midjenny and Deli creates stunning images from simple text description and GitHub copilots helps developers suggesting code snippets in real time. Generative AI has several strengths. It enhances creativity and productivity allowing artists, writers and Programmers to work faster and even more efficient. It scales effortlessly generating unlimited variation of content in just few seconds. It
also adopts responses based on user input, making interactions feel more personalized, but it also comes with few limitations. Generative AI lacks autonomy. It doesn't think or act on its own. It only responds when prompted. It has no real decision-m abilities and cannot evaluate consequences or make Even independent choices. Additionally, it can generate biased or inaccurate content based on the data that it has seen. While generative AI is powerful for creating, it cannot act independently. And that's where agentic AI comes in. Let's explore what agentic AI is. Agentic AI goes beyond just generating content. It acts
autonomously making decisions and executing tasks without the need of constant human input. Unlike generative AI which can Only responds to prompts, agentic AI can plan, adapt and take initiatives based on goals rather than the specific instructions. At its core, agent combines reasoning, memory, and decision making to operate more like an independent agent. It doesn't just create, it analyzes, strategize, and acts. Real world examples include autonomous robots, which navigates and complete the task on their own. AIdriven personal assistant like those managing Schedules, booking flights, and handling emails without human oversight. even self-driving cars which continuously assess
their environment and make split-second driving decisions. Agentic AI has its own strengths. It reduces the needs for manual intervention automating the complex workflows. It adapts to real world conditions, learning and improving overtime. It can even handle multi-step tasks that require planning, execution, and adjustment. But it also has its own Challenges. Developing truly autonomous AI requires significant advancements in reasoning and adaptability. There are certain risks including unintended behaviors and ethical concerns around AI which makes independent decisions. And unlike generative AI which focuses on creativity, agentic AI is limited in how well it can generate novel content.
So while generative AI creates and agentic AI acts, the real powers comes when these two work together. Let's see the Key differences between generative AI and agentic AI. Generative AI and agentic AI serve different purposes, each with unique strengths and applications. The key distinction comes down to creativity versus decision making. As previously discussed, generative AI focuses on producing content, whether it's text, image, or code. It enhances creativity by assisting writers, designers, and developers. But it lacks true autonomy. It only works when prompted and doesn't make any decision on its own. Agentic AI on the other
hand is designed for interactions and execution. Instead of just generating responses, it can analyze situations, make decisions, and take actions. While it may not create content like generative AI, it can manage workflows, automate tasks, and adapt to real world conditions. Another key difference is user dependency. Generative AI is entirely reactive, Meaning it requires human input to function. It waits for prompts before generating anything. In contrast, agentic AI is proactive. It can initiate actions independently, setting reminders, optimizing schedules, or even solving problems without human intervention. The applications of these AI types also differ. Generative AI is
widely used in content creating, marketing, entertaining, and software development. and agentic AI powers Autonomous system like self-driving cars, AI powered customer service and personal assistant that can handle complex workflows. Both AI types are transforming the industries. But when they work together, they unlock even greater potential. Imagine an AI that not only generates a marketing campaign, but also launches it, tracks engagement, and refine the strategy automatically. The future isn't just about choosing between generative AI and agentic AI. It's about combining them two to build truly intelligent systems. Now that we understand the key differences between these
two, let's explore the future of AI by asking will generative AI be replaced? As AI continues to evolve, one big question arises. Will agentic AI replace generative AI? Right now, generative AI is everywhere, helping people write, design, and code faster than ever before. But it has one major limitation. It relies entirely on human Input. Agentic AI on the other hand takes things further. It doesn't just generate, it decides, plans, and even acts. It's the next step towards the true autonomous intelligence. Does that means generative AI will be obsolete? Not necessarily. The future of AI isn't
about one replacing the other. It's about coexisting. Generative AI will keep getting more creative and even sophisticated, producing even higher quality content. Agentic AI will become Even more autonomous integrating deeper with industries like healthcare, finance and robotics. But this shift does comes with some risk. As AI takes on decision-m power, we face new challenges, ethical concerns, unintended consequences and the need for accountability. If an AI agent makes a bad decision, who is responsible? And how do we ensure it aligns with the human values? The answer lies in balance. The real future of AI Is hybrid
approach where generative AI fuels creativity and agentic AI drives intelligent action. Imagine an AI system that not only writes a research paper but also submits it to generals, responds to reviews and refine it automatically. And this is where we are headed. Not just smarter AI, but AI that truly works with us as both a creator and an agent. The question isn't whether agentic AI will replace generative AI. It's how we'll harness both to shape the Future of intelligence. Now that we have explored the differences between generative AI and agentric AI, let's move on to building
an intelligent AI agent that can interact with our database using natural language. This means you can simply ask a question like show me all the students who have scored about 80 and the agent will automatically convert it into an SQL query, fetch the data and return the exact result from the database. No need To write complex SQL queries manually. Just ask and the AI response. Let's dive in and build this powerful system. First, we need to set up a environment to manage our project dependency. To do this, we open the terminal and run the following
command. We'll write create p vv python equals to 3.10 to 10 - y. So, creates a new environment and hyphen pvnv specify the environment path as vv. Python equals to 3.10 installs Python version 3.10 inside the environment and hyphen y automatically confirms the installation without asking for approval. Once the process is complete, our virtual environment is ready and we can move forward with setting up our agentic AI project. Next, we'll create a file name requirements.txt where we'll list all the necessary libraries for our project. This will help us easily install dependencies in One go. Additionally,
we'll create a NV file to securely store our Google generative AI API key, keeping sensitive information separate from our main code. With these files in place, we ensure a well structured and organized setup for our agentic AI project. First, we will work with SQite, a lightweight self-contained database engine to create and manage a student database. Let's break it down step by step. So we'll create a file named SQL. Py and import the SQLite 3 module which allows us to work with SQLite databases. We'll write import SQLite 3. This module provides all the necessary functions to
create a database, insert records, retrieve data, and manage connections. Next, we create a connection to an SQLite database file named student. DB. We'll write connection equals to skite3 dot connect connection equals to skite3 doconnect in the bracket in double inverted comma Student db. If this file doesn't exist, SQL lightweight automatically created the connection object will allow us to interact with the database. Now we create a cursor object which is used to execute SQL commands in Python. We'll write cursor equals to connection cursor. Think of the cursor as a tool that helps us send queries to
the database and retrieve results. Now we define a SQL Command to create a table named student with four columns. We'll write table_info equals to triple inverted commas. Next we'll create a table. For that we'll write create table then student we'll write in the bracket name type vcar and we'll have 25 characters class type vcar and the same 25 characters section type vcar with 25 characters and marks type integer. Then we'll write Cursor.execute in the bracket table info. The name stores the students name string up to 25 characters. The class store the class's name and the
section stores the section of the student. And lastly, the mark stores the marks obtained as integer. Executing this commands creates the table in the database. Next, we insert five student records into the student table using SQL insert statements. I've already created and inserted five values In the table. You can create as much as you can. Each insert commands adds a new role with the students name, class, section and marks. Now we retrieve and display all records from the student table. For that we'll have to write print in the bracket print in the bracket the inserted
records are in the next line we'll write data equals to cursor do.executed executed in the bracket three single inverted comma select star from student closing the Inverted commas in the bracket then we'll write for row in data colon print in the bracket row the select star from student query fetches all the data from the table the for loop iterates through the records and prints them one by one and finally we commit our changes and close the database connection for that we'll connection and then connection.close. The dotcommit function ensures all the Changes are saved in the
database. The dot close closes the connection freeing up the system resources. And that's it. We have successfully created a student database, inserted records, and retrieved them using SQLite and Python. Now, let's build an interactive stream app that converts natural language questions into SQL queries using Google's Gemini model. It then retrieves data from an SQLite database and display the result. Let's break it down step by Step. But before we start, we have to activate the environment. For that, we'll write activate venv forward slash. And here our environment is activated. First, we'll create a file named app.
py and load environment variables using env. For that we'll write from env we'll import load env. Next we'll write load env. It will load all environment variables. This ensures that sensitive information such as API keys is securely stored and accessed. Next we import the Necessary modules. For that we'll write import streamlit as ST then import OS then import SQLite 3 and then import Google.generative AI as genai. Streamlight here powers the web interface. OS helps access the environment variables. SQLite 3 allows us to interact with the database and Google generative AI enables the conversion of natural
language into SQL queries. Now we configure the Google Gemini API key. But before that we'll Have to create a API key through Google studio itself. I've already generated one. You can create yours through Google studio itself. Then we'll write genai.configure in the bracket API_key equals to os do.get env key. This allows the app to use Gemini 1.5 Pro to generate SQL queries. Then we define a function to generate SQL queries from natural language input using Gemini. For that, we'll write Defaf get gemini response in the bracket question, prompt. Next we'll write model equals to genai
comma generative model in the bracket we'll write models/jna version 1.5 pro then we'll write response equals to model generate content in the bracket and in square brackets prompt in the square bracket zero and comma question and then we'll write return response text. The function initializes the Gemini model. It takes a Question and predefined prompt as input and the AI model generates an SQL query as output. Next, we define a function to execute SQL queries on the database and retrieve results. For that, we'll write deaf read_sql_query in the bracket SQL, DB. Next we'll write con equals
to escqite 3 dot connect in the bracket db. Then cur equals to con do.cursor and then cur equals to execute in the bracket sql. Then we'll write rows Equals to cur dot fetch call. Then con doit and then con.lo close and then we'll create a loop by writing for row in rows and then we'll print it and then return rows. The function connects to the student db database. It executes the given SQL's query and it fetches all the retrieve records and prints them. Now we define the AI prompt that instructs Gemini on how to convert
the questions into SQL queries. As you can see, I've already created a prompt For my own and you can create yours according to how you want your model to function. If you want the prompt which I've used over here, you can just comment on the video and I'll send it to you. This prompts ensures the Gemini AI generates SQL queries accurately without unnecessary text. Now we'll set page configuration with a title and icon. For that we'll write st set_page configuration in the bracket page title equals to SQL query generator edurea, Page icon. Then we'll display
the edureka logo and header. For that we'll write st dot image in the bracket 123.png, png comma width equals to let's keep it as 200 st dot markdown in the bracket logo plus ederica's gemini app/ your AI powered SQL assistant next we'll write next we'll write st.mmarkdown then the logo and ask any questions and I'll generate the SQL query for you the Page title and the icon are set a logo is displayed at the top and the app's purpose is to introduce to the user. And before we import the logo, just make sure that you
have the logo in your folder. We take user input for a natural language query. For that, we'll write question equals to st.ext_input in the bracket enter your query in plain English colon, key equals to input. This allows users to type their questions Such as show all students with marks above 80. A submit button triggers the SQL generation process and for that we'll write submit equals to ST dobutton in the bracket generate SQL query. When clicked, the app processes the query and retrieves the result. Now we define what happens when the submit button is clicked. For
that we'll write if submit in the next line response equals to get gemini response in the bracket question, prompt. This is to convert the question To SQL and then we'll print the response. Then we'll write response equals to read_sql_query in the bracket response, student db. And this is to execute SQL on the database. Then we'll write ST dots subheader in the bracket the response is brackets closed. Next we'll include a loop for then row in response. Then we'll write st dots subheader in the bracket the responses And then we'll include a loop for row in
response. Then we'll print row and then st do header and in the brackets row. The user's question is converted into an SQL query using Gemini AI. The SQL query is executed on the student DB database and the retrieve records are displayed on the streamllet app and that's it. The AI powered stream app allows users to ask natural language questions which are automatically converted into SQL queries and executed on a student database. Now Let's open the terminal and run our streamllet app. To do this, we simply type streamllet run app. py and hit enter. It's running
and as you can see, our agentic AI is up and running, ready to interact with our database. Let's test it by asking a simple question. We'll ask, give me the names of all the students. The AI processes our request, converts it into an SQL query, and retrieves the student names from the database. Perfect. As you can see, the Response is generated. Now, let's try another query. We'll say, give me the average of marks. And just like that, the AI calculates and returns the average marks. The response which is provided is 72.2. So in this video
we successfully built an agentic AI that can understand natural language generate SQL queries and interact with our data seamlessly. Have you seen how tools like chat GPT with vision can look at an image you Upload and describe it? Or how Dali and Midjourney can generate stunning images from just a text prompt? And now some AI models can even do both at the same time. They can see, read, listen, and even create all in one go. So how is that possible? Well, that's because of something called multimodel AI. AI that doesn't just work with one type
of data like only text or only images, but can understand and combine multiple types of information together just like we humans Do. So first let's break down the word multimodel. So multi means many and model refers to the modes of information like text, images, sound or video. So multimodel AI is an AI that can understand and work with multiple types of data at the same time. For example, a single AI model that can read text, look at images, listen to audio, watch videos, and combine all of this to give a better answer. It sounds a
bit like how humans process information, right? So, why do we need multimodel AI? So, think about how we interact with the world. If you're watching a movie, you're seeing visuals, listening to dialogue, and understanding the story together. Or when you're explaining a recipe to someone, you might show pictures, describe steps, and maybe even play a video. So, humans naturally combine different scenes to understand things. So, old AI models were single model. They could only process one type Of data. Like a text model could only read and write and a vision model could only look at
images. But real world problems are not just text or just images. They are mixed. So multimodel AI bridges this gap and it lets AI connect the dots between text, visuals, audio and more. So how does multimodel AI work? In simple terms, it works like this. It takes different types of input. For example, it could take a photo and a text question about that photo. Then it Converts them into a common language inside the AI model. So think of it like translating text, images and audio into one shared understanding. Next, it reasons over all the data
together. Then it gives you a smart answer that considers all the inputs. So for example, you show AI a picture of a dog and asks what breed is this? So it looks at the image, understands the features and responds that looks like a golden retriever. So it's combining vision plus Language to answer. Now let us go through a working diagram of a full multimodel pipeline. So as you can see the screen first it takes different inputs. It could be a text image or even a video. Then it encoders for each modality. Later these inputs will
be translated into common AI language. Then a multimodel transformer uses cross attention to connect relationship across text, images and audio. And finally the model generates a response. So let me Take another example to explain this diagram. So as you can see we have different inputs. So the model can take text, images, audio or even video as input. Next is the encoders for each modality. That means a text encoder converts words into vectors and an image encoder converts pixels into vectors. And then an audio encoder converts sound waves into vectors. Next is the shared embedding space
where all the different inputs are translated Into a common AI language which is a vector space where similar meanings are closed together. For example, the word car and a picture of a car are mapped close together. Next is the fusion plus reasoning layer where a multimodel transformer uses cross attention to connect relationship across text, images and audio. For example, it links the word red to the red region of the car image. Next is the output generation. So finally, the model generates a response Which could be text, a caption, an image like deli or even sound.
All right, I hope this is clear now. So now let's look at some real world examples that make it easier to understand. So first we have chat GPD with vision. So if you upload an image to chat GPD and ask what's in this picture then it can describe the objects text or even analyze data like a chart. So that's multimodel AI. It's using both image understanding and text generation Together. The next example is Google Lens. So when you point your camera at something, Google Lens can recognize the object, read the text in the image and
translate into another language. Again, it's a vision plus language plus translation all in one model. The next example could be a self-driving cars. So, autonomous cars like Teslas uses multimodel AI because they have to see the road through cameras, read traffic signals, hear alerts and also process Maps and text instructions. So, they combine all these modes to make driving decisions. Next is the healthcare AI. So doctors now use AI that can look at medical images like X-rays and also read patient reports combining the information to help diagnose diseases more accurately. But why is multimodel AI
a gamecher? Multimodel AI is powerful because it's closer to human intelligence. We don't rely on one sense. We combine many. And it makes AI More flexible because one model can handle text, images, audio, and more. It can solve more complex problems like explaining what's happening in a video or understanding a full conversation with context. All right. Now, for those of you want a bit more technical depth, here's a quick peak behind the scene. So, as I discussed earlier, a multimodel AI uses transformer based models, the same type of models behind GPT. So the text, images
and audio are all converted Into a common representations like a shared language of numbers called embeddings. For example, a picture of a dog and the word dog are both mapped into a similar space. So the AI knows they mean the same thing. Then the model can reason across all modalities together and generate an output. A great example is click from open AI which connects images and text. Another is Google Gemini designed from the ground up as a truly multimodel model. So what Is the biggest challenge? So the different types of data have different formats and
complexity. Combining them efficiently without losing meaning is still an ongoing research area. So it's not just a magic. So it's smart design that lets the AI translate everything into one common understanding. Let's now look at some of the most important multimodel models, how they work and where they are used. So here are the key multimodel models. So first on the list We have clip which is clip which stands for contrastive language image pre-training from open AI. So let's see how it works. So it has two encoders, a text encoder and an image encoder. So both
encoders map inputs into the same emitting space. So during training it learns this caption matches this image and this caption does not match that image. So it uses contrastive learning. It pushes correct pairs closer and incorrect pairs further apart. So here Is the working diagram. So it takes the input be image or text and then it encoders. So a image is a vision encoder and for text is a text encoder. Then it is shared to a embedding space and finally it generates the output. So let's have a look at the use cases. So it is
used in DL and stable diffusion to align text prompts with images. Next, it is used in zeroshot classification where you give it a photo of a dog versus a photo of a cat and it recognizes which One matches the image without retraining and then it is used in search where it finds images similar to this caption. Next moving on to second model which is BLP2. It stands for bootstrapping language image pre-training. So let us see how it works. So first it connects a frozen vision encoder for example a clip or vit with a frozen large
language model which is NLM. A query transformer acts as a bridge where it converts visual features Into a language friendly representation. So here is the working diagram. The AI first looks at the image and turns it into a features like objects, color and shapes. Then a small bridge model called Q former takes those visual features and converts them into a format the language model can understand. Next, the large language model then reasons about the image features just like it reasons about text. And finally, it generates a text answer or a caption describing the Image. So
visual encoder sees and Q former translates and the LLM explains. So let's have a look at the use cases. So first it is used in visual question answering for example what's in this picture. Next in the image captioning where it can give it like a man riding a horse on a beach. Next in a chatbots with vision for example where you upload an image and ask questions. Okay the next model on our list is Flamingo from Deep Mind. So let's have a look at its Working. So here's how it works. So first it's a few
short multimodel model. It doesn't need huge fine tuning for a new task. And then it uses gated cross attention layers to integrate image plus text inside a frozen LM. And it can reason across multiple images and a long text sequence. So it looks at the image, reads your question, connects both through cross attention and then explains it. So let's have a look at the use cases. So it is used in multimodel Chat bots like look at these five images and now answer this question. Next, it is used in educational AI where it read diagrams plus
answer questions. Next in document understanding where it read text plus images in a PDF. And the next multimodel on a list is palm e from Google. So here's how it works. So as you can see this is the working diagram. So first the AI gets both visual input like a photo or a live camera feed and the text instructions like pick up the Red apple on the table. Next the vision transformer understand what's in the image like objects, colors and position and the palm language model understands the instruction and reasons about what needs to be
done. So it's combining both. The AI creates a step-by-step action plan for the robot like move forward, grab the red apple and place it in the basket. So, here are the use cases. It is used in robotics like pick up the red apple on the table. Next, it Is used in real world reasoning for embodied AI. Then, it is also used in visual navigation task. And the next multimodel is Google Gemini. So, here's how it works. It's a natively multimodel trained from scratch on text, images, audio and video. So unlike clip which aligns two encoders,
Gemini has a single model handling all modalities and it uses joint training with cross attention. So this is the working diagram. So let me explain this. The AI Takes in all types of inputs at once such as written text, pictures, sound, and even video. Then instead of using separate models for each type, it uses one powerful transformer model that can understand and combine all these inputs together. And from that combined understanding, it can give any kind of output, a text answer, a generated image or even an audio response. So basically it understands everything together and
responds in any form you need. So let us Have a look at its use cases. It is used in complex queries such as summarize this video and create a chart. It is used in advanced digital assistance and also in future AR VR multimodel applications. The next model is GPT 40 from open AI. It's a optimized multimodel model. It accepts text, images, audio in real time and it uses fused embedding and parallel processing for speed and it works as a true interactive assistant. So here are its Use cases. It is used in conversational AI with vision
plus audio and in realtime assistance where you upload an image and get explanation instantly and also in accessibility tools for example describe surroundings for visually impaired users. So these models represent different approaches to multimodality. Some align subreate encoders like clip. Some bridge vision plus llms like BLP2 and some are natively multimodel like Gemini and GPD 40. So now let us see how are multimodel models trained. So training multimodel models is much more complex than training single model models. So first is the data set alignment. So you need paired data sets such as images plus captions,
videos plus transcripts and audio plus text. So the challenge is the text and images don't always align perfectly. Next is the contrastive learning. So train the model to pull matching pairs closer and Push non-matching pairs apart. For example, image of a cat plus caption a cat is a matching pair. Whereas image of a cat plus caption as a a dog is not a matching pair. Next is the masked modeling. Masked parts of the input such as image patches, text tokens. As model predicts missing information. Then it forces the model to reason across modalities. For example,
mask the object in a caption a dash is sitting on the table plus providing image. Next is the Fusion and cross attention training where models like Flamming Go or Gemini train cross attention layers to integrate modalities. It requires huge compute clusters. Next is scaling loss like LLM's multimodel models get better with size and data diversity. Gemini plus GPD40 trained on massive multimodel corpora. So here are the training requirements. You need to have high quality pair data set, billions of parameters and TPUs, GPUs for weeks or Months and advanced optimizations such as mixed precision or shared
training. So why is true multimodel AI still hard? It's because of data mismatch. Text is sequential, images are spial, and audio is temporal. So aligning them perfectly is difficult. Next is limited highquality data. So billions of image text pairs exist but have noises and bias. Next bias and fairness. Models learn cultural and social biases from Multimodel data. For example, stereotypes in images and captions. The next challenge is compute cost. So training needs huge GPU clusters for example hundreds of A00 GPUs and fine-tuning multimodel models is even more expensive than text only and the final challenge
is the evaluation difficulty. So how do you measure reasoning across modalities so there's no single easy benchmark. So while multimodel AI is powerful it's also data Hungry compute heavy and still evolving. So in simple words, the multimodel AI can process and combine multiple types of data such as text, images, audio, and video. It's already in use such as GPD vision, Google Lens, self-driving cars, and healthcare AI. It's a big step towards AI that can understand the world like humans do. So what do you think? Will multimodel AI make AI more humanike? So drop your thoughts
in the comments. [Music] The rise of AI tools has been a transformative force across numerous industries, revolutionizing how businesses operate, how people interact with technology, and how problems are solved. AI powered tools can assist health care professionals in interpreting medical images such as X-rays, MRI scans and CT scans leading to faster and more accurate diagnosis and treatment planning. Isn't that a Fascinating innovation? But do you know how to make prompts for these AI tools? That is where prompt engineering comes into the picture. So what is prompt engineering? A prompt refers to the input provided to
a language model to obtain a desired response. It serves as the initial instruction that guides the language model in generating output text or completing a specific task. As generative AI tools improve, it is important for users to provide Customized prompts to generate outcomes according to the user's needs. Prompt engineering involves crafting precise prompts to generate desired responses from language models like GPT and Google B. It's about designing prompts to obtain the desired type of information in the generated text. It is the process of refining large language models or LLMs with specific prompts to generate various
AI services. So who are prompt engineers? Prompt engineers are Typically individuals with expertise in natural language processing, machine learning, and computational linguistics. They specialize in designing, optimizing, and fine-tuning prompts to achieve specific objectives with language models. They collaborate with researchers, developers, and other stakeholders to create prompts that yield desired outputs from the models. whether it's generating accurate translations, summaries or creative Content. Moving on to the prompt engineer salary. In India, the annual salary range for an entry-level prompt engineer with 0 to two years of experience is between rupees 3 lakhs and rupees 6 lakhs. The
annual salary range for a mid-level prompt engineer with 2 to 5 years of experience is rupees 6 lakhs to rupees 12 lakhs. The annual salary of a senior prompt engineer with five or more years of experience is between rupees 12 lakhs and 20 lakhs. Whereas in the USA, an entry-level prompt engineer with 0 to2 years of experience has a salary of around $31,000. The average annual salary for midlevel with 2 to four years of experience is around $60,000 per year. The annual salary of a senior prompt engineer with five or more years of experience can
exceed $91,000. Moving on to the prompt engineer responsibilities. First of all, prompt design. Prompt engineers develop effective prompts considering factors such as context, language style, input format, and desired output. Second is optimization and finetuning. They experiment with different variations of prompts and parameters to optimize their performance. They fine-tune prompts based on iterative testing, evaluation, and feedback to achieve desired outcomes such as improving the accuracy of Generated text. Third, data analysis. They then analyze relevant data sources and data sets to identify patterns and insights for prompt design and optimization. They then try to understand the characteristics
of the data to create prompts that capture the underlying context and semantics effectively. And finally, evaluation. They conduct testing and evaluation of prompts to assess their performance across different data sets and use Cases. They validate the effectiveness of prompts in generating desired outputs and achieving the intended task objectives using metrics and benchmarks. Now let's explore some basic steps to becoming a prompt engineer. Step one is understanding about NLP. Familiarize yourself with the fundamentals of natural language processing. Natural language processing is a branch of artificial intelligence that focuses on enabling computers to understand, Interpret, and generate
human language in a way that is both natural and meaningful. NLP deals with processing and analyzing text and speech data. Learn concepts such as text processing, tokenization, part of speech tagging, and semantic analysis. To design prompts, it's essential to understand how language models interpret and generate natural language text. Step two is exploring language models. Learn about different types of language Models, including traditional statistical models such as engrams and hidden marker models. Understand how these models work. Start experimenting with pre-trained language models such as GPT models developed by OpenAI. Use libraries like hugging faces transformers or
OpenAI's GPT libraries to interact with these models and generate text based on prompts. Step three is learning Python programming. Python is a go-to language For prompt engineering due to its versatility, ease of use, and extensive libraries for natural language processing as well as machine learning. Libraries such as TensorFlow, NLTK, PyTorch, and Skit Learn are commonly used for implementing prompt engineering tasks. So learn Python programming and learn to make use of these libraries. Step four is machine learning. Gain knowledge of machine learning algorithms, models, and techniques Including supervised learning, unsupervised learning, and deep learning. Learn about
neural networks, recurrent neural networks, convolutional neural networks, and transformers, which are commonly used in NLP tasks. Step five is hands-on projects in practice. Do not miss opportunities to work on hands-on projects and exercises that involve prompt engineering tasks such as fine-tuning language models for specific applications or designing Prompts for creative text generation. Last and final step is staying updated and continuously learning. Research the latest advancements in NLP, language models and prompt engineering methodologies by reading research papers and blogs and also attending conferences. Engage with online communities, forums and social media groups focused on NLP and
machine learning to exchange ideas, ask questions and learn from others. Since Prompt engineering is a relatively new concept, there are very limited courses available. But Edureka's prompt engineering with generative AI course is expertly curated by top industry professionals to unlock the worst potential of artificial intelligence. This course will help you acquire the skills to effectively utilize prompts for generating customized text code and more transforming a problem-solving approach. The scope of prompt Engineering is expansive and continues to grow as natural language processing and large language models play increasingly prominent roles in various industries. Prompt engineering is
increasingly being adopted and integrated into real world applications and systems across industries. As the demand for AIdriven solutions grows, prompt engineering plays a vital role in delivering effective and reliable language model based applications. [Music] Want to know a secret? There are some amazing tools out there that can help you work smarter not harder. And they are called generative AI tools and they are changing the game for people in all kind of industries. These generative AI tools can help you save time, boost your creativity and get more work done in less time. So whether you're a
student, a professional, or just someone who wants to stay ahead of the curve, this Video is for you. So let's dive in to learn more about the top 15 Gen AI tools together. And by the end of this video, you will know exactly which tools to use for your task. So we will explore tools that can help you generate ideas, write content, and even create art. You will learn how to automate repetitive task, analyze data like a pro, and make prediction with these. So we will also cover some fun tools that will make you wonder
how you ever lived without them. So let's get started. First in our list we have Chad GPD. Chat GPD developed by Open AI is a generative pre-trained transformer that is capable of understanding and generating humanlike text. It is one of the best tools for various applications in natural language processing. Chantity is everywhere these days right? People from different industries and backgrounds use it for all sort of things like for example businesses use it to help out with Customer support and to find new leads and to do market research. Also the writers, bloggers and content creators
use it to come up with interesting ideas and to make their content super engaging. And developers and technologists even use chatb to build AI powered applications, chat boards and tools. So basically charge is used across many more domains for different purposes. It is one of the most commonly used tools. One of the best thing about Chipity is that it gives free access to AI content development. So to use chipity simply open the interface and input a prompt or question. It can be about anything like for example if you are a programmer and you want to
understand how a program works, you can paste your code into charge and ask it to explain. Let me take an example to find a factorial of a number. So once you copy paste your program just type in explain the program And here we go. It has explained the program step by step. So just like that you can get assistance with writing content on any topic. And if you're not satisfied with its response, you can request another one and it will provide you with as many responses as you need. Customer support representatives, content creators, developers, educators
and researchers use strategicity to generate text, answer questions or engage in conversation in various Applications and platforms. Let's move on to the next tool on our list and that is BR. B is a generative AI chatboard developed by Google which is now called Gemini. It is designed for creative writing task and is built on lambda a transformer based model. B can help you do tasks such as coding and solving math problems and as well as write plan and learn more. You can also generate images through the Gemini. It recognizes speech in over 100 languages and
help with Audio translation as well. So without the need for any extra tools, Gemini can understand tricky visuals like charts and diagrams all by itself. and it is also the best tool for describing images and answering questions about them. So to get access to Gemini, you need to sign into your Google account and start chatting with Gemini. You can provide prompts with various imports such as text, images, videos, or even code. You will also have the options to integrate With Google apps such as Gmail, Docs, Sheets, and more. So let's try it out. So imagine
you have an image or a diagram that needs explaining. So all you need to do is click upload image and select the image from your device and type explain the diagram. And there you have it. It provides explanation for all the six pieces and it's really easy to use. Right? And as I mentioned earlier, it can also generate an image. So let's try it out. Create a picture of a playful puppy. So as you can see the screen, Gemini has generated images. And if you're not happy with these images, you can ask to generate more
images. And a bar is used for content creation and writing. So it often used by writers, bloggers, marketers, educators and anyone who needs assistance with generating content, brainstorming ideas or even improving their writing skills. The next tool that we have on our list is burden. So burden is a generative AI tool developed by open AI and it's an AI assistance that simplifies repetitive task and effortlessly automate task within work app. There's no need for complicated builders or scripts. You just tell Burden what you need and it will do the task in no time. Burden learns
from you to create personalized automation and it works with many apps and websites making your task easier. Burden is a great tool for making work Easier. So it is used by managers, sales team, recruiters and others who want to automate repetitive task and get more work done efficiently. And through burden you can connect data and actions from one app to automate task in another. Also burden works with many popular apps to make your work easier. Burden can also handle task in your apps and websites like filling out forms, sending messages or creating reports. It makes
the task easy for you. And Workflows are like chains of actions triggered by you or changes in your app. So they handle repetative task for you freeing up your time for more important things. The next generative AI tool on our list is Rephrase AI. Using this tool, you can effortlessly turn your text into videos. You can create professionallook videos with a digital avatar in minutes and no complex production is needed. It will convert text to video in just three easy Steps. So, first pick your favorite digital avatar. Then, add your message and finally render your
video with Rephra Studio. Simple, right? Refresh AI can handle over 40 languages, allowing you to create highquality videos and animations that a person can speak using only text as input. Refresh AI is used in various productions and content creations. Marketers and content creators often use it for social media platforms like YouTube and even business Owner use it to generate videos content quickly and efficiently. Next, moving on to Cintasia. The next tool on our list. Cynthsia is a number one AI video generation platform that effortlessly transform text into videos. So you can produce studio quality videos
with AI avatars and voiceovers in over 130 languages. And with over 160 readytouse options, you can create engaging video instantly. Choose from 160 characters to make your videos more interesting. Then Customize avatar outfits and logos to represent your company and even make realistic conversations in the video to look more real. This tool will also create subtitles for your videos without doing it manually and allows you to replicate your voice. It's just fun and professional to use. Synthesia is easy to use. Simply add your script, select the language, and click generate video. You can also customize
the AI avatar, colors, fonts, and layouts to Personalize the video. Finally, download the video in MP4 format or get a sharable link. Synthesia is used widely across industries to create engaging video content. So, it's used in learning, IT, sales, customer service, marketing and enterprise to streamline various task from training to communication and advertising. Now moving on to Dali 2. It is an AI system from open AI that uses deep learning methodologies to produce realistic Images and art just by describing them in natural language. Darling 2 learns from examples. So you can describe what you want
in natural language and get different images and art. You can also make changes to existing pictures using the in painting tool and replace a part of an image with AI generated imagery. Dali 2 is used in creating content generation and it's often used by artists, designers, marketers, educators and developers who need assistance with Generating visual content, creating art, designing graphics and exploring creative possibility using AI technology. Next, Type Studio. Type Studio is a flexible editing tool ideal for podcast, streams, interviews, and other type of content. It's a video editor that allows you to edit your
video by simply editing the text transcript from the video. With its advanced AIdriven features, Type Studio streamlines the editing process, Enabling content creators, podcasters, and businesses to produce highquality videos and podcast with minimal efforts and time. Type Studio provides a range of features including autosubtiting, transcribing videos, converting video to articles, converting text to articles, translating subtitles, adding images to video podcast, voiceovers, and editing podcast. And next on our list, we have Descript. Descript is your all-in-one solution for writing, recording, Transcribing, editing, collaborating, and sharing your videos and podcast. In Descript, editing video feel as simple
as working with documents and slides. Podcasters can effortlessly edit multitrack audio similar to editing a document. And screen recording are instantly captured, edited, and shared. Transcription is speedy and accurate with powerful correction tools. And finally, content can be repurposed into clips using templates, subtitles, and More. Descript offers a wide range of powerful AI features to elevate your video and podcast. Firstly, you can seamlessly edit videos by editing text. The script transcribes your video content, allowing you to make edits just as effortlessly as you would in a document. Secondly, with AI voice cloning, you can create
ultra realistic AI voice clones and generate text to speech in a matter of seconds. Additionally, Transcript provides studio Quality sounds with just one click through its studio sound features, which removes background noise and polishes up audio instantly. Lastly, the green screen effects allows you to remove your video background and place your subject anywhere with a simple click. These features are helpful for a wide range of users, including content creators, podcasters, filmmakers, educators, and businesses. Next, moving on to Compose AI. Compost AI is an AI powered writing tool and a free Chrome plug-in that generates text
using artificial intelligence. It helps you complete sentence as you type and speeds up the process of writing emails, creating documents and chatting. Also, it will help in rephrasing the sentences. You can integrate this tool in your existing platforms and tools to speed up task and to save time. This tool is used to generate content, streamline writing processes to enhance Productivity and to create engaging material for their audience. Marketers, content creators, writers and businesses utilizes this tool. The top 10 tool on our list is Chatsonic. Chat Sonic is one of the leading alternatives of GPT on
Google. So if you want insights on any of your PDFs, documents or links, simply drag and drop the file into Chatson Sonic and ask for a quick summary. You can even chat with your images. Chat Sonic accepts images as inputs and Responds to any queries you have about them. But that's not all. It also creates AI images and delivers highquality output quickly. Sadsonic makes it easy to stay organized with advanced note takingaking. Keeps conversation flowing with smart flow of questions. Provide quick access with a Chrome extensions and lets you customize its tone and style. Simplifies
team work and fine-tune your prompt for better results. The top reasons chatonic excel Include it allows realtime Google search integration. Chat with your PDF and docs, chat with your images, summarize web pages, generate humanlike voiceovers, write in your brand voice. Also, it allows AI image generation and inbuilt fact checks and more. Zadsonic is used by professionals, businesses, educators, researchers and content creators to streamline task, enhance productivity and to leverage AI technology for various needs. Next, Tom. With Tom, you can craft impactful presentation in less time. Its AIdriven features and personalized tools simplify the creation of
sales and marketing materials that leave a lasting impression. It effortlessly generates presentations, pages, outlines, images, and even text with Tom's advanced AI capabilities. Tom is useful in sales, marketing, startups, product teams, and customer success. And it's a great starting point for any project. So, Explore various projects or express your ideas promptly with Tom's versatile templates. You can choose from founder, creative, design, product, sales, personal, marketing, education, and career. And next on our list, we have design.ai. With design.AI, you can produce logos, videos, banners, and mockups using AI in just 2 minutes. It just simplifies your
workflows, save times, and also reduces cost with this platform. Design.ai AI is A platform that uses AI to help you create, edit, and scale content effortlessly. You will get all your content tools in just one place and tools such as face swapper that the face swapper smoothly integrates your face into any picture or video. Logo maker that will help you launch your brand with a unique logo and full brand identity kit using AI generator. Next, image maker creates custom image effortlessly from your ideas with text To image generator and more tools such as video maker,
speech maker, design maker, AI writer and more. And these creative tools are suitable for all content creators including influencer, small businesses, startups, educators, enterprises, agencies and more. Now moving on to midjourney AI. So, Midjourney is a cool AI tool that blends art and tech. You can describe what you want in words and it turns those descriptions into sterning pictures. So, By using advanced algorithms, it turns words into unique art words. Midjourney uses machine learning algorithms to interpret and analyze the data. So, this data can be in the form of text, audio or image. And after
getting this data, the algorithm will use it to generate new images, sounds or other media type based on the patterns it finds in the data. Midjourney is used by many businesses, startups and organizations seeking assistance with website Development, app creation, branding, user experience design and related services. And next we have GitHub Copilot. GitHub copilot is a code completion tool developed by GitHub which is owned by Microsoft and open AI. So when provided with a programming problem in natural language, copilot is capable of generating solution code and it is also able to describe input code in
English and translate the code between programming languages. It Assists the users of Visual Studio Code, Visual Studio and Jet Brains integrated development environments by autocompleting code. It works best for users coding in Python, JavaScript, TypeScript, Ruby, and Go. And in March 2023, GitHub announced plans for C-Pilot X, which will incorporate a chatboard based on GPT4, as well as support for voice commands into Copilot. The last tool on our list is Alpha Code. By combining AI and competitive Programming, it serves as a virtual assistant, guiding programmers through coding and providing smart suggestions. The fetus of alpha
code is to leverage machine learning algorithms to analyze vast amount of code and learn from patterns. This enables it to generate optimized code solution. And alpha codes machine learning models are trained on extensive code repositories enabling it to comprehend programming concepts and patterns. So this helps in analyze Problems and generate optimized code snippets saving programmers time and effort. With Alpha Code, programming learners and competitive programmers gain an access to a unique tool that enables them to explore problems solving strategies in a groundbreaking way. [Music] As generative AI technology continues to advance, roles like Gen AI
engineers and Gen AI specialists are experiencing high demand. Well, Gen AI engineers focus on Designing, developing, and deploying AI models while Gen AI specialists concentrate on applying these models to real world use cases, aligning them with business objectives and driving innovation. And in terms of salary, Gen AI engineers in India earn between 8 lakhs to 15 lakhs annually, while in the United States, they earn between $100,000 to $150,000 annually. Similarly, Gen AI specialist in India earn between 12 lakhs to 25 lakhs per Year while in the United States they earn an average salary of $120,000
annually. So as these roles grow the competition for jobs increases. So preparing for interviews is crucial. So let's get started with our first question that is how traditional AI different from generative AI. Now let's take a look at the differences between traditional AI and generative AI. Traditional AI relies on predefined algorithms and primarily works with Labeled supervised data to solve specific problems. Whereas generative AI uses advanced learning techniques to understand data structures, train on data sets, reason and create new and innovative solutions. This ability to generate fresh output sets generative AI apart from traditional methods.
Let's compare traditional AI and generative AI based on their functioning. So in traditional AI, the process typically involves data collection, model Selection, training the model, evaluation, feedback and finally deployment. And on the other hand, generative AI starts with data prep-processing followed by AI model training, data generation, identifying patterns and iterative training that incorporates feedback and acknowledgement. Once defined, the model is then deployed. And this iterative and creative approach makes generative AI more dynamic in its application. Well, The key differences is that traditional AI works on predefined rules while generative AI does not. So, here are
some examples to differentiate traditional AI and generative AI. Traditional AI is used in applications like image deduction, stock market production, fraud detection, and voice recognition. Whereas generative AI is utilized for tasks such as content creation, predictive fashion trends, code generation, and advancements in Healthcare industries. Moving on to next question. How does generative AI help in scaling businesses? Well, generative AI helps businesses scale by automating and optimizing process, creating personalized customer experience, and generating datadriven insights. Here's a breakdown of how it contributes. First, efficiency and automation. Generative AI automates repetitive tasks such as content creation, customer
service via chat bots, and report generation, Freeing up human resources for strategic activities. Next, pattern recognition. By analyzing vast data sets, generative AI identifies trends and patterns, enabling businesses to make proactive decisions, optimize operations, and predict market shifts. Next comes the content creation. It generates highquality marketing materials, product descriptions and creative assets at scale which reduces the cost and production time. Next, personalized Experience. AI customizes interactions and recommendations for customers improving satisfaction and loyalty which are critical for scaling. Next is the rapid prototyping and deployment. Generative models create simulations, prototypes, and even entire product designs,
accelerating product development cycles and reducing time to market. And finally, enhanced decision making. AI powered tools provide actionable insights and forecast guiding Businesses in resource allocation, market strategy, and scaling efforts. Well, generative AI acts as a catalyst for growth by delivering scalable innovative solutions that adapt to the dynamic demands of modern business environments. Moving on to our next question. What are some common applications of generative AI in real world? Generative AI has the wide range of application in real world like gaming. In the gaming industry, renald Companies like Nvidia and Ubisoft are utilizing generative AI
to enhance various aspects of game development and player experience. Generative AI is being used to boost creativity, improve screen time dynamics, refine shadow techniques, and elevate the overall player experience making games more impressive and engaging. Next, in content creation. So in the field of content creation, companies like Microsoft Azure and OpenAI, the creators Of Chad GPT are developing advanced algorithms to generate unique and innovative content. This content not only captivates audience but is also highly appreciated by critics showcasing the transformative potentials of generative AI in creative industries. Next, in fashion and design. In the fashion
and design industry, companies like H&M Group and Nike are leveraging generative AI to offer personalized clothing, shoes, and accessory online. This innovative use of AI has brought significant advancements enabling this brands to enhance customer experience and set new standards in personalized fashion. Next in healthcare industries. Well, in the healthcare industries, companies like Atom Wise and in silicone medicine are utilizing generative AI to enhance efficiency and accuracy in medical care. Given the critical importance of precision when it comes to saving lives, generative AI plays a Pivotal role in advancing medical research, diagnostics, and treatment solutions. Next,
in chatbots and virtual assistants. So to enhance user experience major companies like Google, Microsoft and IBM are developing advanced chatbots and virtual assistants. These AIdriven tools aims to provide personalized support, improve efficiency and streamline communication making interactions more initiative and engaging. So our next question is what Are some popular generative AI models you know? So first one we have is GPT. GPT stands for generative pre-trained transformer series. A series of language models designed to generate humanlike text based on pre-trained data enabling task like text generation, translation and even summarization. Next we have bird birectional encoder
representations from transformers. a language model that understands context in both directions like left to right And right to left to improve task like question answering and language understanding. The next generative AI model is DAL E and DAL E2 AI models capable of generating images from textual descriptions with DAL 2 offering enhanced image quality and more accurate interpretations of complex prompts. Now moving on to our next question. What are some challenges associated with generative AI? Some key challenges associated with generative AI include Data privacy and security. Large data set used for training may compromise user privacy
or include sensitive information leading to regulatory and ethical concerns. Next, bias and fairness. Generative AI can amplify biases present in the training data resulting in outputs that are unfair or discriminatory. Next is the quality and accuracy. Ensuring the quality and factual accuracy of AI generated content is Difficult especially with diverse and large data sets. And the next challenge is interpretability and transparency. Generated content can lack traceability making it hard to explain or justify outputs. Potential for content to closely resemble on copyrighted material. And the next challenge is ethical concerns. misuse of generative AI for malicious
purpose such as creating defects, spreading misinformation or automating spam. Next, Resource intensity. Training generative models requires significant computational resources leading to high cost and environmental concerns. And finally, deployment challenges. So, ensuring robust, scalable and safe deployment of generative AI models in real world application is complex. And addressing these challenges requires a combination of technical solutions, ethical guidelines and legal frameworks. Moving on to next question. What is the Large language model and how is it used in generative AI? Well, a large language model is a type of artificial intelligence model that has been trained on vast
amounts of text data to understand and generate humanlike language. And these models are typically built using deep learning architectures such as transformer-based models like GPD, BERT and T5 and contains billions to trillions of parameters that help them capture the details of natural Language and some of the key features of LLM include the massive scale. LLM are trained on extensive data sets that includes a variety of domains such as books, articles, websites and more. The next feature is contextual understanding. LLMs can understand the context of words, phrases, and sentences by processing long range dependencies, making them
capable of generating coherent and contextually relevant text. Next, transfer learning. Pre-trained LLMs can be fine-tuned on specific task or data sets, allowing them to perform a wide range of language related task with minimal task specific data. But how LLMs are used in generative AI? Well, it is used in text generation. LLMs can generate coherent and human-like text based on the prompt. Like for example, JP3 can write articles, create dialogues, generate poetry, or even code. Example, given a prompt like write a story about a dragon and a wizard, the Model generates a creative and coherent story.
Next, it is used in text completion. LMS can predict and complete sentences or paragraphs based on the initial input making them useful in applications like autocomp completion chat boards and writing assistance. Next, LLM are used in translation and summarization. LLM can translate text from one language to another or summarize long documents into concise summaries making them valuable for tasks Requiring cross-lingual understanding or information distillation. Next, in conversational agents, LLMs power conversational AI systems such as chatbots, virtual assistants that can understand and respond to user queries in natural language, offering more dynamic and human-like interactions. It
is also used in creative content creation. LLMs are used to generate creative content such as articles, marketing copy, and even scripts for Videos or films. Next in sentiment analysis and classification. Llms can be used to fine-tune to classify text like example sentiment analysis spam detection by predicting labels based on context and training data. Next, what are some common applications of large language models? So some of the common applications of large language models include chat bots and conversational AI powering virtual assistants and customer support bots to engage in natural Language conversations. Next language translation translating text
from one language to another while preserving meaning and context. Also in summarization automatically compressing large documents or articles into concise summaries. And you can also give examples of sentiment analysis which determines the sentiment or emotional tone of text for applications in social media monitoring, customer feedback analysis and more. Also in code Generation where it is assisting in programming by generating code snippets based on natural language descriptions. And the next question is what is prompt engineering and why is it important in generative AI? Well, prompt engineering is the process of designing and refining prompts to effectively
guide the output of a generative AI models, particularly language models like GPT. In the context of generative AI, a prompt is an input or instruction provided to the model Which it uses to generate a response or output. The quality, clarity, and structure of the prompt can significantly influence the model's output, making prompt engineering a critical skills in maximizing the performance and usefulness of these models. The image shows the concept of prompt engineering, emphasizing its role in optimizing interaction with AI systems. It highlights three key objectives. Improving accuracy, which Ensures precise responses, enhancing relevance, which tailor
outputs to user needs. and increasing efficiency which streamlines process for better performance and together these elements demonstrate how effective prompts design can significantly improve the overall functionality and outcomes of AI models. Next, how does generative AI handle the creation of textbased content? So, the generative AI generates textbased content through a process that involves Several key steps. Here's a simplified explanation. First, training on large data sets. Pre-trained on large data sets, AI models like GPT are trained on vast amounts of text data from diverse sources such as books, articles, and websites. This extensive training helps the
model to learn language patterns, context, and general knowledge forming the foundation for its ability to perform various language task effectively. Next, the architecture of The model. Generative AI models are built on the transformer architecture. a highly effective framework for processing sequential data. It leverages mechanisms like self attentions to understand context and relationships within text enabling text such as language generation and comprehension. Next, generating responses. The generation process involves multiple stages including structuring ideas, connecting relevant information, Analyzing data, writing coherent content, and finally deploying or delivering the output in a meaningful and usable form. Next, iterative
process. In simple terms, it means improving the model by training it, receiving feedback, and making adjustments based on that feedback to enhance its performance. So in summary, generative AI models like GPT generate text by predicting word sequence based on learned patterns from extensive Training data while understanding and maintaining context throughout the generation process. Examples of generative models include JP4 birth transformers and T5 which stands for texttoext transfer transformer. Moving on to the next question. Can you explain how generative AI is used in chat bots or language translation? Generative AI enables chatbots to produce contextually relevant,
coherent, and human-like responses, improving the user Experience. Key areas where generative AI contributes include generating responses. By leveraging large language models, generative AI can produce more natural and engaging responses, making chatbot interactions feel more humanlike. Next, creativity. Generative AI can be used to generate creative content such as poems, stories, or scripts which can be incorporated into chatbot conversations to make them more entertaining and engaging. Next, Personalization. Generative AI can analyze user data to personalize chatbot responses, making the interaction feel more tailored to the individual user. And then we have context management. Generative AI can maintain
context throughout a conversation, allowing chatbots to understand and response appropriately to the users involving needs and preferences. These capabilities of generative AI are transforming how chatbots and language Translation tools are used making them more effective and userfriendly. Now moving on to the advanced level questions in generative AI and the question is what is the role of the data in training generative AI models? Data plays a crucial role in training generative AI models as the quality, quantity, and diversity of the data significantly impact the model's performance and output. Here are some of the examples of data
usage in generative AI models. First, in image generation for models like GANs, large data sets of images are used to teach the models how to generate realistic images. Next, text generation. For models like GPT4 once text from various sources like books, articles, website are used to train the model to understand and generate humanlike text. And next in music generation, models train on large collections of musical compositions, learn patterns in melody, harmony and Rhythm to generate new music. Now moving on to next question. How do attention mechanism enhance the performance of generative AI models? Well, attention
mechanisms significantly enhance the performance of generative AI models by allowing them to focus on relevant parts of the input data when generating each part of the output. So, here's how they work and contribute to improve performance. The text at the top states that the attention mechanism is a Critical innovations that enhances the performance of generative AI models. The diagram shows how multiple attention heads process information in parallel. Each attention head focuses on different aspects of the input sequence, allowing the model to capture complex relationships and dependencies between different parts of the data. The outputs of
these attention heads are then concentrated and processed further to generate the final output. This Multi-headed attention mechanism enables the model to learn more detailed representations of the input leading to improved performance in tasks such as language translation, text summarization, and image generation. And the next question is what is GANs which stands for generative adversary networks and how do they function? GANs are the type of generative models that are particularly powerful for generating realistic data such as images, text or Audio. The diagram provides a clear visual representations of a GAN's architecture and its functioning. Well, GAN
which stands for generative adversarial network. This is a central component. It highlights that a GAN is a system consisting of two main subn networks. Next, generator. Generator is responsible for creating new data samples. Well, it takes input and attempts to generate realistic data points, example, images, text that Mimics the training data. Next is the discriminator. The discriminator acts as an evaluator. It takes and input both real data samples from the training set and the generated samples from the generator. Its task is to differentiate between the real and fake data assigning a probability of being real
to each sample. Now let us see the functioning of GANs. GANs comprise two key components, a generator and a discriminator. The generator aims to Create new data instances that closely resembles the training data. Whereas the discriminator acts as a binary classifier tasked with differentiating between real data samples from the training set and synthetic data generated by the generator. The adversary relationship between the generator and the discriminator drives the GANs to produce increasingly realistic synthetic data. So as you can see the screen this image shows the Functioning of a generative adversary network. It starts with random
noise as input which is fed into the generator network. This network attempts to generate a fake sample that resembles real data. The generated sample is then presented to the discriminator network alongside actual real samples from the training data set. The discriminator's task is to classify each sample as either real or fake. So both the generator and discriminator networks Learn and improve through this adversarial process with a generator aiming to produce increasingly realistic samples that can fool the discriminator while the discriminator strives to accurately distinguish between the real and fake data. Next, how do generative models
like GANs help in image generation? Generative models like generative adversary networks are powerful tools for image generation. GANs consist of two neural networks. the Generator and the discriminator which work together in a competitive process to create highly realistic images from random noises. Here's how GANs help in image generation. Generative models like GANs are powerful tools for creating realistic images. GANs use a dual network approach to achieve this. The generator network creates new images. The discriminal network evaluates these images trying to distinguish between the real and generated images. This Adversarial process forces the generator to create
increasingly realistic images. Now let's see the training process of GATS. In this process, the generator network strives to improve its ability to create a realistic images that can deceive the discriminator. Conversely, the discriminatoral network focuses on enhancing its ability to detect fake images leading to an ongoing improvement cycle for both networks. Through the continuous adversarial Learning between the generator and discriminator, the generator eventually produces highquality images that are so realistic that they can successfully deceive the discriminator. Moving on to next question. What are variational autoenccounters and how do they differ from GANs? Well, variational autoenccoders
are a type of generative model that is built on the principles of autoenccoders, a neural network architecture commonly used for Unsupervised learning task like dimensionality reduction and feature learning. Key components are encoder. The encoder maps input data, for example, an image to a latent space representing it as a distribution over latent variables. Next the output. Instead of mapping to a single point in latent space, the encoder outputs the mean and variance of a gshian distribution. This distribution captures the uncertaintity in the encoding Process. Next we have decoder. The purpose is the decoder takes the sample
latent variables and maps it back to the data space reconstructing the original input data or generating new data. Output. The decoder produces a reconstructions of a original input or a new data point that lies within the learned distribution. Next, what role can generative AI plays in education, especially in creating customized learning materials for students? Generative AI can play a transformative role in education by creating customized learning materials that cater to individual student needs. Here's how it can be utilized effectively. First, in personalized learning parts, customized content, AI generates tailored content based on a student's learning
pace, interest, and proficiency levels. For example, if a student struggles with a particular math concept, the AI can create additional exercise or Explanations focused on that topic. Next, adaptive assessments. AI can design assessments that adapt in real time to a student's performance, offering more challenging problems as the student progresses or providing more foundational questions if they encouer difficulties. Next, interactive learning materials. It provides dynamic textbooks. AI can create interactive textbooks that update based on the latest research and Educational trends. These materials could include simulations, quizzes, and other interactive elements that respond on how a student
interacts with the content. Next, simulations and virtual labs. AI can generate virtual experiments and simulations, allowing students to explore complex scientific concepts in a safe, controlled environment. Next, language and writing support in grammar and style suggestions. AI can Assist students in improving their writing by providing real-time feedback on grammar, style, and clarity. It can also suggest alternative phrases or vocabulary based on the students level. Next, essay generation assistance. For younger students or those learning new languages, AI can help generate essay outlines or suggest content structure, helping them organize their thoughts more effectively. Next, automated content
creation. Lesson plans. AI Assist teachers by generating lesson plans that align with curriculum standards, saving time and allowing teachers to focus more on student interaction. Next, practice problems and quizzes. AI can create endless variations of practice problems and quizzes, ensuring that students get the repetitions they need without encountering the same problem twice. Next, support for diverse learning styles in visual and audio content. AI Can generate visual ads like charts, graphs, and diagrams to produce audio explanations for students. Next, AI can also create educational games that are tailored to these curriculums, making learning more engaging and
fun for students with the preferences for interactive learning. Well, generative AI in education has the potential to create more personalized, engaging, and effective learning experience for students while also supporting teachers With the tools they need to enhance their teaching. Next, what is the goshian mixture model and how is it used in generative AI? A Gaussian mixture model is a probabilistic model used in generative AI. It assumes that data points arises from a combination of multiple gaussian distribution. The image visualize the concept and the first shows a single gshian distribution. The second shows a mixture of
two gshian distributions and The third row shows data point generated from various gshian mixture model configuration. Well, it is valuable in generative AI for task like clustering, density estimation and generating synthetic data. The graph demonstrates data generation using a gshian mixture model. After training on a data set, it can create a new data points by sampling from a learned gshian distribution. The graph compares a theoretical normal distribution to data points generated Through Monte Carlo sampling from this distribution showcasing the accuracy of the generated data and capturing the underlying distribution. This technique is crucial in generative
AI for task like creating synthetic data that resembles real world data. Next question is can you describe the concept of a transformer model? The transformer model is a type of deep learning architecture that has transformed the field of natural language processing and more Recently has been adapted to other domains like computer vision introduced in the paper attention is all you need in 2017. The transformer model moved away from traditional recurrent neural networks and convolutionary neural networks by relying entirely on a mechanisms called self attention. And this graph shows the increasing number of the model parameters
in generative AI models over time. As the number of parameters grows, these models gain the Capacity to process and learn from more complex data leading to enhanced performance in task like text generation and image synthesis. However, this increase in parameters also comes with challenges such as increased computational cost and the risk of overfiltering where the model performs well on training data but poorly on new unseen data. The next question is what are model parameters and how do they affect the performance of generative AI Models? Model parameters are crucial components of generative AI models that significantly
influence their performance and output quality. These parameters are the internal settings that a model learns from the training data and uses to make predictions, generate content or perform specific task. Process of optimizing model parameters in generative AI starts with importing training data and initializing the model's parameters. An optimization Mechanism is then applied to the train and update the model's parameters iteratively. This process continues until the defined closing conditions are met. Finally, the optimized parameters are obtained which are crucial for the model's performance in generating realistic outputs. Model parameters influence the content generation process impacting the
output quality. These parameters are crucial for feature learning enabling the model To identify and utilize patterns in the data to generate a realistic and meaningful outputs. And the next question is how can generative AI be leveraged to create personalized experience for users in e-commerce? Generative AI can significantly enhance personalized experience in e-commerce by tailoring content, recommendations, and interactions to individual users. Here's how it can be leveraged. First, in personalized product recommendation, AI Powered recommendations personalize product suggestions by analyzing individual user data by understanding browsing history, purchase patterns, and preferences. AI algorithms recommend products aligned with
user interest, enhancing the shopping experience and driving sales. Next, customized marketing campaigns. AI enables personalized email marketing by analyzing user data to generate targeted content by delivering messages with Relevant products and promotions tailored to individual interest. AI enhances campaigns effectiveness, increasing engagement and driving conversions. Next, tailored product descriptions and reviews. AI personalizes product description by analyzing user data to highlight features most relevant to them. This enhances the shopping experience and increases purchase likelihood by providing targeted information. Next, Virtual assistants and chat bots. AI powered chat bots function as virtual shopping assistants. They provide personalized product
recommendation, answer user queries, and guide them through their shopping journey based on individual preferences. Next, visual search and augmented reality. AIdriven visual search allows users to upload images of derived products. The AI then generates suggestions for similar items available in the e-commerce store, Offering a highly personalized search experience. And by leveraging generative AI, e-commerce platforms can create a deeply personalized shopping experience that not only enhances customer satisfaction, but also increases engagement, loyalty, and conversion rates. And with this we have come to an end to this full course on prompt engineering for beginners. If you enjoyed
listening to this full course, please be kind enough to like it and you Can comment on any of your doubts and queries. We will reply to them at the earliest and do look up for more videos and playlist and subscribe to Edurea's YouTube channel to learn more. Thank you for watching and happy learning.