top of page
Codersarts Blog.
What’s new and exciting at Codersarts
Search


Build a Local Writing Assistant on an Old Computer with Bonsai and Ollama
Introduction Most “run this model locally” tutorials stop the moment the model produces any output at all. They download a file, start a server, send one test prompt, and call it done. They rarely cover what happens when that output is technically present but practically useless, because the model spent its entire response budget thinking instead of answering. In this tutorial we build a local writing assistant on top of Bonsai, PrismML’s 1-bit quantized language model, serve
ganesh90
Jun 2912 min read


Build a Customer Feedback Analyzer with OpenClaw and OpenAI
Introduction Most “build an AI agent” tutorials show the happy path: write a skill, register it, call it, done. What they skip is the part where the agent confidently does the wrong thing anyway, in a different way every single time you try again, and you have to figure out why. This tutorial is the version that doesn’t skip that part. We build a customer feedback analyzer using OpenClaw, an orchestration layer that dispatches commands to registered skills, paired with OpenAI
ganesh90
Jun 2619 min read


Evaluating Natural Language to SQL Generation with Promptfoo and Python
Introduction Most LLM evaluation tutorials check whether a generated answer “sounds right” by asking another LLM to grade it. That works for tone and style, but it falls apart for tasks with an objectively correct answer. SQL generation is exactly that kind of task: a query either returns the right rows or it does not, and no amount of LLM-rubric grading can substitute for actually running the query. In this tutorial we build a promptfoo evaluation for a natural language to S
ganesh90
Jun 2517 min read


WebGPU for AI Engineers: How to Run GPU-Accelerated Inference Directly in the Browser
Introduction You've built an impressive transformer model. It runs beautifully on your CUDA workstation. Then your product manager asks: "Can we run this inference client-side, in the browser?" Your heart sinks. WebGL is too constrained for modern ML workloads — limited precision, no compute pipeline, shader code that feels like fighting the API. Server-side inference solves the performance problem but introduces latency, infrastructure costs, and privacy concerns for users w
Pranav S
Jun 2512 min read


LLM Observability with Self-Hosted Langfuse: Cost Tracking, Prompt A/B Testing, and a Grafana Dashboard with Anomaly Alerts
Introduction You deployed your LLM-powered feature to production three weeks ago. Since then, you've watched your OpenAI bill climb from $200 to $1,847 with no clear explanation. You know some users are generating massive responses, but which ones? You suspect the new prompt variant is slower, but you have no latency data to prove it. Your on-call engineer got paged at 2 AM because the error rate spiked, but the logs only show "API error" with no trace context. You're flying
Pranav S
Jun 2517 min read


How to Build an LLM Router Gateway with LiteLLM: Fallbacks, Semantic Caching, Per-Tenant Keys, and Cost Tracking
Introduction You've just shipped a feature powered by GPT-4o. It works beautifully—until OpenAI's API goes down at 3 AM, your on-call engineer wakes up to a flood of errors, and your customer-facing chat interface shows a broken spinner for two hours. Meanwhile, you have no idea which internal team is responsible for burning through $3,000 in API credits last week, and you're manually switching between provider SDKs every time you want to test a new model. Sound familiar? An
Pranav S
Jun 2515 min read


How to Run AI Models Directly in the Browser with Transformers.js and WebGPU
Introduction Every time you reach for an AI feature in your app, the same wall appears: you need an API key, a running server, a billing account, and a promise that your users' data will be handled responsibly somewhere in a cloud you don't control. For indie developers, privacy-focused startups, and CS students building weekend projects, those constraints aren't just inconvenient — they're dealbreakers. What if the model ran entirely on the user's device, inside the browser,
Pranav S
Jun 2513 min read


SGLang Structured Generation: Guaranteed-Valid JSON, Tool Calls, and RadixAttention - Complete FastAPI Integration Guide
Introduction You call an LLM to extract structured data from a document. It returns JSON — but with a trailing comma. Your parser crashes. You add a retry loop. The second attempt omits a required field. You add validation. The third attempt wraps the JSON in markdown code fences. You add a regex extractor. Four API calls later, you finally get valid JSON. Your latency has quadrupled, your token costs have spiked, and your error logs are full of malformed output. SGLang struc
Pranav S
Jun 2415 min read


Chat With Your Data: Building an Interactive Analytics Dashboard and a Conversational AI Assistant
Business teams sit on huge tables of orders, sales, and profit, yet answering a simple question like “which market is most profitable?” usually means waiting on an analyst or building another pivot table. The gap between having the data and understanding it is where decisions slow down. Chat With Your Data closes that gap. It is a conversational analytics dashboard that pairs interactive charts with an AI assistant, so anyone can explore the numbers by clicking or simply by a
ganesh90
Jun 247 min read


Custom AI Evaluation Dashboard: How to Build One Your Whole Team Will Actually Use (2026 Guide)
Someone in your last meeting asked, "Is the new model better than the old one?" and nobody could answer in under 30 seconds. The eval numbers live in three notebooks, a Slack thread, and a spreadsheet that's two weeks stale. A custom AI evaluation dashboard fixes that: one live place where engineers, PMs, and leadership see LLM quality across models, benchmarks, and time. This guide shows you the architecture, the panels that matter, the stack choices, and what it costs to b
Pranav S
Jun 247 min read


AI Model Evaluation Pipeline & Leaderboard: How to Build One End-to-End (2026 Guide)
Your team is comparing five models across a dozen benchmarks, and the source of truth is a spreadsheet someone updates by hand. Scores aren't reproducible, nobody remembers which prompt version produced them, and every new model means a week of manual re-runs. An AI model evaluation pipeline replaces that with an automated system: define a benchmark once, run any model through it on demand, and publish results to a live leaderboard your whole org trusts. This guide shows you
Pranav S
Jun 247 min read


LLM Reasoning Benchmark: How to Design One That Actually Tests Your Model (2026 Guide)
A model aces GSM8K and MMLU, lands on your stack, and then falls apart on the one thing you actually need — a five-step workflow that chains retrieval, calculation, and a decision. Public reasoning scores told you nothing useful, because the model may have seen those questions in training and because they don't look anything like your tasks. A custom LLM reasoning benchmark measures multi-step reasoning on the problems you care about, scoring not just the final answer but whe
Pranav S
Jun 247 min read


LLM Evaluation for Code Generation: How to Build a Test Harness That Catches Regressions (2026 Guide)
You upgraded the code model behind your copilot. The demo looked great. Two weeks later, completions on your actual codebase are subtly worse — more code that compiles but fails at runtime, more insecure snippets — and you have no number that would have caught it. LLM evaluation for code generation needs more than a public leaderboard score; it needs a test harness that runs your tasks, executes the generated code safely, and tracks quality release over release. This guide sh
Pranav S
Jun 247 min read


LLM Hallucination Detection: How to Build a System That Catches What Your Model Makes Up (2026 Guide)
Your large language model just told a customer your product has a feature it doesn't. It cited a refund policy that doesn't exist. It invented a case number. None of this showed up in testing, because the output looked perfectly confident — and confidence is exactly the problem. LLM hallucination detection is the discipline of measuring and catching these fabrications before they reach a user. This guide shows you how the system is architected, which metrics actually work, an
Pranav S
Jun 247 min read


Enterprise Architecture Blueprint for an AI Social Media & Content Management Platform
Executive Summary Enterprise content marketing is caught in a structural squeeze. Channels multiply — each with its own native format, cadence, and audience — and algorithms reward volume and freshness. Yet the content supply chain that feeds those channels (briefs, drafts, brand review, legal review, localization, scheduling) remains largely manual, fragmented across a dozen tools and agencies, and slow. Teams and budgets do not scale at the rate the channels demand. Generat
Pranav S
Jun 2320 min read


Build a Real-Time Sales Coaching AI Agent with OpenAI Realtime API + LangGraph
Sales reps lose deals in the moments they can't see themselves — talking over the prospect, missing a buying signal, going silent when objections hit. A coach whispering in their ear would fix most of that. Most companies can't afford one per rep. An AI agent listening to the live call can be that coach. Here's how to build one using the OpenAI Realtime API for low-latency audio understanding and LangGraph to orchestrate the coaching logic. Why This Stack OpenAI Realtime API

Codersarts
Jun 214 min read


Private Multimodal Search System for Book Libraries | Codersarts AI
Use Case We Solve: Private Multimodal Search System for Book & Document Libraries The Problem Collectors, archives, law firms, and publishers often hold large scanned libraries (page-by-page JPGs/PDFs) and need to search them like Google — by keyword, concept, or even a photo — without any of that content touching the public web or a third-party index. Typical Requirements We Address Keyword and exact-text search across scanned pages Semantic search for similar quotes / relat

Codersarts
Jun 212 min read


Forward Deployed Engineer (FDE): The Role Reshaping How AI Gets Deployed
For most of the last decade, the most prestigious job in tech sat inside the research lab. The engineers building the model — the ones pushing benchmark scores, designing new architectures, training larger systems — held the highest status and, often, the highest pay. That has quietly flipped. In 2026, the fastest-growing, highest-leverage role in AI isn't the one building the model. It's the one getting the model to actually work inside a real company, with real data, real l

Codersarts
Jun 2112 min read


Loop Engineering Explained: How to Build Self-Running AI Coding Agents (2026 Guide)
What Is Loop Engineering? Loop engineering is the discipline of building small automated control systems — loops — that drive AI coding agents on your behalf, instead of you prompting the agent manually, turn by turn. For roughly two years, working with a coding agent meant: write a prompt, read the output, write the next prompt, repeat. You held the steering wheel the entire time. Loop engineering replaces that. You design a system once — a loop with a defined goal, a way to

Codersarts
Jun 215 min read


Loop Engineering: An Absolute Beginner's Tutorial
What Is Loop Engineering? Loop engineering is the practice of building a small automated system — a loop — that drives an AI coding agent for you, instead of you manually prompting it turn by turn. The old way: You write a prompt → Agent responds → You read it → You write the next prompt → repeat The loop engineering way: You write a loop → Loop prompts the agent → Loop reads the output → Loop decides "done or not done?" → Loop re-prompts automatically → repeat until done You

Codersarts
Jun 214 min read


LLM Observability with OpenTelemetry: Build a Content Moderation API in Python and FastAPI
Introduction Content moderation at scale is one of the most operationally demanding problems in AI applications. Rule-based filters miss context and produce too many false positives. Fully manual review does not scale. A large language model can read text the way a human moderator would, understanding tone, context, and intent, and produce structured output that downstream systems can act on automatically. In this tutorial we build a FastAPI content moderation API that passes
ganesh90
Jun 1923 min read
bottom of page