{"id":215,"date":"2026-10-18T18:01:08","date_gmt":"2026-10-18T18:01:08","guid":{"rendered":"https:\/\/devdojo.co.in\/?p=215"},"modified":"2026-10-18T18:01:08","modified_gmt":"2026-10-18T18:01:08","slug":"genai-series-part-1-what-is-generative-ai","status":"publish","type":"post","link":"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/","title":{"rendered":"Generative AI Part 1: What Is Generative AI and How Do LLMs Work?"},"content":{"rendered":"\n<div class=\"dd-post\">\n<style>\n.single article:has(.dd-hero) .entry-media{display:none}\n.dd-post{--navy:#0b1020;--blue:#3178c6;--violet:#7c5cff;--ink:#1f2433;--muted:#5b6275;--line:#e3e6ef;font-size:17px;line-height:1.75;color:var(--ink)}\n.dd-post h2{margin:2.2em 0 .6em;font-size:1.6em;line-height:1.3;scroll-margin-top:90px}\n.dd-post h3{margin:1.6em 0 .5em;font-size:1.22em;scroll-margin-top:90px}\n.dd-post a{color:var(--blue);text-decoration:underline;text-underline-offset:3px}\n.dd-post pre{background:#0f1430;color:#e6e9f5;padding:18px 20px;border-radius:12px;overflow-x:auto;line-height:1.6;border:1px solid #232a52;margin:1.2em 0;font-size:14.5px !important}\n.dd-post pre code{font-size:1em !important;background:none;color:inherit;padding:0;font-family:\"JetBrains Mono\",\"Fira Code\",Consolas,Menlo,monospace;white-space:pre}\n.dd-post :not(pre)>code{background:#eef1fb;color:#2b3a8f;padding:2px 6px;border-radius:5px;font-size:.9em}\n.dd-post .dd-file{display:inline-block;background:#151b3b;color:#c9d1ff;font:600 13px\/1 \"JetBrains Mono\",Consolas,monospace;padding:7px 12px;border-radius:8px 8px 0 0;margin:1em 0 -1.2em;position:relative}\n.dd-post .dd-hero{margin:0 0 1.6em;border-radius:16px;overflow:hidden;box-shadow:0 10px 30px rgba(11,16,32,.25)}\n.dd-post .dd-hero svg{display:block;width:100%;height:auto}\n.dd-post .dd-hero .node{transition:transform .25s,filter .25s;transform-box:fill-box;transform-origin:center;cursor:pointer}\n.dd-post .dd-hero .node:hover{transform:scale(1.08);filter:drop-shadow(0 0 10px #7c5cff)}\n.dd-post .dd-series{display:inline-flex;align-items:center;gap:8px;background:#151b3b;color:#dfe3ff;border-radius:999px;padding:6px 14px;font-size:.88em;font-weight:600;margin:0 0 .8em}\n.dd-post .dd-series span{background:var(--violet);color:#fff;border-radius:999px;padding:2px 10px}\n.dd-post .dd-prereq{font-size:.96em;color:var(--muted);border-left:3px solid var(--line);padding-left:12px;margin:.6em 0 1.2em}\n.dd-post .dd-summary{background:linear-gradient(135deg,#eef3ff,#f4efff);border:1px solid #d6dcf5;border-left:5px solid var(--violet);border-radius:12px;padding:18px 22px;margin:1.4em 0}\n.dd-post .dd-summary strong.lbl{display:block;font-size:1.05em;margin-bottom:6px;color:#3a2fa0}\n.dd-post .dd-summary ul{margin:.3em 0 0 1.1em}\n.dd-post .dd-toc{background:#f8f9fc;border:1px solid var(--line);border-radius:12px;padding:16px 22px;margin:1.4em 0}\n.dd-post .dd-toc ol{margin:.4em 0 0 1.2em;columns:2;column-gap:28px}\n.dd-post .dd-toc li{break-inside:avoid;margin:.15em 0}\n@media(max-width:640px){.dd-post .dd-toc ol{columns:1}}\n.dd-post .dd-tip,.dd-post .dd-note,.dd-post .dd-warn{border-radius:10px;padding:14px 18px;margin:1.3em 0}\n.dd-post .dd-tip{background:#ecfbf3;border-left:4px solid #1f9d61}\n.dd-post .dd-note{background:#eef4ff;border-left:4px solid var(--blue)}\n.dd-post .dd-warn{background:#fff6e8;border-left:4px solid #e08a00}\n.dd-post .dd-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px;margin:1.3em 0}\n.dd-post .dd-card{border:1px solid var(--line);border-radius:12px;padding:14px 16px;background:#fff;box-shadow:0 2px 8px rgba(20,30,70,.05)}\n.dd-post .dd-card b{display:block;color:#3a2fa0;margin-bottom:4px}\n.dd-post table{width:100%;border-collapse:collapse;margin:1.3em 0;font-size:.95em}\n.dd-post th,.dd-post td{border:1px solid var(--line);padding:10px 12px;text-align:left;vertical-align:top}\n.dd-post th{background:#151b3b;color:#fff}\n.dd-post tr:nth-child(even) td{background:#f8f9fc}\n.dd-post .dd-tablewrap{overflow-x:auto}\n.dd-post figure{margin:1.6em 0;text-align:center}\n.dd-post figure svg{width:100%;height:auto;border-radius:12px}\n.dd-post figcaption{font-size:.9em;color:var(--muted);margin-top:8px}\n.dd-post details{border:1px solid var(--line);border-radius:10px;padding:12px 16px;margin:.7em 0;background:#fff}\n.dd-post details summary{cursor:pointer;font-weight:600}\n.dd-post details[open] summary{margin-bottom:8px;color:#3a2fa0}\n.dd-post .dd-roadmap{border:2px solid #d6dcf5;background:#fbfbff}\n.dd-post .dd-roadmap h4{margin:1em 0 .3em;color:#151b3b;font-size:1em;text-transform:uppercase;letter-spacing:.04em}\n.dd-post .dd-roadmap ol{margin:.2em 0 .6em 1.4em;padding:0}\n.dd-post .dd-roadmap li{margin:.2em 0}\n.dd-post .dd-roadmap .here{background:var(--violet);color:#fff;border-radius:999px;padding:1px 9px;font-size:.8em;font-weight:700;margin-left:6px}\n.dd-post .dd-roadmap .soon{color:#8a90a6;font-size:.82em;margin-left:6px}\n.dd-post .dd-tabs{border:1px solid var(--line);border-radius:12px;padding:6px 16px 16px;margin:1.4em 0;background:#fbfbfe}\n.dd-post .dd-tabs>input{position:absolute;opacity:0;pointer-events:none}\n.dd-post .dd-tabs .labels label{display:inline-block;padding:8px 16px;margin:10px 6px 0 0;border-radius:999px;border:1px solid #cfd5ea;cursor:pointer;font-weight:600;font-size:.95em;background:#fff;transition:background .2s}\n.dd-post .dd-tabs .labels label:hover{border-color:var(--violet)}\n.dd-post .dd-tabs .panel{display:none;margin-top:12px}\n.dd-post .dd-tabs #ti1:checked~.labels label[for=ti1],.dd-post .dd-tabs #ti2:checked~.labels label[for=ti2],.dd-post .dd-tabs #ti3:checked~.labels label[for=ti3],.dd-post .dd-tabs #ti4:checked~.labels label[for=ti4]{background:var(--violet);color:#fff;border-color:var(--violet)}\n.dd-post .dd-tabs #ti1:checked~.p1,.dd-post .dd-tabs #ti2:checked~.p2,.dd-post .dd-tabs #ti3:checked~.p3,.dd-post .dd-tabs #ti4:checked~.p4{display:block}\n.dd-post .dd-tabs #ti1:focus-visible~.labels label[for=ti1],.dd-post .dd-tabs #ti2:focus-visible~.labels label[for=ti2],.dd-post .dd-tabs #ti3:focus-visible~.labels label[for=ti3],.dd-post .dd-tabs #ti4:focus-visible~.labels label[for=ti4]{outline:2px solid var(--blue);outline-offset:2px}\n.dd-post .dd-cta{background:linear-gradient(135deg,#0b1020,#151b3b);color:#e8ebff;border-radius:16px;padding:24px 26px;margin:2em 0;text-align:center}\n.dd-post .dd-cta h3{color:#fff;margin-top:0}\n.dd-post .dd-cta a{color:#a99bff}\n.dd-post .dd-vsc{position:relative;margin:1.5em 0;border-radius:12px;overflow:hidden;background:#1e1e1e;border:1px solid #2b2b2b;box-shadow:0 14px 34px rgba(0,0,0,.28);font-family:\"Segoe UI\",system-ui,sans-serif}\n.dd-post .dd-vsc>input{position:absolute;opacity:0;pointer-events:none}\n.dd-post .dd-vsc-bar{display:flex;align-items:center;gap:12px;background:#323233;color:#cccccc;font-size:12.5px;padding:8px 12px}\n.dd-post .dd-dots{display:inline-flex;gap:7px}.dd-post .dd-dots i{width:12px;height:12px;border-radius:50%;background:#ff5f57;display:block}.dd-post .dd-dots i:nth-child(2){background:#febc2e}.dd-post .dd-dots i:nth-child(3){background:#28c840}\n.dd-post .dd-vsc-title{flex:1;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:50px;opacity:.85}\n.dd-post .dd-vsc-tabs{display:flex;align-items:stretch;background:#252526;border-bottom:1px solid #1e1e1e;overflow-x:auto}\n.dd-post .dd-vsc-tabs label{display:flex;align-items:center;gap:7px;padding:9px 16px;color:#969696;font-size:13px;cursor:pointer;background:#2d2d2d;border-right:1px solid #252526;border-top:1px solid transparent;white-space:nowrap;margin:0;transition:color .15s}\n.dd-post .dd-vsc-tabs label:hover{color:#e0e0e0}\n.dd-post .dd-vsc-tabs .ic{font:700 9.5px\/1 Consolas,monospace;padding:3px 4px;border-radius:3px;color:#1e1e1e}\n.dd-post .ic.py{background:#ffd43b}.dd-post .ic.js{background:#f1e05a}.dd-post .ic.sh{background:#89e051}\n.dd-post .dd-vsc-tabs label.run{margin-left:auto;background:transparent;border:0;color:#89d185;font-weight:600;display:none}\n.dd-post .dd-vsc-tabs label.run:hover{color:#b5f0b0;background:#2a2d2e}\n.dd-post .dd-vsc-pane{display:none}\n.dd-post .dd-vsc>.f1:checked~.dd-vsc-tabs .t1,.dd-post .dd-vsc>.f2:checked~.dd-vsc-tabs .t2,.dd-post .dd-vsc>.f3:checked~.dd-vsc-tabs .t3{background:#1e1e1e;color:#ffffff;border-top-color:#3178c6}\n.dd-post .dd-vsc>.f1:checked~.p1,.dd-post .dd-vsc>.f2:checked~.p2,.dd-post .dd-vsc>.f3:checked~.p3{display:block}\n.dd-post .dd-vsc>.f1:checked~.dd-vsc-tabs .run1,.dd-post .dd-vsc>.f2:checked~.dd-vsc-tabs .run2,.dd-post .dd-vsc>.f3:checked~.dd-vsc-tabs .run3{display:flex}\n.dd-post .dd-vsc>.f1:focus-visible~.dd-vsc-tabs .t1,.dd-post .dd-vsc>.f2:focus-visible~.dd-vsc-tabs .t2,.dd-post .dd-vsc>.f3:focus-visible~.dd-vsc-tabs .t3,.dd-post .dd-vsc>input[type=checkbox]:focus-visible~.dd-vsc-tabs .run{outline:2px solid #3178c6;outline-offset:-2px}\n.dd-post .dd-vsc-crumbs{background:#1e1e1e;color:#a9a9a9;font-size:12px;padding:5px 16px 2px}\n.dd-post .dd-vsc pre.dd-vsc-code{background:#1e1e1e;color:#d4d4d4;border:0;border-radius:0;margin:0;padding:8px 0 14px;counter-reset:ln;line-height:1.62;overflow-x:auto}\n.dd-post .dd-vsc pre code{font-family:Consolas,\"JetBrains Mono\",\"Fira Code\",Menlo,monospace;color:inherit;background:none;white-space:pre}\n.dd-post .dd-vsc .l{display:inline-block;min-width:100%;padding-right:18px;box-sizing:border-box}\n.dd-post .dd-vsc .l::before{counter-increment:ln;content:counter(ln);display:inline-block;width:3.2em;padding-right:1.4em;text-align:right;color:#6e7681;user-select:none;-webkit-user-select:none}\n.dd-post .dd-vsc .l:hover{background:#2a2d2e}.dd-post .dd-vsc .l:hover::before{color:#c6c6c6}\n.dd-post .dd-vsc .k,.dd-post .dd-vsc .kn{color:#c586c0}.dd-post .dd-vsc .kc{color:#569cd6}.dd-post .dd-vsc .s{color:#ce9178}.dd-post .dd-vsc .c{color:#6a9955}.dd-post .dd-vsc .m{color:#b5cea8}.dd-post .dd-vsc .nf{color:#dcdcaa}.dd-post .dd-vsc .nc{color:#4ec9b0}.dd-post .dd-vsc .nb{color:#4ec9b0}.dd-post .dd-vsc .nd{color:#dcdcaa}.dd-post .dd-vsc .n{color:#9cdcfe}.dd-post .dd-vsc .o{color:#d4d4d4}.dd-post .dd-vsc .gp{color:#89d185;user-select:none;-webkit-user-select:none}\n.dd-post .dd-vsc-term{display:none;border-top:1px solid #3c3c3c;background:#181818}\n.dd-post .dd-vsc>.r1:checked~.p1 .dd-vsc-term,.dd-post .dd-vsc>.r2:checked~.p2 .dd-vsc-term,.dd-post .dd-vsc>.r3:checked~.p3 .dd-vsc-term{display:block;animation:ddterm .35s ease-out}\n@keyframes ddterm{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}\n.dd-post .dd-term-head{display:flex;gap:18px;align-items:center;font-size:11px;letter-spacing:.06em;color:#8b8b8b;padding:7px 16px 0}\n.dd-post .dd-term-head span:first-child{color:#e7e7e7;border-bottom:1px solid #e7e7e7;padding-bottom:4px}\n.dd-post .dd-term-head .dd-term-note{margin-left:auto;letter-spacing:0;text-transform:none;color:#d7ba7d;border:0;font-size:11.5px}\n.dd-post .dd-vsc-term pre{background:#181818;color:#cccccc;border:0;margin:0;padding:10px 16px 14px;border-radius:0}\n.dd-post .dd-vsc-status{display:flex;flex-wrap:wrap;gap:4px 14px;background:#007acc;color:#fff;font-size:11.5px;padding:4px 12px}\n.dd-post .dd-vsc-status .sp{flex:1}\n.dd-post .dd-vsc-termonly pre.dd-vsc-code{background:#181818;padding:12px 16px}\n@media(max-width:640px){.dd-post .dd-vsc-title{padding-right:0;text-align:left}.dd-post .dd-vsc-status span:nth-child(n+4){display:none}.dd-post .dd-vsc .l::before{width:2.2em;padding-right:1em}}\n.dd-post .dd-vsc-hint{font-size:.93em;color:var(--muted);margin-top:-.6em}\n.dd-post .dd-next{border:1px dashed var(--violet);border-radius:12px;padding:16px 20px;margin:1.6em 0;background:#f7f4ff}\n<\/style>\n\n<div class=\"dd-hero\">\n<svg viewBox=\"0 0 1200 520\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" role=\"img\" aria-label=\"Generative AI series Part 1 banner: a prompt flows into tokens, through a large language model, and comes out as generated text\">\n<defs>\n<linearGradient id=\"ddbg\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\"><stop offset=\"0\" stop-color=\"#0b1020\"\/><stop offset=\"1\" stop-color=\"#151b3b\"\/><\/linearGradient>\n<linearGradient id=\"ddac\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\"><stop offset=\"0\" stop-color=\"#3178c6\"\/><stop offset=\"1\" stop-color=\"#7c5cff\"\/><\/linearGradient>\n<radialGradient id=\"ddglow\" cx=\".5\" cy=\".5\" r=\".5\"><stop offset=\"0\" stop-color=\"#7c5cff\" stop-opacity=\".45\"\/><stop offset=\"1\" stop-color=\"#7c5cff\" stop-opacity=\"0\"\/><\/radialGradient>\n<\/defs>\n<rect x=\"0\" y=\"-60\" width=\"1200\" height=\"640\" fill=\"url(#ddbg)\"\/>\n<circle cx=\"980\" cy=\"120\" r=\"260\" fill=\"url(#ddglow)\"\/>\n<g opacity=\".12\" stroke=\"#9fb2ff\"><path d=\"M0 100H1200M0 200H1200M0 300H1200M0 400H1200M200 0V520M400 0V520M600 0V520M800 0V520M1000 0V520\"\/><\/g>\n<rect x=\"60\" y=\"46\" width=\"128\" height=\"38\" rx=\"19\" fill=\"url(#ddac)\"\/>\n<text x=\"124\" y=\"71\" text-anchor=\"middle\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"18\" font-weight=\"700\" fill=\"#fff\">PART 1<\/text>\n<text x=\"204\" y=\"71\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"18\" fill=\"#aab4e8\">Generative AI Series \u00b7 DevDojo<\/text>\n<text x=\"60\" y=\"150\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"54\" font-weight=\"800\" fill=\"#ffffff\">What Is Generative AI?<\/text>\n<text x=\"60\" y=\"200\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"26\" fill=\"#c9d1ff\">How large language models create text, one token at a time<\/text>\n<path id=\"ddflow\" d=\"M150 380 C 290 320, 330 440, 450 380 S 650 320, 750 380 S 950 440, 1050 380\" fill=\"none\" stroke=\"url(#ddac)\" stroke-width=\"3\" stroke-dasharray=\"8 8\" opacity=\".8\"\/>\n<g class=\"node\"><rect x=\"80\" y=\"345\" width=\"150\" height=\"70\" rx=\"14\" fill=\"#1b2250\" stroke=\"#3178c6\" stroke-width=\"2\"\/><text x=\"155\" y=\"378\" text-anchor=\"middle\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"20\" font-weight=\"700\" fill=\"#fff\">Prompt<\/text><text x=\"155\" y=\"401\" text-anchor=\"middle\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"14\" fill=\"#9fb2ff\">&#8220;Explain AI\u2026&#8221;<\/text><\/g>\n<g class=\"node\"><rect x=\"375\" y=\"345\" width=\"150\" height=\"70\" rx=\"14\" fill=\"#1b2250\" stroke=\"#3178c6\" stroke-width=\"2\"\/><text x=\"450\" y=\"378\" text-anchor=\"middle\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"20\" font-weight=\"700\" fill=\"#fff\">Tokens<\/text><text x=\"450\" y=\"401\" text-anchor=\"middle\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"14\" fill=\"#9fb2ff\">[849, 2051, 17]<\/text><\/g>\n<g class=\"node\"><rect x=\"660\" y=\"330\" width=\"180\" height=\"100\" rx=\"18\" fill=\"url(#ddac)\"\/><text x=\"750\" y=\"375\" text-anchor=\"middle\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"26\" font-weight=\"800\" fill=\"#fff\">LLM<\/text><text x=\"750\" y=\"402\" text-anchor=\"middle\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"14\" fill=\"#eef\">predicts next token<\/text><\/g>\n<g class=\"node\"><rect x=\"975\" y=\"345\" width=\"150\" height=\"70\" rx=\"14\" fill=\"#1b2250\" stroke=\"#7c5cff\" stroke-width=\"2\"\/><text x=\"1050\" y=\"378\" text-anchor=\"middle\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"20\" font-weight=\"700\" fill=\"#fff\">Output<\/text><text x=\"1050\" y=\"401\" text-anchor=\"middle\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"14\" fill=\"#9fb2ff\">new text<\/text><\/g>\n<circle r=\"7\" fill=\"#7c5cff\"><animateMotion dur=\"5s\" repeatCount=\"indefinite\"><mpath href=\"#ddflow\"\/><\/animateMotion><\/circle>\n<circle r=\"5\" fill=\"#3178c6\"><animateMotion dur=\"5s\" begin=\"1.6s\" repeatCount=\"indefinite\"><mpath href=\"#ddflow\"\/><\/animateMotion><\/circle>\n<circle r=\"4\" fill=\"#ffffff\"><animateMotion dur=\"5s\" begin=\"3.2s\" repeatCount=\"indefinite\"><mpath href=\"#ddflow\"\/><\/animateMotion><\/circle>\n<text x=\"60\" y=\"490\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"16\" fill=\"#7f89b5\">devdojo.co.in \u00b7 Beginner friendly \u00b7 Python + Node.js examples<\/text>\n<\/svg>\n<\/div>\n\n<div class=\"dd-series\">Series: Generative AI <span>Part 1 of 30<\/span><\/div>\n<p class=\"dd-prereq\"><strong>What you should know first:<\/strong> nothing special. This is the very first part. If you can run a small Python or JavaScript file, you are ready.<\/p>\n\n<p>You have used ChatGPT, Claude or Gemini. You have seen AI write code, draw pictures and summarise long documents. But <strong>what is generative AI<\/strong>, really, and how does a computer &#8220;write&#8221; something new? In this first part of the DevDojo Generative AI series, we will answer that question in simple English, look at how large language models (LLMs) work under the hood, and write your first small programs, including one that runs a real AI model on your own laptop.<\/p>\n\n<div class=\"dd-summary\">\n<strong class=\"lbl\">Quick Summary<\/strong>\n<ul>\n<li><strong>Generative AI<\/strong> is AI that creates new content (text, code, images, audio, video) instead of only sorting or predicting labels.<\/li>\n<li>Text models like GPT, Claude and Gemini are <strong>large language models<\/strong>. They work by predicting the <em>next token<\/em> (a small piece of text), again and again.<\/li>\n<li>They learn patterns from huge amounts of text during <strong>training<\/strong>, then answer your prompts during <strong>inference<\/strong>.<\/li>\n<li>They are powerful but can be <strong>confidently wrong<\/strong> (&#8220;hallucinations&#8221;), so developers must check and ground their output.<\/li>\n<li>You can try one today with a cloud API (OpenAI, Anthropic, Google) or free and offline with <strong>Ollama<\/strong>.<\/li>\n<\/ul>\n<\/div>\n\n<details class=\"dd-roadmap\">\n<summary>Full Generative AI roadmap (30 parts)<\/summary>\n<h4>Beginner<\/h4>\n<ol start=\"1\">\n<li>What Is Generative AI and How Do LLMs Work? <span class=\"here\">You are here<\/span><\/li>\n<li>Tokens, Context Windows and Model Parameters <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Your First LLM API Calls in Python and Node.js (OpenAI, Anthropic, Gemini) <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Prompt Engineering Basics: Roles, Instructions and Examples <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Temperature, Top-p and Controlling Model Output <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Running Open Models Locally with Ollama <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Streaming Responses and Building a Simple Chat UI <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Structured Outputs: Getting Reliable JSON from LLMs <span class=\"soon\">Coming soon<\/span><\/li>\n<\/ol>\n<h4>Intermediate<\/h4>\n<ol start=\"9\">\n<li>Embeddings Explained: Turning Text into Vectors <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Vector Databases: pgvector, Chroma and Pinecone <span class=\"soon\">Coming soon<\/span><\/li>\n<li>RAG Fundamentals: Retrieval-Augmented Generation <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Document Loading and Chunking Strategies <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Better RAG: Hybrid Search, Re-ranking and Query Rewriting <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Function Calling and Tool Use <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Conversation Memory and Long Context Management <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Multimodal AI: Vision, Images and Audio Inputs <span class=\"soon\">Coming soon<\/span><\/li>\n<li>How Image Generation Works: Diffusion Models Basics <span class=\"soon\">Coming soon<\/span><\/li>\n<li>LangChain vs LlamaIndex: When to Use a Framework <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Testing LLM Apps: Evals, Metrics and Test Sets <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Cutting Cost and Latency: Caching, Batching and Model Choice <span class=\"soon\">Coming soon<\/span><\/li>\n<\/ol>\n<h4>Advanced<\/h4>\n<ol start=\"21\">\n<li>Fine-Tuning vs Prompting vs RAG: Choosing the Right Tool <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Fine-Tuning an Open Model with LoRA <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Transformers Deep Dive: Attention Explained Simply <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Reasoning Models and Thinking Time <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Guardrails, Safety and Prompt Injection Defence <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Monitoring and Tracing LLM Apps in Production <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Serving Open Models: vLLM, Quantization and GPUs <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Building a Production GenAI App End to End <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Responsible AI: Privacy, Licensing and Bias <span class=\"soon\">Coming soon<\/span><\/li>\n<li>Final Project: Build Your Own AI Knowledge Assistant <span class=\"soon\">Coming soon<\/span><\/li>\n<\/ol>\n<\/details>\n\n<nav class=\"dd-toc\" aria-label=\"Table of contents\">\n<strong>In this post<\/strong>\n<ol>\n<li><a href=\"#what-is-generative-ai\">What is generative AI?<\/a><\/li>\n<li><a href=\"#ai-ml-dl-genai\">AI vs ML vs deep learning vs GenAI<\/a><\/li>\n<li><a href=\"#types\">Types of generative AI<\/a><\/li>\n<li><a href=\"#how-llms-work\">How LLMs work: next-token prediction<\/a><\/li>\n<li><a href=\"#toy-model\">Build a tiny text generator<\/a><\/li>\n<li><a href=\"#tokens\">See real tokens<\/a><\/li>\n<li><a href=\"#training\">Training vs inference<\/a><\/li>\n<li><a href=\"#first-call\">Your first real LLM call<\/a><\/li>\n<li><a href=\"#local\">Run a model locally with Ollama<\/a><\/li>\n<li><a href=\"#limits\">Limits: hallucinations and more<\/a><\/li>\n<li><a href=\"#errors\">Common errors and fixes<\/a><\/li>\n<li><a href=\"#best-practices\">Best practices<\/a><\/li>\n<li><a href=\"#practice\">Practice task<\/a><\/li>\n<li><a href=\"#faq\">FAQ<\/a><\/li>\n<\/ol>\n<\/nav>\n<\/div>\n\n\n\n<div class=\"dd-post\">\n<h2 id=\"what-is-generative-ai\">What is generative AI? (simple definition)<\/h2>\n<p><strong>Generative AI<\/strong> is a type of artificial intelligence that <strong>creates new content<\/strong> which looks like the data it learned from. Show it millions of sentences and it learns to write sentences. Show it millions of images with captions and it learns to draw images from a caption.<\/p>\n<p>The key word is <em>generate<\/em>. Older, &#8220;traditional&#8221; AI systems mostly <strong>classify<\/strong> or <strong>predict a number<\/strong>:<\/p>\n<ul>\n<li>Is this email spam or not spam?<\/li>\n<li>What will this house sell for?<\/li>\n<li>Is this photo a cat or a dog?<\/li>\n<\/ul>\n<p>A generative model does something different. You ask, &#8220;Write a polite reply to this customer email&#8221;, and it produces a brand-new reply that did not exist before. You ask, &#8220;Write a Python function that checks if a string is a palindrome&#8221;, and it writes the code.<\/p>\n\n<div class=\"dd-note\"><strong>Simple way to remember:<\/strong> traditional AI <em>picks an answer from a fixed list<\/em>. Generative AI <em>creates the answer<\/em>.<\/div>\n\n<h2 id=\"ai-ml-dl-genai\">AI vs machine learning vs deep learning vs generative AI<\/h2>\n<p>These words are often mixed up. Think of them as circles inside circles:<\/p>\n<ul>\n<li><strong>Artificial Intelligence (AI)<\/strong> \u2013 the big idea: computers doing tasks that normally need human intelligence.<\/li>\n<li><strong>Machine Learning (ML)<\/strong> \u2013 a way to build AI where the computer <em>learns patterns from data<\/em> instead of following hand-written rules.<\/li>\n<li><strong>Deep Learning<\/strong> \u2013 machine learning with large <em>neural networks<\/em> (many layers of simple math units).<\/li>\n<li><strong>Generative AI<\/strong> \u2013 deep learning models that <em>create<\/em> new content. Large language models are the most famous example.<\/li>\n<\/ul>\n\n<figure>\n<svg viewBox=\"0 0 800 420\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" role=\"img\" aria-label=\"Nested circles diagram: Artificial Intelligence contains Machine Learning, which contains Deep Learning, which contains Generative AI\">\n<rect width=\"800\" height=\"420\" fill=\"#f8f9fc\"\/>\n<ellipse cx=\"400\" cy=\"215\" rx=\"370\" ry=\"190\" fill=\"#e8eeff\" stroke=\"#3178c6\" stroke-width=\"2\"\/>\n<ellipse cx=\"430\" cy=\"235\" rx=\"280\" ry=\"150\" fill=\"#dfe3ff\" stroke=\"#5a6fd6\" stroke-width=\"2\"\/>\n<ellipse cx=\"460\" cy=\"255\" rx=\"190\" ry=\"110\" fill=\"#d3ccff\" stroke=\"#7c5cff\" stroke-width=\"2\"\/>\n<ellipse cx=\"490\" cy=\"275\" rx=\"110\" ry=\"66\" fill=\"#7c5cff\"\/>\n<text x=\"110\" y=\"120\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"22\" font-weight=\"700\" fill=\"#151b3b\">Artificial Intelligence<\/text>\n<text x=\"110\" y=\"146\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"14\" fill=\"#5b6275\">rules, search, chess engines\u2026<\/text>\n<text x=\"200\" y=\"185\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"20\" font-weight=\"700\" fill=\"#151b3b\">Machine Learning<\/text>\n<text x=\"200\" y=\"208\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"14\" fill=\"#5b6275\">spam filters, price prediction<\/text>\n<text x=\"300\" y=\"236\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"18\" font-weight=\"700\" fill=\"#151b3b\">Deep Learning<\/text>\n<text x=\"300\" y=\"256\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"13\" fill=\"#3a2fa0\">face unlock, speech-to-text<\/text>\n<text x=\"490\" y=\"272\" text-anchor=\"middle\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"18\" font-weight=\"800\" fill=\"#fff\">Generative AI<\/text>\n<text x=\"490\" y=\"294\" text-anchor=\"middle\" font-family=\"Segoe UI,Arial,sans-serif\" font-size=\"13\" fill=\"#eee\">LLMs, image models<\/text>\n<\/svg>\n<figcaption>Generative AI is a small but fast-growing circle inside deep learning, machine learning and AI.<\/figcaption>\n<\/figure>\n\n<h2 id=\"types\">Types of generative AI (try the tabs)<\/h2>\n<p>Generative AI is not only chatbots. Click each tab to see what kind of content each family of models creates and where developers use it.<\/p>\n\n<div class=\"dd-tabs\">\n<input type=\"radio\" name=\"ddgt\" id=\"ti1\" checked>\n<input type=\"radio\" name=\"ddgt\" id=\"ti2\">\n<input type=\"radio\" name=\"ddgt\" id=\"ti3\">\n<input type=\"radio\" name=\"ddgt\" id=\"ti4\">\n<div class=\"labels\"><label for=\"ti1\">Text &amp; Chat<\/label><label for=\"ti2\">Code<\/label><label for=\"ti3\">Images &amp; Video<\/label><label for=\"ti4\">Audio &amp; Voice<\/label><\/div>\n<div class=\"panel p1\"><p><strong>Large language models (LLMs)<\/strong> such as OpenAI GPT models, Anthropic Claude, Google Gemini, Meta Llama and Mistral. They write emails, answer questions, summarise documents, translate languages and power chatbots and customer support. This is the main focus of this series.<\/p><\/div>\n<div class=\"panel p2\"><p><strong>Code models<\/strong> are usually the same LLMs, trained on lots of source code. They power tools like GitHub Copilot, Claude Code and Cursor: autocomplete, writing tests, explaining old code and fixing bugs. We already covered how to guide coding agents in our <a href=\"https:\/\/devdojo.co.in\/index.php\/2026\/10\/16\/agents-md-guide\/\">AGENTS.md guide<\/a>.<\/p><\/div>\n<div class=\"panel p3\"><p><strong>Image and video models<\/strong> (diffusion models) start with random noise and slowly &#8220;clean&#8221; it into a picture that matches your text prompt. Used for marketing images, UI mockups, thumbnails and short video clips. We will open the box in Part 17.<\/p><\/div>\n<div class=\"panel p4\"><p><strong>Audio models<\/strong> turn text into natural speech, speech into text, or even generate music. Developers use them for voice assistants, call-centre bots, podcast tools and accessibility features.<\/p><\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"dd-post\">\n<h2 id=\"how-llms-work\">How do large language models work? Next-token prediction<\/h2>\n<p>Here is the surprising secret: an LLM has <strong>one main job<\/strong>. Given some text, it predicts <strong>what comes next<\/strong>. That&#8217;s it. Everything else (answering questions, writing code, chatting) comes from doing this one job extremely well, over and over.<\/p>\n<p>The steps look like this:<\/p>\n<ol>\n<li><strong>Tokenize:<\/strong> your prompt is split into <em>tokens<\/em>, small pieces of text (often part of a word). Each token is turned into a number.<\/li>\n<li><strong>Understand context:<\/strong> the model (a <em>transformer<\/em> neural network) looks at all the tokens together and works out how they relate to each other. This is called <em>attention<\/em>.<\/li>\n<li><strong>Score every possible next token:<\/strong> the model outputs a probability for every token in its vocabulary. For &#8220;The capital of India is&#8221;, the token &#8221; New&#8221; might get 92%.<\/li>\n<li><strong>Pick one token:<\/strong> it chooses a token (usually a likely one, with a bit of randomness controlled by a setting called <em>temperature<\/em>).<\/li>\n<li><strong>Repeat:<\/strong> the chosen token is added to the text and the whole thing runs again, until the answer is complete.<\/li>\n<\/ol>\n\n<figure>\n<svg viewBox=\"0 0 900 360\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" role=\"img\" aria-label=\"Diagram of the next-token loop: prompt, tokenizer, transformer model, probabilities for next token, pick a token, and append it back to the text\">\n<rect width=\"900\" height=\"360\" fill=\"#0f1430\"\/>\n<defs><marker id=\"ddar\" viewBox=\"0 0 10 10\" refX=\"9\" refY=\"5\" markerWidth=\"8\" markerHeight=\"8\" orient=\"auto\"><path d=\"M0 0L10 5L0 10z\" fill=\"#7c5cff\"\/><\/marker><\/defs>\n<g font-family=\"Segoe UI,Arial,sans-serif\">\n<rect x=\"30\" y=\"60\" width=\"160\" height=\"64\" rx=\"12\" fill=\"#1b2250\" stroke=\"#3178c6\"\/><text x=\"110\" y=\"88\" text-anchor=\"middle\" fill=\"#fff\" font-size=\"16\" font-weight=\"700\">Text so far<\/text><text x=\"110\" y=\"108\" text-anchor=\"middle\" fill=\"#9fb2ff\" font-size=\"12\">&#8220;The capital of India is&#8221;<\/text>\n<rect x=\"250\" y=\"60\" width=\"140\" height=\"64\" rx=\"12\" fill=\"#1b2250\" stroke=\"#3178c6\"\/><text x=\"320\" y=\"88\" text-anchor=\"middle\" fill=\"#fff\" font-size=\"16\" font-weight=\"700\">Tokenizer<\/text><text x=\"320\" y=\"108\" text-anchor=\"middle\" fill=\"#9fb2ff\" font-size=\"12\">text \u2192 numbers<\/text>\n<rect x=\"450\" y=\"45\" width=\"170\" height=\"94\" rx=\"14\" fill=\"#7c5cff\"\/><text x=\"535\" y=\"85\" text-anchor=\"middle\" fill=\"#fff\" font-size=\"18\" font-weight=\"800\">Transformer<\/text><text x=\"535\" y=\"108\" text-anchor=\"middle\" fill=\"#efeaff\" font-size=\"12\">attention over all tokens<\/text>\n<rect x=\"680\" y=\"40\" width=\"190\" height=\"130\" rx=\"12\" fill=\"#1b2250\" stroke=\"#7c5cff\"\/><text x=\"775\" y=\"64\" text-anchor=\"middle\" fill=\"#fff\" font-size=\"15\" font-weight=\"700\">Next-token odds<\/text>\n<text x=\"700\" y=\"92\" fill=\"#c9d1ff\" font-size=\"13\">&#8221; New&#8221;<\/text><rect x=\"760\" y=\"82\" width=\"92\" height=\"12\" rx=\"3\" fill=\"#3178c6\"\/>\n<text x=\"700\" y=\"118\" fill=\"#c9d1ff\" font-size=\"13\">&#8221; Delhi&#8221;<\/text><rect x=\"760\" y=\"108\" width=\"10\" height=\"12\" rx=\"3\" fill=\"#3178c6\"\/>\n<text x=\"700\" y=\"144\" fill=\"#c9d1ff\" font-size=\"13\">&#8221; Mumbai&#8221;<\/text><rect x=\"760\" y=\"134\" width=\"5\" height=\"12\" rx=\"3\" fill=\"#3178c6\"\/>\n<rect x=\"680\" y=\"230\" width=\"190\" height=\"64\" rx=\"12\" fill=\"#1b2250\" stroke=\"#1f9d61\"\/><text x=\"775\" y=\"258\" text-anchor=\"middle\" fill=\"#fff\" font-size=\"16\" font-weight=\"700\">Pick a token<\/text><text x=\"775\" y=\"278\" text-anchor=\"middle\" fill=\"#9be7b0\" font-size=\"12\">&#8221; New&#8221; (temperature)<\/text>\n<rect x=\"300\" y=\"230\" width=\"300\" height=\"64\" rx=\"12\" fill=\"#1b2250\" stroke=\"#3178c6\"\/><text x=\"450\" y=\"258\" text-anchor=\"middle\" fill=\"#fff\" font-size=\"16\" font-weight=\"700\">Append &amp; repeat<\/text><text x=\"450\" y=\"278\" text-anchor=\"middle\" fill=\"#9fb2ff\" font-size=\"12\">&#8220;The capital of India is New&#8221; \u2192 run again<\/text>\n<path d=\"M190 92H245M390 92H445M620 92H675\" stroke=\"#7c5cff\" stroke-width=\"2.5\" marker-end=\"url(#ddar)\"\/>\n<path d=\"M775 170V225M680 262H605M300 262H110V130\" stroke=\"#7c5cff\" stroke-width=\"2.5\" fill=\"none\" marker-end=\"url(#ddar)\"\/>\n<text x=\"120\" y=\"200\" fill=\"#7f89b5\" font-size=\"12\">loop until done<\/text>\n<\/g>\n<\/svg>\n<figcaption>An LLM writes one token at a time. Each new token is added to the text, and the model runs again.<\/figcaption>\n<\/figure>\n\n<div class=\"dd-tip\"><strong>Why this matters for you as a developer:<\/strong> because the model is predicting likely text, it does not &#8220;look up&#8221; facts in a database. It produces what <em>sounds<\/em> right based on patterns. That explains both its magic and its mistakes.<\/div>\n\n<h2 id=\"toy-model\">Build a tiny text generator in pure Python<\/h2>\n<p>Real LLMs have billions of numbers inside them, but the core idea fits in 20 lines. The program below &#8220;trains&#8221; on a few sentences by counting which word follows which, then generates new sentences by picking a next word again and again. No libraries needed.<\/p>\n<div class=\"dd-vsc\" role=\"group\" aria-label=\"Code editor: tiny_generator.py\">\n<input type=\"radio\" name=\"v1\" id=\"v1f1\" class=\"f1\" checked>\n<input type=\"checkbox\" id=\"v1r1\" class=\"r1\">\n<div class=\"dd-vsc-bar\"><span class=\"dd-dots\"><i><\/i><i><\/i><i><\/i><\/span><span class=\"dd-vsc-title\">tiny_generator.py \u2014 devdojo-genai \u2014 Visual Studio Code<\/span><\/div>\n<div class=\"dd-vsc-tabs\">\n<label for=\"v1f1\" class=\"t1\"><b class=\"ic py\">PY<\/b>tiny_generator.py<\/label>\n<label for=\"v1r1\" class=\"run run1\" title=\"Show the output in the terminal\">\u25b6 Run<\/label>\n<\/div>\n<div class=\"dd-vsc-pane p1\">\n<div class=\"dd-vsc-crumbs\">devdojo-genai \u203a tiny_generator.py<\/div>\n<pre class=\"dd-vsc-code\"><code><span class=\"l\"><span class=\"kn\">import<\/span> <span class=\"n\">random<\/span><\/span>\n<span class=\"l\"><span class=\"kn\">from<\/span> <span class=\"n\">collections<\/span> <span class=\"kn\">import<\/span> <span class=\"n\">defaultdict<\/span><\/span>\n<span class=\"l\"><\/span>\n<span class=\"l\"><span class=\"n\">text<\/span> = <span class=\"s\">\"\"\"the cat sat on the mat . the dog sat on the rug .<\/span><\/span>\n<span class=\"l\"><span class=\"s\">the cat saw the dog . the dog saw the cat .\"\"\"<\/span><\/span>\n<span class=\"l\"><\/span>\n<span class=\"l\"><span class=\"c\"># \"Training\": remember which word comes after each word<\/span><\/span>\n<span class=\"l\"><span class=\"n\">words<\/span> = <span class=\"n\">text<\/span>.<span class=\"n\">split<\/span>()<\/span>\n<span class=\"l\"><span class=\"n\">next_words<\/span> = <span class=\"n\">defaultdict<\/span>(<span class=\"nb\">list<\/span>)<\/span>\n<span class=\"l\"><span class=\"k\">for<\/span> <span class=\"n\">current<\/span>, <span class=\"n\">nxt<\/span> <span class=\"k\">in<\/span> <span class=\"nb\">zip<\/span>(<span class=\"n\">words<\/span>, <span class=\"n\">words<\/span>[<span class=\"m\">1<\/span>:]):<\/span>\n<span class=\"l\">    <span class=\"n\">next_words<\/span>[<span class=\"n\">current<\/span>].<span class=\"n\">append<\/span>(<span class=\"n\">nxt<\/span>)<\/span>\n<span class=\"l\"><\/span>\n<span class=\"l\"><span class=\"k\">def<\/span> <span class=\"nf\">generate<\/span>(<span class=\"n\">start<\/span>=<span class=\"s\">\"the\"<\/span>, <span class=\"n\">length<\/span>=<span class=\"m\">8<\/span>, <span class=\"n\">seed<\/span>=<span class=\"kc\">None<\/span>):<\/span>\n<span class=\"l\">    <span class=\"n\">rng<\/span> = <span class=\"n\">random<\/span>.<span class=\"n\">Random<\/span>(<span class=\"n\">seed<\/span>)<\/span>\n<span class=\"l\">    <span class=\"n\">out<\/span> = [<span class=\"n\">start<\/span>]<\/span>\n<span class=\"l\">    <span class=\"k\">for<\/span> <span class=\"n\">_<\/span> <span class=\"k\">in<\/span> <span class=\"nb\">range<\/span>(<span class=\"n\">length<\/span>):<\/span>\n<span class=\"l\">        <span class=\"n\">options<\/span> = <span class=\"n\">next_words<\/span>.<span class=\"n\">get<\/span>(<span class=\"n\">out<\/span>[-<span class=\"m\">1<\/span>])<\/span>\n<span class=\"l\">        <span class=\"k\">if<\/span> <span class=\"k\">not<\/span> <span class=\"n\">options<\/span>:          <span class=\"c\"># no known next word<\/span><\/span>\n<span class=\"l\">            <span class=\"k\">break<\/span><\/span>\n<span class=\"l\">        <span class=\"n\">out<\/span>.<span class=\"n\">append<\/span>(<span class=\"n\">rng<\/span>.<span class=\"n\">choice<\/span>(<span class=\"n\">options<\/span>))   <span class=\"c\"># \"predict\" the next word<\/span><\/span>\n<span class=\"l\">    <span class=\"k\">return<\/span> <span class=\"s\">\"<\/span> <span class=\"s\">\"<\/span>.<span class=\"n\">join<\/span>(<span class=\"n\">out<\/span>)<\/span>\n<span class=\"l\"><\/span>\n<span class=\"l\"><span class=\"nb\">print<\/span>(<span class=\"n\">generate<\/span>(<span class=\"n\">seed<\/span>=<span class=\"m\">1<\/span>))<\/span>\n<span class=\"l\"><span class=\"nb\">print<\/span>(<span class=\"n\">generate<\/span>(<span class=\"n\">seed<\/span>=<span class=\"m\">7<\/span>))<\/span>\n<span class=\"l\"><span class=\"nb\">print<\/span>(<span class=\"nb\">dict<\/span>(<span class=\"n\">next_words<\/span>)[<span class=\"s\">\"the\"<\/span>])  <span class=\"c\"># what can follow \"the\"?<\/span><\/span><\/code><\/pre>\n<div class=\"dd-vsc-term\"><div class=\"dd-term-head\"><span>TERMINAL<\/span><span>OUTPUT<\/span><span>PROBLEMS<\/span><span class=\"dd-term-note\">Real output from Python 3<\/span><\/div><pre><code><span class=\"gp\">$<\/span> python tiny_generator.py\nthe dog saw the cat sat on the cat\nthe dog sat on the mat . the cat\n['cat', 'mat', 'dog', 'rug', 'cat', 'dog', 'dog', 'cat']<\/code><\/pre><\/div>\n<div class=\"dd-vsc-status\"><span>\u2387 main<\/span><span>Ln 25, Col 1<\/span><span class=\"sp\"><\/span><span>Spaces: 4<\/span><span>UTF-8<\/span><span>LF<\/span><span>Python<\/span><\/div>\n<\/div>\n<\/div>\n<p>Run it with <code>python tiny_generator.py<\/code>. You will get sentences like <em>&#8220;the dog sat on the mat . the cat&#8221;<\/em> \u2013 sentences that never appeared in the training text but follow its patterns. That is generation!<\/p>\n<p>A real LLM does the same thing with three big upgrades: it uses <strong>tokens<\/strong> instead of whole words, it looks at <strong>thousands of previous tokens<\/strong> instead of just one, and it learns <strong>billions of weights<\/strong> in a neural network instead of a simple count table.<\/p>\n<\/div>\n\n\n\n<div class=\"dd-post\">\n<h2 id=\"tokens\">See real tokens with tiktoken<\/h2>\n<p>Models don&#8217;t read letters or words. They read <strong>tokens<\/strong>. Let&#8217;s see how real text is split. <code>tiktoken<\/code> is OpenAI&#8217;s open-source tokenizer library.<\/p>\n<div class=\"dd-vsc\" role=\"group\" aria-label=\"Code editor: tokens_demo.py\">\n<input type=\"radio\" name=\"v2\" id=\"v2f1\" class=\"f1\" checked>\n<input type=\"checkbox\" id=\"v2r1\" class=\"r1\">\n<div class=\"dd-vsc-bar\"><span class=\"dd-dots\"><i><\/i><i><\/i><i><\/i><\/span><span class=\"dd-vsc-title\">tokens_demo.py \u2014 devdojo-genai \u2014 Visual Studio Code<\/span><\/div>\n<div class=\"dd-vsc-tabs\">\n<label for=\"v2f1\" class=\"t1\"><b class=\"ic py\">PY<\/b>tokens_demo.py<\/label>\n<label for=\"v2r1\" class=\"run run1\" title=\"Show the output in the terminal\">\u25b6 Run<\/label>\n<\/div>\n<div class=\"dd-vsc-pane p1\">\n<div class=\"dd-vsc-crumbs\">devdojo-genai \u203a tokens_demo.py<\/div>\n<pre class=\"dd-vsc-code\"><code><span class=\"l\"><span class=\"c\"># pip install tiktoken<\/span><\/span>\n<span class=\"l\"><span class=\"kn\">import<\/span> <span class=\"n\">tiktoken<\/span><\/span>\n<span class=\"l\"><\/span>\n<span class=\"l\"><span class=\"n\">enc<\/span> = <span class=\"n\">tiktoken<\/span>.<span class=\"n\">get_encoding<\/span>(<span class=\"s\">\"o200k_base\"<\/span>)   <span class=\"c\"># tokenizer used by recent OpenAI models<\/span><\/span>\n<span class=\"l\"><\/span>\n<span class=\"l\"><span class=\"n\">text<\/span> = <span class=\"s\">\"DevDojo teaches Generative AI in simple English!\"<\/span><\/span>\n<span class=\"l\"><span class=\"n\">ids<\/span> = <span class=\"n\">enc<\/span>.<span class=\"n\">encode<\/span>(<span class=\"n\">text<\/span>)<\/span>\n<span class=\"l\"><\/span>\n<span class=\"l\"><span class=\"nb\">print<\/span>(<span class=\"nb\">len<\/span>(<span class=\"n\">ids<\/span>), <span class=\"s\">\"tokens\"<\/span>)<\/span>\n<span class=\"l\"><span class=\"nb\">print<\/span>(<span class=\"n\">ids<\/span>)<\/span>\n<span class=\"l\"><span class=\"nb\">print<\/span>([<span class=\"n\">enc<\/span>.<span class=\"n\">decode<\/span>([<span class=\"n\">i<\/span>]) <span class=\"k\">for<\/span> <span class=\"n\">i<\/span> <span class=\"k\">in<\/span> <span class=\"n\">ids<\/span>])   <span class=\"c\"># show each piece of text<\/span><\/span><\/code><\/pre>\n<div class=\"dd-vsc-term\"><div class=\"dd-term-head\"><span>TERMINAL<\/span><span>OUTPUT<\/span><span>PROBLEMS<\/span><span class=\"dd-term-note\">Shape of the output \u2013 run it to see the real IDs<\/span><\/div><pre><code><span class=\"gp\">$<\/span> python tokens_demo.py\n&lt;number of tokens&gt; tokens\n[&lt;one ID number per token&gt;]\n[&lt;the piece of text for each token&gt;]<\/code><\/pre><\/div>\n<div class=\"dd-vsc-status\"><span>\u2387 main<\/span><span>Ln 11, Col 1<\/span><span class=\"sp\"><\/span><span>Spaces: 4<\/span><span>UTF-8<\/span><span>LF<\/span><span>Python<\/span><\/div>\n<\/div>\n<\/div>\n<p>You will see that common words are a single token while rare words like &#8220;DevDojo&#8221; are split into several pieces. A rough rule for English: <strong>1 token \u2248 4 characters \u2248 \u00be of a word<\/strong>. Hindi and other languages often use more tokens per word. Tokens matter because:<\/p>\n<ul>\n<li><strong>Pricing<\/strong> for cloud APIs is per token (input and output counted separately).<\/li>\n<li><strong>Context window<\/strong> \u2013 the maximum text a model can see at once \u2013 is measured in tokens.<\/li>\n<li><strong>Speed<\/strong> \u2013 the model generates output one token at a time.<\/li>\n<\/ul>\n<p>We will go much deeper into tokens and context windows in Part 2.<\/p>\n\n<h2 id=\"training\">Training vs inference: how an LLM learns<\/h2>\n<p>An LLM&#8217;s life has two phases:<\/p>\n<div class=\"dd-cards\">\n<div class=\"dd-card\"><b>1. Pre-training<\/b>The model reads a huge amount of public text and code and plays &#8220;guess the next token&#8221; trillions of times. Each wrong guess slightly adjusts its weights. This takes thousands of GPUs and costs millions of dollars.<\/div>\n<div class=\"dd-card\"><b>2. Fine-tuning<\/b>The raw model is then taught to be a helpful assistant using example conversations and human feedback, so it follows instructions and refuses harmful requests.<\/div>\n<div class=\"dd-card\"><b>3. Inference<\/b>This is when <em>you<\/em> use it. The weights are frozen; the model just runs the next-token loop on your prompt. Every API call is inference.<\/div>\n<\/div>\n<div class=\"dd-note\"><strong>Important:<\/strong> during normal use, the model does <strong>not<\/strong> learn from your chat. Its knowledge stops at its <em>training cutoff<\/em> date. To give it fresh or private information, you put that information in the prompt \u2013 the idea behind RAG (Retrieval-Augmented Generation), which we cover from Part 11.<\/div>\n\n<h2 id=\"first-call\">Your first real LLM call (Python and Node.js)<\/h2>\n<p>Enough theory. Let&#8217;s call a real model. OpenAI recommends its <strong>Responses API<\/strong> for new projects (see the official <a href=\"https:\/\/developers.openai.com\/api\/docs\/guides\/text\" target=\"_blank\" rel=\"noopener\">text generation guide<\/a>). You need an API key from the OpenAI platform, saved as the environment variable <code>OPENAI_API_KEY<\/code>.<\/p>\n<div class=\"dd-vsc\" role=\"group\" aria-label=\"Code editor: first_call.py, first-call.mjs\">\n<input type=\"radio\" name=\"v3\" id=\"v3f1\" class=\"f1\" checked>\n<input type=\"radio\" name=\"v3\" id=\"v3f2\" class=\"f2\">\n<input type=\"checkbox\" id=\"v3r1\" class=\"r1\">\n<input type=\"checkbox\" id=\"v3r2\" class=\"r2\">\n<div class=\"dd-vsc-bar\"><span class=\"dd-dots\"><i><\/i><i><\/i><i><\/i><\/span><span class=\"dd-vsc-title\">2 files \u2014 devdojo-genai \u2014 Visual Studio Code<\/span><\/div>\n<div class=\"dd-vsc-tabs\">\n<label for=\"v3f1\" class=\"t1\"><b class=\"ic py\">PY<\/b>first_call.py<\/label>\n<label for=\"v3f2\" class=\"t2\"><b class=\"ic js\">JS<\/b>first-call.mjs<\/label>\n<label for=\"v3r1\" class=\"run run1\" title=\"Show the output in the terminal\">\u25b6 Run<\/label>\n<label for=\"v3r2\" class=\"run run2\" title=\"Show the output in the terminal\">\u25b6 Run<\/label>\n<\/div>\n<div class=\"dd-vsc-pane p1\">\n<div class=\"dd-vsc-crumbs\">devdojo-genai \u203a first_call.py<\/div>\n<pre class=\"dd-vsc-code\"><code><span class=\"l\"><span class=\"c\"># pip install openai<\/span><\/span>\n<span class=\"l\"><span class=\"c\"># export OPENAI_API_KEY=\"sk-...\"   (Windows PowerShell: $env:OPENAI_API_KEY=\"sk-...\")<\/span><\/span>\n<span class=\"l\"><span class=\"kn\">import<\/span> <span class=\"n\">os<\/span><\/span>\n<span class=\"l\"><span class=\"kn\">from<\/span> <span class=\"n\">openai<\/span> <span class=\"kn\">import<\/span> <span class=\"n\">OpenAI<\/span><\/span>\n<span class=\"l\"><\/span>\n<span class=\"l\"><span class=\"n\">client<\/span> = <span class=\"n\">OpenAI<\/span>()  <span class=\"c\"># reads OPENAI_API_KEY automatically<\/span><\/span>\n<span class=\"l\"><\/span>\n<span class=\"l\"><span class=\"n\">response<\/span> = <span class=\"n\">client<\/span>.<span class=\"n\">responses<\/span>.<span class=\"n\">create<\/span>(<\/span>\n<span class=\"l\">    <span class=\"n\">model<\/span>=<span class=\"n\">os<\/span>.<span class=\"n\">getenv<\/span>(<span class=\"s\">\"OPENAI_MODEL\"<\/span>, <span class=\"s\">\"gpt-5.5\"<\/span>),   <span class=\"c\"># check the models page for the latest<\/span><\/span>\n<span class=\"l\">    <span class=\"n\">instructions<\/span>=<span class=\"s\">\"You are a friendly teacher. Answer in 3 short bullet points.\"<\/span>,<\/span>\n<span class=\"l\">    <span class=\"nb\">input<\/span>=<span class=\"s\">\"Explain generative AI to a beginner developer.\"<\/span>,<\/span>\n<span class=\"l\">)<\/span>\n<span class=\"l\"><\/span>\n<span class=\"l\"><span class=\"nb\">print<\/span>(<span class=\"n\">response<\/span>.<span class=\"n\">output_text<\/span>)<\/span><\/code><\/pre>\n<div class=\"dd-vsc-term\"><div class=\"dd-term-head\"><span>TERMINAL<\/span><span>OUTPUT<\/span><span>PROBLEMS<\/span><span class=\"dd-term-note\">Example output \u2013 the model&#x27;s wording will differ<\/span><\/div><pre><code><span class=\"gp\">$<\/span> python first_call.py\n\u2022 Generative AI is AI that creates new content, like text, code or images.\n\u2022 It learns patterns from lots of examples, then predicts what should come next.\n\u2022 As a developer, you call it through an API and guide it with clear prompts.<\/code><\/pre><\/div>\n<div class=\"dd-vsc-status\"><span>\u2387 main<\/span><span>Ln 14, Col 1<\/span><span class=\"sp\"><\/span><span>Spaces: 4<\/span><span>UTF-8<\/span><span>LF<\/span><span>Python<\/span><\/div>\n<\/div>\n<div class=\"dd-vsc-pane p2\">\n<div class=\"dd-vsc-crumbs\">devdojo-genai \u203a first-call.mjs<\/div>\n<pre class=\"dd-vsc-code\"><code><span class=\"l\"><span class=\"c\">\/\/ npm install openai<\/span><\/span>\n<span class=\"l\"><span class=\"k\">import<\/span> <span class=\"n\">OpenAI<\/span> <span class=\"k\">from<\/span> <span class=\"s\">\"openai\"<\/span>;<\/span>\n<span class=\"l\"><\/span>\n<span class=\"l\"><span class=\"k\">const<\/span> <span class=\"n\">client<\/span> = <span class=\"k\">new<\/span> <span class=\"n\">OpenAI<\/span>(); <span class=\"c\">\/\/ reads process.env.OPENAI_API_KEY<\/span><\/span>\n<span class=\"l\"><\/span>\n<span class=\"l\"><span class=\"k\">const<\/span> <span class=\"n\">response<\/span> = <span class=\"k\">await<\/span> <span class=\"n\">client<\/span>.<span class=\"n\">responses<\/span>.<span class=\"n\">create<\/span>({<\/span>\n<span class=\"l\">  <span class=\"n\">model<\/span>: <span class=\"n\">process<\/span>.<span class=\"n\">env<\/span>.<span class=\"n\">OPENAI_MODEL<\/span> ?? <span class=\"s\">\"gpt-5.5\"<\/span>,<\/span>\n<span class=\"l\">  <span class=\"n\">instructions<\/span>: <span class=\"s\">\"You are a friendly teacher. Answer in 3 short bullet points.\"<\/span>,<\/span>\n<span class=\"l\">  <span class=\"n\">input<\/span>: <span class=\"s\">\"Explain generative AI to a beginner developer.\"<\/span>,<\/span>\n<span class=\"l\">});<\/span>\n<span class=\"l\"><\/span>\n<span class=\"l\"><span class=\"n\">console<\/span>.<span class=\"n\">log<\/span>(<span class=\"n\">response<\/span>.<span class=\"n\">output_text<\/span>);<\/span><\/code><\/pre>\n<div class=\"dd-vsc-term\"><div class=\"dd-term-head\"><span>TERMINAL<\/span><span>OUTPUT<\/span><span>PROBLEMS<\/span><span class=\"dd-term-note\">Example output \u2013 the model&#x27;s wording will differ<\/span><\/div><pre><code><span class=\"gp\">$<\/span> node first-call.mjs\n\u2022 Generative AI is AI that creates new content, like text, code or images.\n\u2022 It learns patterns from lots of examples, then predicts what should come next.\n\u2022 As a developer, you call it through an API and guide it with clear prompts.<\/code><\/pre><\/div>\n<div class=\"dd-vsc-status\"><span>\u2387 main<\/span><span>Ln 12, Col 1<\/span><span class=\"sp\"><\/span><span>Spaces: 2<\/span><span>UTF-8<\/span><span>LF<\/span><span>JavaScript<\/span><\/div>\n<\/div>\n<\/div>\n<p class=\"dd-vsc-hint\">Click the <strong>first-call.mjs<\/strong> tab to see the Node.js version (Node 18+, use the <code>.mjs<\/code> extension or add <code>\"type\": \"module\"<\/code> to <code>package.json<\/code>). Click <strong>\u25b6 Run<\/strong> to see example output.<\/p>\n<p>Notice the two parts of the request: <code>instructions<\/code> tells the model <em>how<\/em> to behave, and <code>input<\/code> is <em>what<\/em> you are asking. Anthropic (Claude) and Google (Gemini) have very similar SDKs; Part 3 compares all three side by side.<\/p>\n<div class=\"dd-warn\"><strong>Keep keys secret:<\/strong> never paste an API key directly into code that goes to GitHub, and never call a paid API straight from browser JavaScript. Call it from your backend.<\/div>\n<\/div>\n\n\n\n<div class=\"dd-post\">\n<h2 id=\"local\">Run a generative AI model locally with Ollama (free)<\/h2>\n<p>No API key? No problem. <a href=\"https:\/\/ollama.com\" target=\"_blank\" rel=\"noopener\">Ollama<\/a> lets you download and run open models on your own computer, even offline. Install it from the website, then pull a small model (about 1 GB, fine for most laptops):<\/p>\n<div class=\"dd-vsc dd-vsc-termonly\" role=\"group\" aria-label=\"Terminal commands\">\n<div class=\"dd-vsc-bar\"><span class=\"dd-dots\"><i><\/i><i><\/i><i><\/i><\/span><span class=\"dd-vsc-title\">Terminal \u2014 ollama<\/span><\/div>\n<pre class=\"dd-vsc-code\"><code><span class=\"gp\">$<\/span> ollama pull gemma3:1b\n<span class=\"c\"># downloads the model once (about 1 GB)<\/span>\n<span class=\"gp\">$<\/span> ollama run gemma3:1b \"What is generative AI? Answer in one line.\"<\/code><\/pre>\n<\/div>\n<p>Ollama also runs a local server on port 11434, so you can call it from code:<\/p>\n<div class=\"dd-vsc\" role=\"group\" aria-label=\"Code editor: local_llm.py\">\n<input type=\"radio\" name=\"v4\" id=\"v4f1\" class=\"f1\" checked>\n<input type=\"checkbox\" id=\"v4r1\" class=\"r1\">\n<div class=\"dd-vsc-bar\"><span class=\"dd-dots\"><i><\/i><i><\/i><i><\/i><\/span><span class=\"dd-vsc-title\">local_llm.py \u2014 devdojo-genai \u2014 Visual Studio Code<\/span><\/div>\n<div class=\"dd-vsc-tabs\">\n<label for=\"v4f1\" class=\"t1\"><b class=\"ic py\">PY<\/b>local_llm.py<\/label>\n<label for=\"v4r1\" class=\"run run1\" title=\"Show the output in the terminal\">\u25b6 Run<\/label>\n<\/div>\n<div class=\"dd-vsc-pane p1\">\n<div class=\"dd-vsc-crumbs\">devdojo-genai \u203a local_llm.py<\/div>\n<pre class=\"dd-vsc-code\"><code><span class=\"l\"><span class=\"c\"># pip install ollama<\/span><\/span>\n<span class=\"l\"><span class=\"kn\">from<\/span> <span class=\"n\">ollama<\/span> <span class=\"kn\">import<\/span> <span class=\"n\">chat<\/span><\/span>\n<span class=\"l\"><\/span>\n<span class=\"l\"><span class=\"n\">response<\/span> = <span class=\"n\">chat<\/span>(<\/span>\n<span class=\"l\">    <span class=\"n\">model<\/span>=<span class=\"s\">\"gemma3:1b\"<\/span>,<\/span>\n<span class=\"l\">    <span class=\"n\">messages<\/span>=[<\/span>\n<span class=\"l\">        {<span class=\"s\">\"role\"<\/span>: <span class=\"s\">\"system\"<\/span>, <span class=\"s\">\"content\"<\/span>: <span class=\"s\">\"You are a helpful assistant for Indian developers.\"<\/span>},<\/span>\n<span class=\"l\">        {<span class=\"s\">\"role\"<\/span>: <span class=\"s\">\"user\"<\/span>, <span class=\"s\">\"content\"<\/span>: <span class=\"s\">\"Give me 3 practical uses of generative AI in a web app.\"<\/span>},<\/span>\n<span class=\"l\">    ],<\/span>\n<span class=\"l\">)<\/span>\n<span class=\"l\"><\/span>\n<span class=\"l\"><span class=\"nb\">print<\/span>(<span class=\"n\">response<\/span>.<span class=\"n\">message<\/span>.<span class=\"n\">content<\/span>)<\/span><\/code><\/pre>\n<div class=\"dd-vsc-term\"><div class=\"dd-term-head\"><span>TERMINAL<\/span><span>OUTPUT<\/span><span>PROBLEMS<\/span><span class=\"dd-term-note\">Example output \u2013 local models vary<\/span><\/div><pre><code><span class=\"gp\">$<\/span> python local_llm.py\n1. Smart search: let users ask questions in plain language.\n2. Content help: draft product descriptions or blog outlines.\n3. Support chatbot: answer common customer questions 24\/7.<\/code><\/pre><\/div>\n<div class=\"dd-vsc-status\"><span>\u2387 main<\/span><span>Ln 12, Col 1<\/span><span class=\"sp\"><\/span><span>Spaces: 4<\/span><span>UTF-8<\/span><span>LF<\/span><span>Python<\/span><\/div>\n<\/div>\n<\/div>\n<p>Small local models are less smart than the big cloud ones, but they are perfect for learning, private data and experiments with zero cost. Part 6 is a full guide to running open models locally.<\/p>\n\n<h2 id=\"limits\">Limits of generative AI: hallucinations and more<\/h2>\n<p>LLMs are impressive, but a good developer knows their weak spots:<\/p>\n<ul>\n<li><strong>Hallucinations:<\/strong> the model can invent facts, library functions or citations that sound real but are wrong. It is predicting likely text, not checking truth.<\/li>\n<li><strong>Knowledge cutoff:<\/strong> it does not know about events or library versions released after training, unless you give it that information.<\/li>\n<li><strong>Non-deterministic:<\/strong> the same prompt can give different answers each time.<\/li>\n<li><strong>Weak at exact maths and counting<\/strong> unless it uses a tool (like running code).<\/li>\n<li><strong>Privacy and bias:<\/strong> what you send to a cloud API leaves your server, and models can repeat biases from their training data.<\/li>\n<\/ul>\n<p>Most of this series is about building around these limits: grounding answers with your own data (RAG), forcing structured output, testing with evals and adding guardrails.<\/p>\n\n<h2 id=\"errors\">Common errors and fixes<\/h2>\n<div class=\"dd-tablewrap\">\n<table>\n<thead><tr><th>Error \/ problem<\/th><th>Why it happens<\/th><th>Fix<\/th><\/tr><\/thead>\n<tbody>\n<tr><td><code>AuthenticationError<\/code> \/ 401<\/td><td><code>OPENAI_API_KEY<\/code> is missing or wrong in this terminal.<\/td><td>Set the variable again in the same terminal, or load it from a <code>.env<\/code> file with <code>python-dotenv<\/code>.<\/td><\/tr>\n<tr><td><code>RateLimitError<\/code> \/ 429<\/td><td>Too many requests, or no credit left on the account.<\/td><td>Check billing, add retries with a short wait (backoff), and send fewer requests.<\/td><\/tr>\n<tr><td>Model not found \/ 404<\/td><td>The model name is misspelt or not available to your account.<\/td><td>Copy the exact model ID from the provider&#8217;s models page.<\/td><\/tr>\n<tr><td><code>AttributeError: 'OpenAI' object has no attribute 'responses'<\/code><\/td><td>Old version of the <code>openai<\/code> package.<\/td><td><code>pip install -U openai<\/code><\/td><\/tr>\n<tr><td><code>ConnectionError<\/code> with Ollama<\/td><td>The Ollama app\/server is not running.<\/td><td>Start the Ollama app or run <code>ollama serve<\/code>, then retry.<\/td><\/tr>\n<tr><td>Answer sounds right but is wrong<\/td><td>Hallucination.<\/td><td>Give the model the source text in the prompt, ask it to say &#8220;I don&#8217;t know&#8221; when unsure, and verify important facts.<\/td><\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n\n<h2 id=\"best-practices\">Best practices for beginners<\/h2>\n<ul>\n<li><strong>Be specific in prompts:<\/strong> say who the answer is for, the format you want and the length.<\/li>\n<li><strong>Use the instructions\/system message<\/strong> for rules, and the input for the actual question.<\/li>\n<li><strong>Never trust output blindly<\/strong> \u2013 review generated code and check facts, especially in production.<\/li>\n<li><strong>Keep API keys on the server<\/strong> in environment variables or a secrets manager.<\/li>\n<li><strong>Watch your token usage<\/strong> \u2013 shorter prompts are cheaper and faster.<\/li>\n<li><strong>Pin model versions in production<\/strong> so behaviour doesn&#8217;t change unexpectedly.<\/li>\n<li><strong>Start small<\/strong> with a local model, then move to bigger cloud models when you need more quality.<\/li>\n<\/ul>\n<\/div>\n\n\n\n<div class=\"dd-post\">\n<h2 id=\"practice\">Practice task<\/h2>\n<p>Try this before Part 2 (about 20 minutes):<\/p>\n<ol>\n<li>Extend <code>tiny_generator.py<\/code>: replace the text with 10\u201315 sentences of your own (for example, cricket commentary or recipe steps) and generate 5 new sentences. What looks sensible? What looks silly, and why?<\/li>\n<li>Run <code>tokens_demo.py<\/code> on the same sentence in English and in Hindi (or your own language). Which one uses more tokens?<\/li>\n<li>Using Ollama or the OpenAI example, ask the same question three times. Write down how the answers differ.<\/li>\n<\/ol>\n<div class=\"dd-tip\"><strong>Bonus:<\/strong> ask a model about a made-up library, such as &#8220;How do I use the <code>superjson-turbo<\/code> package in Node.js?&#8221; See if it invents an answer. That is a hallucination in action.<\/div>\n\n<h2 id=\"faq\">FAQ: Generative AI basics<\/h2>\n<details><summary>What is generative AI in simple words?<\/summary><p>It is AI that creates new content \u2013 text, code, images, audio or video \u2013 based on patterns it learned from a large amount of example data.<\/p><\/details>\n<details><summary>Is ChatGPT generative AI?<\/summary><p>Yes. ChatGPT is a chat app built on OpenAI&#8217;s GPT large language models, which are generative AI models for text and code. Claude and Gemini are similar.<\/p><\/details>\n<details><summary>What is the difference between AI and generative AI?<\/summary><p>AI is the broad field. Generative AI is one part of it, focused on creating content. A spam filter is AI but not generative; a chatbot that writes replies is generative AI.<\/p><\/details>\n<details><summary>Do I need to know maths or machine learning to build with generative AI?<\/summary><p>No. To build apps with LLM APIs you mainly need normal programming skills (Python or JavaScript), HTTP\/JSON and good prompting. Maths helps later if you want to fine-tune or train models.<\/p><\/details>\n<details><summary>Can I learn generative AI for free?<\/summary><p>Yes. Ollama runs open models for free on your computer, and most cloud providers offer small free tiers or low prices for testing. Follow this series in order and you will cover the full path.<\/p><\/details>\n<details><summary>Why does the AI give a different answer every time?<\/summary><p>The model picks each next token with some randomness (controlled by temperature). Lower temperature gives more consistent answers. We cover this in Part 5.<\/p><\/details>\n\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>Generative AI creates new content, and large language models do it by predicting the next token again and again, using patterns learned from huge amounts of text. You built a tiny generator, saw real tokens, called a cloud model and ran a local one. That&#8217;s a strong start.<\/p>\n<p>Once you are comfortable with the basics, you can explore how LLMs are used as agents in our <a href=\"https:\/\/devdojo.co.in\/index.php\/2026\/10\/08\/openai-agents-sdk-python\/\">OpenAI Agents SDK tutorial<\/a> and how they connect to tools in <a href=\"https:\/\/devdojo.co.in\/index.php\/2026\/10\/03\/build-mcp-server-typescript\/\">How to Build an MCP Server in TypeScript<\/a>. But for now, keep following this series step by step.<\/p>\n\n<div class=\"dd-next\"><strong>Next part \u2013 Generative AI Part 2: Tokens, Context Windows and Model Parameters.<\/strong> Why does a model &#8220;forget&#8221; the start of a long chat? What do &#8220;8B parameters&#8221; or a &#8220;1M token context&#8221; really mean, and how do they affect cost and quality? We answer all of that next.<\/div>\n\n<div class=\"dd-cta\">\n<h3>New posts every day on DevDojo<\/h3>\n<p>Follow the full <strong>Generative AI series<\/strong> \u2013 30 parts from &#8220;what is an LLM&#8221; to building a production AI assistant. Bookmark <a href=\"https:\/\/devdojo.co.in\/\">devdojo.co.in<\/a> and leave a comment with any question about this part.<\/p>\n<\/div>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>What is generative AI? Learn how LLMs work through next-token prediction, tokens and training, then run your first Python, Node.js and free local model code.<\/p>\n","protected":false},"author":1,"featured_media":214,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38],"tags":[114,113,44,115,90,112],"class_list":["post-215","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","tag-ai-for-beginners","tag-generative-ai","tag-llm","tag-ollama","tag-openai-api","tag-series-generative-ai"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"description\" content=\"What is generative AI? Learn how LLMs work through next-token prediction, tokens and training, then run your first Python, Node.js and free local model code.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Lokendra\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"DevDojo - Empowering Developers\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"What Is Generative AI? How LLMs Work \u2013 Part 1\" \/>\n\t\t<meta property=\"og:description\" content=\"What is generative AI? Learn how LLMs work through next-token prediction, tokens and training, then run your first Python, Node.js and free local model code.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-10-18T18:01:08+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-10-18T18:01:08+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"What Is Generative AI? How LLMs Work \u2013 Part 1\" \/>\n\t\t<meta name=\"twitter:description\" content=\"What is generative AI? Learn how LLMs work through next-token prediction, tokens and training, then run your first Python, Node.js and free local model code.\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/2026\\\/10\\\/18\\\/genai-series-part-1-what-is-generative-ai\\\/#blogposting\",\"name\":\"What Is Generative AI? A Beginner's Guide (Part 1)\",\"headline\":\"Generative AI Part 1: What Is Generative AI and How Do LLMs Work?\",\"author\":{\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/author\\\/lokendra\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/devdojo.co.in\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/genai-series-part-1-what-is-generative-ai.jpg\",\"width\":1200,\"height\":630,\"caption\":\"What is generative AI \\u2013 Generative AI series Part 1 banner showing a prompt turning into tokens, an LLM and generated text\"},\"datePublished\":\"2026-10-18T18:01:08+00:00\",\"dateModified\":\"2026-10-18T18:01:08+00:00\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/2026\\\/10\\\/18\\\/genai-series-part-1-what-is-generative-ai\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/2026\\\/10\\\/18\\\/genai-series-part-1-what-is-generative-ai\\\/#webpage\"},\"articleSection\":\"AI, AI for Beginners, Generative AI, LLM, Ollama, OpenAI API, Series: Generative AI\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/2026\\\/10\\\/18\\\/genai-series-part-1-what-is-generative-ai\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/devdojo.co.in\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/category\\\/ai\\\/#listItem\",\"name\":\"AI\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/category\\\/ai\\\/#listItem\",\"position\":2,\"name\":\"AI\",\"item\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/category\\\/ai\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/2026\\\/10\\\/18\\\/genai-series-part-1-what-is-generative-ai\\\/#listItem\",\"name\":\"Generative AI Part 1: What Is Generative AI and How Do LLMs Work?\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/2026\\\/10\\\/18\\\/genai-series-part-1-what-is-generative-ai\\\/#listItem\",\"position\":3,\"name\":\"Generative AI Part 1: What Is Generative AI and How Do LLMs Work?\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/category\\\/ai\\\/#listItem\",\"name\":\"AI\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/#organization\",\"name\":\"DevDojo\",\"description\":\"Empowering Developers\",\"url\":\"https:\\\/\\\/devdojo.co.in\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/author\\\/lokendra\\\/#author\",\"url\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/author\\\/lokendra\\\/\",\"name\":\"Lokendra\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/2026\\\/10\\\/18\\\/genai-series-part-1-what-is-generative-ai\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/99f102f0cc9080237ce54b91304fd1b3b6fa29925cbaeba93cd796872e58b45c?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Lokendra\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/2026\\\/10\\\/18\\\/genai-series-part-1-what-is-generative-ai\\\/#webpage\",\"url\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/2026\\\/10\\\/18\\\/genai-series-part-1-what-is-generative-ai\\\/\",\"name\":\"What Is Generative AI? A Beginner's Guide (Part 1)\",\"description\":\"What is generative AI? Learn how LLMs work through next-token prediction, tokens and training, then run your first Python, Node.js and free local model code.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/2026\\\/10\\\/18\\\/genai-series-part-1-what-is-generative-ai\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/author\\\/lokendra\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/author\\\/lokendra\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/devdojo.co.in\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/genai-series-part-1-what-is-generative-ai.jpg\",\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/2026\\\/10\\\/18\\\/genai-series-part-1-what-is-generative-ai\\\/#mainImage\",\"width\":1200,\"height\":630,\"caption\":\"What is generative AI \\u2013 Generative AI series Part 1 banner showing a prompt turning into tokens, an LLM and generated text\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/index.php\\\/2026\\\/10\\\/18\\\/genai-series-part-1-what-is-generative-ai\\\/#mainImage\"},\"datePublished\":\"2026-10-18T18:01:08+00:00\",\"dateModified\":\"2026-10-18T18:01:08+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/#website\",\"url\":\"https:\\\/\\\/devdojo.co.in\\\/\",\"name\":\"DevDojo\",\"description\":\"Empowering Developers\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/devdojo.co.in\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"What Is Generative AI? A Beginner's Guide (Part 1)","description":"What is generative AI? Learn how LLMs work through next-token prediction, tokens and training, then run your first Python, Node.js and free local model code.","canonical_url":"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/#blogposting","name":"What Is Generative AI? A Beginner's Guide (Part 1)","headline":"Generative AI Part 1: What Is Generative AI and How Do LLMs Work?","author":{"@id":"https:\/\/devdojo.co.in\/index.php\/author\/lokendra\/#author"},"publisher":{"@id":"https:\/\/devdojo.co.in\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/devdojo.co.in\/wp-content\/uploads\/2026\/10\/genai-series-part-1-what-is-generative-ai.jpg","width":1200,"height":630,"caption":"What is generative AI \u2013 Generative AI series Part 1 banner showing a prompt turning into tokens, an LLM and generated text"},"datePublished":"2026-10-18T18:01:08+00:00","dateModified":"2026-10-18T18:01:08+00:00","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/#webpage"},"isPartOf":{"@id":"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/#webpage"},"articleSection":"AI, AI for Beginners, Generative AI, LLM, Ollama, OpenAI API, Series: Generative AI"},{"@type":"BreadcrumbList","@id":"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/devdojo.co.in\/#listItem","position":1,"name":"Home","item":"https:\/\/devdojo.co.in\/","nextItem":{"@type":"ListItem","@id":"https:\/\/devdojo.co.in\/index.php\/category\/ai\/#listItem","name":"AI"}},{"@type":"ListItem","@id":"https:\/\/devdojo.co.in\/index.php\/category\/ai\/#listItem","position":2,"name":"AI","item":"https:\/\/devdojo.co.in\/index.php\/category\/ai\/","nextItem":{"@type":"ListItem","@id":"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/#listItem","name":"Generative AI Part 1: What Is Generative AI and How Do LLMs Work?"},"previousItem":{"@type":"ListItem","@id":"https:\/\/devdojo.co.in\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/#listItem","position":3,"name":"Generative AI Part 1: What Is Generative AI and How Do LLMs Work?","previousItem":{"@type":"ListItem","@id":"https:\/\/devdojo.co.in\/index.php\/category\/ai\/#listItem","name":"AI"}}]},{"@type":"Organization","@id":"https:\/\/devdojo.co.in\/#organization","name":"DevDojo","description":"Empowering Developers","url":"https:\/\/devdojo.co.in\/"},{"@type":"Person","@id":"https:\/\/devdojo.co.in\/index.php\/author\/lokendra\/#author","url":"https:\/\/devdojo.co.in\/index.php\/author\/lokendra\/","name":"Lokendra","image":{"@type":"ImageObject","@id":"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/99f102f0cc9080237ce54b91304fd1b3b6fa29925cbaeba93cd796872e58b45c?s=96&d=mm&r=g","width":96,"height":96,"caption":"Lokendra"}},{"@type":"WebPage","@id":"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/#webpage","url":"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/","name":"What Is Generative AI? A Beginner's Guide (Part 1)","description":"What is generative AI? Learn how LLMs work through next-token prediction, tokens and training, then run your first Python, Node.js and free local model code.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/devdojo.co.in\/#website"},"breadcrumb":{"@id":"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/#breadcrumblist"},"author":{"@id":"https:\/\/devdojo.co.in\/index.php\/author\/lokendra\/#author"},"creator":{"@id":"https:\/\/devdojo.co.in\/index.php\/author\/lokendra\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/devdojo.co.in\/wp-content\/uploads\/2026\/10\/genai-series-part-1-what-is-generative-ai.jpg","@id":"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/#mainImage","width":1200,"height":630,"caption":"What is generative AI \u2013 Generative AI series Part 1 banner showing a prompt turning into tokens, an LLM and generated text"},"primaryImageOfPage":{"@id":"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/#mainImage"},"datePublished":"2026-10-18T18:01:08+00:00","dateModified":"2026-10-18T18:01:08+00:00"},{"@type":"WebSite","@id":"https:\/\/devdojo.co.in\/#website","url":"https:\/\/devdojo.co.in\/","name":"DevDojo","description":"Empowering Developers","inLanguage":"en-US","publisher":{"@id":"https:\/\/devdojo.co.in\/#organization"}}]},"og:locale":"en_US","og:site_name":"DevDojo - Empowering Developers","og:type":"article","og:title":"What Is Generative AI? How LLMs Work \u2013 Part 1","og:description":"What is generative AI? Learn how LLMs work through next-token prediction, tokens and training, then run your first Python, Node.js and free local model code.","og:url":"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/","article:published_time":"2026-10-18T18:01:08+00:00","article:modified_time":"2026-10-18T18:01:08+00:00","twitter:card":"summary_large_image","twitter:title":"What Is Generative AI? How LLMs Work \u2013 Part 1","twitter:description":"What is generative AI? Learn how LLMs work through next-token prediction, tokens and training, then run your first Python, Node.js and free local model code."},"aioseo_meta_data":{"post_id":"215","title":"What Is Generative AI? A Beginner's Guide (Part 1)","description":"What is generative AI? Learn how LLMs work through next-token prediction, tokens and training, then run your first Python, Node.js and free local model code.","keywords":null,"keyphrases":{"focus":{"keyphrase":"what is generative AI","score":91},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":"What Is Generative AI? How LLMs Work \u2013 Part 1","og_description":"What is generative AI? Learn how LLMs work through next-token prediction, tokens and training, then run your first Python, Node.js and free local model code.","og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":0,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"created":"2026-10-18 17:20:00","updated":"2026-10-18 18:01:08","focus_keyword":"what is generative AI","additional_keywords":null,"truseo_locale":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/devdojo.co.in\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/devdojo.co.in\/index.php\/category\/ai\/\" title=\"AI\">AI<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tGenerative AI Part 1: What Is Generative AI and How Do LLMs Work?\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/devdojo.co.in\/"},{"label":"AI","link":"https:\/\/devdojo.co.in\/index.php\/category\/ai\/"},{"label":"Generative AI Part 1: What Is Generative AI and How Do LLMs Work?","link":"https:\/\/devdojo.co.in\/index.php\/2026\/10\/18\/genai-series-part-1-what-is-generative-ai\/"}],"_links":{"self":[{"href":"https:\/\/devdojo.co.in\/index.php\/wp-json\/wp\/v2\/posts\/215","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devdojo.co.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devdojo.co.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devdojo.co.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/devdojo.co.in\/index.php\/wp-json\/wp\/v2\/comments?post=215"}],"version-history":[{"count":2,"href":"https:\/\/devdojo.co.in\/index.php\/wp-json\/wp\/v2\/posts\/215\/revisions"}],"predecessor-version":[{"id":217,"href":"https:\/\/devdojo.co.in\/index.php\/wp-json\/wp\/v2\/posts\/215\/revisions\/217"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devdojo.co.in\/index.php\/wp-json\/wp\/v2\/media\/214"}],"wp:attachment":[{"href":"https:\/\/devdojo.co.in\/index.php\/wp-json\/wp\/v2\/media?parent=215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devdojo.co.in\/index.php\/wp-json\/wp\/v2\/categories?post=215"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devdojo.co.in\/index.php\/wp-json\/wp\/v2\/tags?post=215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}