Mert Özen Further With Every Line

Blog

Mert Özen's blog posts on software development, backend, frontend, and DevOps.

Series
20 posts found
The Evolution of LLM APIs: From Completions to Tool Calling, Structured Outputs and MCP
Artificial Intelligence PART 20

The Evolution of LLM APIs: From Completions to Tool Calling, Structured Outputs and MCP

The evolution of LLM APIs with verified dates, from the first text-continuing API to the chat format, from function calling to JSON mode and structured outputs, from reasoning parameters to the Model Context Protocol and agents. We see which example in the series each step maps to, and at the end of the series we build a bridge to the next AI series.

6 Nov 2026 7 min 2
LLMs from 2023 to Today: Open-Weight Models, Long Context and Reasoning
Artificial Intelligence PART 19

LLMs from 2023 to Today: Open-Weight Models, Long Context and Reasoning

A summary of the LLM world from GPT-4 to today with verified dates: the rise of open-weight models with Llama, Mistral, Qwen and Gemma, the context window growing from 2,048 tokens to a million, models that read images, and the reasoning models that came with o1 and DeepSeek-R1. We also discuss the difference between open-weight and open source, and why we give no model ranking.

6 Nov 2026 6 min 1
From the Transformer to ChatGPT: The Birth of LLMs (2017–2022)
Artificial Intelligence PART 18

From the Transformer to ChatGPT: The Birth of LLMs (2017–2022)

The steps that made today's LLMs possible, from the 2017 "Attention Is All You Need" paper to the launch of ChatGPT: the Transformer, pre-training with GPT-1 and BERT, GPT-2's staged release, scaling laws and GPT-3, InstructGPT and RLHF. We see which concept in the series each step is the root of and what it changed for developers.

6 Nov 2026 7 min 1
Provider-Independent LLM Code: IChatClient, the OpenAI-Compatible /v1 and DI
Artificial Intelligence PART 17

Provider-Independent LLM Code: IChatClient, the OpenAI-Compatible /v1 and DI

With the IChatClient abstraction we run the same code through Ollama's own API and its OpenAI-compatible /v1 endpoint, switching providers through configuration and environment variables. We wire it into an ASP.NET Core minimal API with DI, keep API keys in user secrets and environment variables, build the same idea in TypeScript with the openai package, and look at the limits of the abstraction.

6 Nov 2026 10 min 1
LLM Cost, Latency and Model Choice: From Tokens to the Bill
Artificial Intelligence PART 16

LLM Cost, Latency and Model Choice: From Tokens to the Bill

We turn token counts into cost per request and per month, and split latency into load, input processing and output generation. We compare gemma3:4b and 12b with real tokens/s measurements, see what Q4_K_M means by looking at tensor types, cache responses with Microsoft.Extensions.AI, and discuss the choice between local and cloud.

6 Nov 2026 12 min 1
LLM Hallucination and Reliability: Cite, Verify, Measure
Artificial Intelligence PART 15

LLM Hallucination and Reliability: Cite, Verify, Measure

Asked for the author of a novel that doesn't exist, gemma3:4b confidently invented a name and a year. We look at why hallucinations happen, force the answer to cite sources with structured output, verify those sources in code and compare three approaches with numbers using a ten-question golden set.

6 Nov 2026 17 min 1
LLMs and RAG: Answering with Data the Model Has Never Seen
Artificial Intelligence PART 14

LLMs and RAG: Answering with Data the Model Has Never Seen

Asked about the bookstore's return window, gemma3:4b confidently said 30 days; the right answer is 21. We split the policies into chunks, index them with nomic-embed-text, put the closest chunks into the prompt and get the model to say it doesn't know what isn't in the context. A minimal in-memory RAG in C# and its limits.

6 Nov 2026 11 min 1
Embeddings and Similarity for LLMs: Searching Text by Meaning
Artificial Intelligence PART 13

Embeddings and Similarity for LLMs: Searching Text by Meaning

What is an embedding and how do you compute cosine similarity? We produce 768-dimensional vectors with nomic-embed-text, write cosine similarity by hand in C# and TypeScript, build a small in-memory semantic search and compare it with keyword search. The negation trap and the limits with Turkish queries, with real scores.

6 Nov 2026 13 min 1
LLM Tool Calling (2): Microsoft.Extensions.AI and Safe Tools
Artificial Intelligence PART 12

LLM Tool Calling (2): Microsoft.Extensions.AI and Safe Tools

We hand the tool loop to UseFunctionInvocation and AIFunctionFactory, then get to the real question: should every call the model asks for run? Taking authorization from the session, approval for tools that change data, argument validation with Zod and arguments the model makes up, with real qwen3:4b output.

6 Nov 2026 13 min 1
LLM Tool Calling (1): The Model Doesn't Call Functions, It Asks for Calls
Artificial Intelligence PART 11

LLM Tool Calling (1): The Model Doesn't Call Functions, It Asks for Calls

With tool calling the model runs no functions; it produces a call request and running it is up to your code. We send a raw tools request to Ollama's /api/chat endpoint with qwen3:4b, send the result back with the tool role and build the loop in TypeScript and in package-free C#.

6 Nov 2026 12 min 1
Structured Output with LLMs: JSON Mode, JSON Schema and GetResponseAsync<T>
Artificial Intelligence PART 10

Structured Output with LLMs: JSON Mode, JSON Schema and GetResponseAsync<T>

We see why parsing free text with a regex breaks, why JSON mode is not enough and how a JSON schema pins the format. We use Zod in TypeScript and GetResponseAsync<T> in C#, catch an answer that matches the schema but is wrong, and build two layers of validation.

6 Nov 2026 11 min 1
Writing Prompts for LLMs (2): Step-by-Step Thinking and Reasoning Models
Artificial Intelligence PART 09

Writing Prompts for LLMs (2): Step-by-Step Thinking and Reasoning Models

Does saying think step by step guarantee the right answer? We ask gemma3:4b a tricky order calculation in three ways, separate the thinking from the answer with qwen3:4b's think parameter, use ReasoningOptions in C# and measure what thinking costs in tokens and time.

6 Nov 2026 11 min 1
Blog Map