cd /news/artificial-intelligence/introduction-to-generative-ai · home topics artificial-intelligence article
[ARTICLE · art-13036] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

Introduction to Generative AI

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).

read2 min views24 publishedMay 24, 2026

What is Generative AI ? For the given user input(user query), output like text,image, video etc will be generated. This is called generative AI. How it generates content? A model will be used to generate output. i.e model will receive input and based on that, it will generate a output. What is a model? At 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. 120b model means, equation has, 120 billion parameters. One of the commonly used model type in generative ai is LLM. What is LLM ? LLM 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? Response 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). How it predicts the next word? In the above example, when i gave hello as input, why "Hi, how can i help you today was returned" ? not hi or world etc . For the given input, model provides some of possibility words like hi, 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". Can we tweak the model to control how output should be? This can be achieved by tweaking the following parameters

  1. Temperature
  2. Top- K
  3. Top - P Temperature Temperature 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. Example prompt for low temperature Example prompt for high temperature 2.Top -K K 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. 3.Top - P Threshold percentage will be set. From the set of predicted words, those words will be taken whose cumulative probability score approximates to threshold percentage. For the prompt, The cat and top_p = 0.7
── more in #artificial-intelligence 4 stories · sorted by recency
── more on @gpt 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/introduction-to-gene…] indexed:0 read:2min 2026-05-24 ·