Posts

Showing posts from April, 2026

Day 6.3 - AI Engineering— Building My First LLM Playground

Image
Day 6.3 — Building My First LLM Playground AI Engineering — Day by Day My journey to becoming an AI Engineer After setting up my first local LLM, the next logical step was clear: Stop just running prompts… and start building a system around it. So today, I built my first LLM Playground using a local model. What I Wanted to Build Not just a UI — but something that helps me understand behavior. So I defined a simple goal: Enter a prompt Control temperature Generate multiple outputs Observe differences This is where things started becoming real. System Architecture Instead of calling the model directly from the frontend, I designed a proper flow: Frontend (Next.js UI) ↓ API Route (/api/generate) ↓ Local LLM (Ollama) This small decision is important. Because: It keeps the system modular It matches production architecture It allows future extensions (RAG, agents) Core Features I Built Prompt Input...

Day 6.2 - AI Engineering Journey -Running My First Local LLM

Image
Day 6.2 — Running My First Local LLM AI Engineering — Day by Day My journey to becoming an AI Engineer In my previous post, I made a decision: Move away from API-first learning… and switch to local LLMs. Today was about taking that decision into action. My Setup I didn’t use a high-end machine. Instead, I used: MacBook Air (2017) Intel processor Limited RAM Honestly, I expected things to be slow… maybe even unusable. But what happened next surprised me. Step 1 — Installing Ollama To run a local LLM, I used: Ollama (Local LLM runtime) Installation was straightforward: Download → Install → Run Once installed, I verified it using: ollama --version Step 2 — Running My First Model I started with a lightweight model: ollama run phi3 This was my first real interaction with a locally running LLM. Step 3 — Testing Prompts I tried a few simple prompts: Explain AI in 2 lines Explain AI like I am 10 years old Expla...

Day 6.1 - AI Engineering Journey - Why I Switched to Local LLMs

Image
Day 6.1 — Why I Switched to Local LLMs AI Engineering — Day by Day My journey to becoming an AI Engineer Until now in my AI learning journey, I was mostly focused on: Understanding how LLMs work Learning prompt engineering Exploring limitations and evaluation But when it came to actually building systems , I had to make an important decision: Should I use paid APIs… or find another way? At first, APIs felt like the obvious choice. They are easy, powerful, and everything just works. But the more I thought about it, the more I realized: If I rely only on APIs, I might learn usage… but not systems. The Problem with API-First Learning Using APIs is great for building quickly, but for learning deeply, it has limitations: Everything feels “too perfect” You don’t see failure modes clearly You depend on external systems You don’t control the full pipeline This creates an illusion: “My system works” But in reality: The API is doi...

Day 5 - AI Engineering Journey - Evaluating LLM Outputs

Image
Day 5 — Evaluating LLM Outputs (The “Looks Good” Trap) AI Engineering — Day by Day My journey to becoming an AI Engineer Till now in my journey, I was mostly focused on: How LLMs work How to write better prompts And honestly, I thought I was making progress. But then I realized something uncomfortable: I had no real way to measure if my outputs were actually good. I was just looking at responses and thinking: “Yeah… this looks fine.” And that’s where the problem started. The Problem with “Looks Good” At first glance, this seems harmless. But it’s actually dangerous. Here’s why: It’s subjective → depends on mood and perspective It’s inconsistent → same output may feel different later It hides failures → edge cases go unnoticed What I understood: If you can’t measure it, you can’t improve it. What Does “Good Output” Even Mean? This question sounds simple… but it’s actually the core of everything. I started breaking it...

Day 4 - AI Engineering Journey - LLMs Are Not Magic — Understanding Their Limitations

Image
Day 4 — LLM Limitations (Where Things Break) AI Engineering — Day by Day My journey to becoming an AI Engineer When I started learning about AI, I was honestly impressed by how accurate LLMs felt. But after spending time understanding how they actually work, I realized something important: LLMs are powerful — but they are NOT reliable by default. Day 4 was all about understanding where things break — and why. The Shift in Thinking Earlier, I used to think: If output is wrong → model is bad Now I think: If output is wrong → I need to understand the system better 1. Hallucination — The Biggest Risk LLMs can generate answers that sound extremely confident… but are completely wrong. Why does this happen? Predict what sounds correct — not what is actually correct It has: No real-time fact-checking No connection to truth No “I don’t know” mechanism by default Key Insight: Hallucination is not a bug — it’s a design limitation. 2...

Day 3 - AI Engineering Journey- Prompt Engineering Is Not What You Think

Image
Day 3 — Prompt Engineering Is Not What You Think AI Engineering — Day by Day My journey to becoming an AI Engineer When I first heard about prompt engineering , I thought it was about: Writing “smart” prompts Using fancy tricks Memorizing templates But after actually digging into it, I realized something important: Prompt engineering is not about clever wording. It’s about reducing ambiguity for a probabilistic system . This shift changed everything for me. What I Understood Today At its core, an LLM: Doesn’t “understand” like humans Doesn’t “know” the right answer It just predicts the next most probable token So, if your prompt is vague → The model has too many possible directions → And your output becomes inconsistent Why Most Prompts Fail Explain trading What’s wrong here? No context No audience No structure No constraints The model is forced to guess what you want. Improving the Same Prompt Explain stock...

Day 2- AI Engineering Journey- Tokens, Context Window & Sampling (Hidden Mechanics of LLMs)

Day 2 — Tokens, Context Window & Sampling (Hidden Mechanics of LLMs) If you’ve understood that LLMs predict the next token , the next question is: What actually controls their behavior? Three things shape every output: Tokenization Context window Sampling Most people ignore these — and that’s why things break. 1. Tokenization LLMs don’t read words. They read tokens . "unbelievable" → ["un", "believ", "able"] Even small changes matter: "Hello" ≠ " Hello" "AI" ≠ "AI." Why it matters: Cost is per token Formatting affects output Debugging becomes tricky The model works on token patterns, not language. 2. Context Window This is the model’s memory limit. Two problems: Hard limit: Old data gets removed Soft limit: Too much info → weaker attention Impact: Long chats lose instructions Big inputs → worse answers Context wind...

Day 1- AI Engineering Journey - How Large Language Models (LLMs) Actually Work

Image
How Large Language Models (LLMs) Actually Work — Explained Simply (But Correctly) This is Day 1 of Posting AI Engineering content. In this post I will mostly cover how exactly LLM works. Most people say things like “LLMs understand language” or “they think like humans.” That sounds nice — but it’s not how they actually work. Let’s break it down properly. The Core Idea At its heart, an LLM is not thinking, reasoning, or understanding . It is a system that does one thing extremely well: It predicts the next token given the previous tokens. That’s it. Everything else — conversations, code, reasoning — emerges from this single capability. Step 1: Text → Tokens Before processing, your input is converted into tokens . Tokens are not exactly words. They can be: Full words → cat Parts of words → un , believ , able Symbols → + , = , ; Example: "unbelievable" → ["un", "believ", "able"] This matters because: ...

Day 0 - AI Engineering Journey

 Day 0 — Starting My AI Engineering Journey (Day by Day) I’ve decided to start documenting my journey of learning AI Engineering . This series is called: Becoming an AI Engineer — Day by Day This is Day 0 . Before jumping into concepts, I want to define what I’m doing and why. Why I’m Doing This I’m transitioning towards becoming an AI-first engineer . While learning, I noticed: A lot of content is too high-level Or too complicated to apply practically So instead of just consuming content, I decided to: Document everything, I learn — day by day What This Series Will Be Day-wise learning posts Simple explanations Focused on real understanding (not buzzwords) No fluff. No pretending. Just what I understood. Who This Is For If you: Want to get into AI Engineering Feel overwhelmed with scattered resources Prefer practical, simple explanations You can follow along and learn with me. Important Note I’m still ...