{"slug": "introduction-to-generative-ai", "title": "Introduction to Generative AI", "summary": "Generative AI creates content like text, images, or video based on user input using a mathematical model trained on vast amounts of multimodal data. A common type is the large language model (LLM), which predicts the next word by assigning probability scores to possible outputs and selecting the highest-scoring one. Output generation can be controlled by adjusting parameters like temperature (factual vs. imaginative), Top-K (number of token candidates), and Top-P (cumulative probability threshold).", "body_md": "What is Generative AI ?\nFor the given user input(user query), output like text,image, video etc will be generated. This is called generative AI.\nHow it generates content?\nA model will be used to generate output. i.e model will receive input and based on that, it will generate a output.\nWhat is a model?\nAt its core, model is nothing but a mathematical equation.It will be multidimensional. vast amount of multimodal data (text,audio,video, image etc) would be subjected to training to get the required mathematical equation. To get the desired state, backpropagation will be carried out.\n120b model means, equation has, 120 billion parameters. One of the commonly used model type in generative ai is LLM.\nWhat is LLM ?\nLLM stand for large language model. LLM basically predict the next word. If i provide the input query as hello to gpt model, based on the data it was trained, it will predict and returns the next word. In my case i got Hello,How can I help you today?\nResponse will not be generated and sent all at once. It will be generated one by one and sent in a streamed manner(by means of SSE event).\nHow it predicts the next word?\nIn the above example, when i gave hello as input, why \"Hi, how can i help you today was returned\" ? not hi or world etc .\nFor the given input, model provides some of possibility words like\nhi, world, howdy, how may i help you etc. For each possible word, it gives a score(most occuring probability). Word which is having highest score will be returned as output. If the scores are hi (0.2), world(0.4), howdy(0.1), how may i help you(0.7), highest score is 0.7, so \"how may i help you is returned\".\nCan we tweak the model to control how output should be?\nThis can be achieved by tweaking the following parameters\n1. Temperature\n2. Top- K\n3. Top - P\nTemperature\nTemperature controls whether the output generated be factual or imaginative. Temperature value lies between 0 - 1. If it is closer to zero, then it more of a factual and the value is closer to 1, then it is more of a imaginative.\nExample prompt for low temperature\nExample prompt for high temperature\n2.Top -K\nK denotes the number of tokens to be returned. For the prompt, The cat sat on the ---- following words are predicted for the varying values of k.\n3.Top - P\nThreshold percentage will be set. From the set of predicted words, those words will be taken whose cumulative probability score approximates to threshold percentage.\nFor the prompt, The cat and top_p = 0.7", "url": "https://wpnews.pro/news/introduction-to-generative-ai", "canonical_source": "https://dev.to/indumathi__r/introduction-to-generative-ai-6in", "published_at": "2026-05-24 03:11:43+00:00", "updated_at": "2026-05-24 03:31:04.454790+00:00", "lang": "en", "topics": ["artificial-intelligence", "machine-learning", "large-language-models"], "entities": ["GPT"], "alternates": {"html": "https://wpnews.pro/news/introduction-to-generative-ai", "markdown": "https://wpnews.pro/news/introduction-to-generative-ai.md", "text": "https://wpnews.pro/news/introduction-to-generative-ai.txt", "jsonld": "https://wpnews.pro/news/introduction-to-generative-ai.jsonld"}}