<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vladimir Beskorovainyi on Medium]]></title>
        <description><![CDATA[Stories by Vladimir Beskorovainyi on Medium]]></description>
        <link>https://medium.com/@besk.tech?source=rss-f96be18d3d1e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*AfYWIoPNx-SmRvoUelGO8Q.png</url>
            <title>Stories by Vladimir Beskorovainyi on Medium</title>
            <link>https://medium.com/@besk.tech?source=rss-f96be18d3d1e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 16:50:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@besk.tech/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What Is Prompt Engineering? Three Common Techniques Tested on 60 Tasks]]></title>
            <link>https://medium.com/@besk.tech/what-is-prompt-engineering-three-common-techniques-tested-on-60-tasks-e67ca34d7e64?source=rss-f96be18d3d1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e67ca34d7e64</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <dc:creator><![CDATA[Vladimir Beskorovainyi]]></dc:creator>
            <pubDate>Thu, 03 Dec 2026 00:00:38 GMT</pubDate>
            <atom:updated>2026-12-03T06:58:07.945Z</atom:updated>
            <content:encoded><![CDATA[<p>Prompt engineering is the practice of writing instructions that get a language model to produce the output you need. I tested three common techniques, an expert role, step-by-step reasoning and examples, on 60 tasks with known answers. Asking the model to think step by step did not improve its arithmetic. It did catch a trap that every other prompt missed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2kgx8Ii8na4o3qSr" /></figure><p>The most repeated prompt engineering tip is to tell the model to think step by step. In my test it did not make a small model better at arithmetic. Without the instruction the model solved all 20 word problems in all three runs. With it, three of its 60 answers were wrong, each on a different problem. The model was already reasoning step by step on its own. Where the instruction did help was a hidden trap: a date written day first, which every other prompt misread.</p><h3>What prompt engineering is</h3><p>AWS defines prompt engineering as “the process where you guide generative artificial intelligence (generative AI) solutions to generate desired outputs.” In practice it means writing the instruction, the context and the expected format so that a <a href="https://besk.tech/articles/what-is-an-llm">large language model</a> does what you need, then checking the result and adjusting.</p><p>The difference from simply asking a question is method. A question is written once. An engineered prompt states what counts as a correct answer and what the answer should look like, and it is changed only after the results have been checked.</p><p>A prompt is everything the model reads before it answers: the system prompt with standing instructions, the question, documents, examples. The model turns all of it into <a href="https://besk.tech/articles/what-is-a-token-in-ai">tokens</a>, and all of it has to fit in the model’s context window, the limit on how much text it can read at once. The usual techniques on top of a clear task are three:</p><ol><li><strong>Role.</strong> Tell the model who it is: “You are an expert mathematician.”</li><li><strong>Step by step.</strong> Ask the model to reason before it answers, also called chain-of-thought.</li><li><strong>Examples.</strong> Show solved cases in the prompt, also called few-shot prompting.</li></ol><p>Most guides list these techniques. Few show what each one changes. So I measured it.</p><h3>What I tested</h3><p>I wrote 60 tasks with answers computed in advance, in three groups of 20:</p><ul><li><strong>Math.</strong> Word problems in three or four steps: boxes of bottles shipped and received, train tickets paid for with twenty-dollar bills.</li><li><strong>Classification.</strong> Customer messages sorted into billing, delivery, account, technical or refund.</li><li><strong>Extraction.</strong> Short payment notes from which the model returns JSON with the payer’s name, the date and the amount. Five notes write the date as dd/mm/yyyy and add “(day/month/year)”. In two of them the day is 12 or less, so the date could also be read the American way.</li></ul><p>Every task ran with four prompts. All four stated the task and the required format, such as “Reply with the category name only” or “Output only the JSON.” This plain prompt, <strong>base</strong>, is the baseline. The other three added one technique each:</p><ul><li><strong>role:</strong> a system message with a role;</li><li><strong>steps:</strong> “Think step by step, then…” before the format instruction;</li><li><strong>examples:</strong> solved examples in the same format, two for math and classification, one for extraction. For math they gave only the answers, so that this prompt would not also teach reasoning.</li></ul><p>The main model was Qwen3‑4B-Instruct-2507, a 4-billion-parameter model without a reasoning mode, quantized to 4 bits and running locally in Ollama 0.40.4 on a MacBook Air M4, with its default settings (temperature 0.7). Each prompt ran three times, 720 answers in total. The three runs agreed almost everywhere, so a difference of three answers usually means one task that failed in all three runs, or three tasks that failed once each. I also ran the math problems once each through Qwen3‑4B-Thinking-2507, a model of the same size that always reasons before it answers. I wrote the method, the tasks and my expectations before the run.</p><p>One correction to my own scoring. The first rule for classification removed only the prefix “Category:” from the last line, so “Final category: billing” counted as wrong. The steps prompt wrote its answers that way and scored 40. With any such prefix removed it scores 57. The other prompts did not change.</p><h3>Results</h3><p>Correct answers out of 60 (20 tasks, three runs), and out of 20 for the reasoning model:</p><ul><li><strong>Math:</strong> base: 60; role: 57; steps: 57; examples: 54</li><li><strong>Classification:</strong> base: 51; role: 54; steps: 57; examples: 57</li><li><strong>Extraction:</strong> base: 57; role: 56; steps: 59; examples: 57</li><li><strong>Math, reasoning model:</strong> base: 20; steps: 19</li></ul><p>The steps scores in classification and extraction count the answer the model gave at the end. It never gave it in the required format. More on that below.</p><h4>The role changed little</h4><p>The expert role moved each group by three answers or fewer: down in math, up in classification, down in extraction. In math the three misses were three different problems, each wrong once. In classification the role fixed one of the three messages the base prompt always got wrong: a declined card, which it now filed under billing. On these tasks that is the whole effect. Anthropic’s documentation says a role “focuses Claude’s behavior and tone for your use case.” Tone is what it is for.</p><h4>Step by step did not help with math</h4><p>I expected “think step by step” to lift the math score of the model without a reasoning mode. It did not, because the model already worked step by step without being asked. Its base answers to math problems had a median length of 235 tokens, full of intermediate sums. Asking for steps added nothing it was not already doing.</p><p>The reasoning model solved 20 of 20 problems without the instruction and 19 of 20 with it. This matches what OpenAI writes about its reasoning models: “prompting them to ‘think step by step’ or ‘explain your reasoning’ is unnecessary.” Google’s guide for Gemini takes a softer line and suggests adding explicit step-by-step instructions when the model’s own thinking falls short. On these problems it did not fall short.</p><h4>Step by step caught the trap</h4><p>In extraction, steps was the only prompt that read one date correctly. “04/08/2025 (day/month/year)” means 4 August. The base, role and examples prompts read it as 8 April in all three runs. On the other ambiguous note, 02/10/2025, base and examples read the note correctly, so the models did not ignore the brackets everywhere. They slipped on one case out of two. The steps prompt wrote out the day and the month before producing the JSON and got both notes right in every run.</p><p>In classification, steps also raised the score from 51 to 57. It was the only prompt that filed the password reset message under account.</p><p>Reasoning out loud helps when a task hides a detail that is easy to skip. On routine tasks it adds cost without adding accuracy.</p><h4>Examples fixed the boundaries</h4><p>In classification, the base prompt sent three messages to “technical” in every run: a declined card, a tracking number that does not work, and a password reset email that never arrives. The intended answers were billing, delivery and account. The two examples in the prompt showed one billing case and one technical case. That fixed the card and the tracking number in every run. Only the password reset stayed wrong, and that message could reasonably be filed under technical as well.</p><p>The examples did not just show the format. They showed where the line between categories runs, which five category names alone do not convey.</p><p>In math, examples made things worse: 54 of 60. The examples gave only the final answer, and the model shortened its own answers from a median of 235 tokens to 151. Four of the six mistakes were addition errors in the final sum. In one answer the model wrote that 1,048 plus 864 is 912. A model copies the shape of the examples, including their brevity.</p><h4>The price of step by step</h4><p>Steps was the most expensive technique:</p><ul><li>In classification the base answer was one word and took a median of 0.08 seconds. The steps answer took 8.4 seconds, about 100 times longer.</li><li>In extraction, 1.2 seconds against 13.3, about 10 times longer.</li><li>In math almost nothing changed, 9.5 seconds against 10.9, because the model was reasoning anyway.</li><li>Asked for a category name only or JSON only, the steps prompt wrote an explanation first in all 120 of its classification and extraction answers. A program that expects one word or clean JSON would have to dig the answer out of the text.</li></ul><p>The reasoning model took a median of 32 seconds and about 800 tokens per math problem, against 9.5 seconds for the model without a reasoning mode, with the same 20 of 20.</p><h3>What to take from this</h3><ol><li><strong>Start with the baseline.</strong> Every prompt in the test stated the task and the exact format. That baseline alone solved all 20 math problems and returned valid JSON in all 60 extraction answers. I did not test a vaguer prompt, so I cannot say how much the clear task itself added, only that the techniques had little left to fix.</li><li><strong>A role is for tone.</strong> It fixed one borderline message and did nothing measurable for arithmetic or extraction.</li><li><strong>Use examples for fuzzy boundaries.</strong> Two examples fixed two of three classification errors. Check that they do not teach something you do not want, as the short math examples did. Choosing examples from the cases the model gets wrong seems the natural next step; I did not test it.</li><li><strong>Use step by step for traps, not by default.</strong> It caught the date and the password reset, and on these models it cost up to 100 times more time and broke the output format.</li><li><strong>Write the tasks and correct answers before you change the prompt, then count.</strong> A wrong date or a broken format, like a <a href="https://besk.tech/articles/what-is-ai-hallucination">hallucination</a>, is easy to miss when you read only a few answers.</li></ol><p>The vendors’ guides do not agree with each other. OpenAI suggests trying prompts without examples first for its reasoning models. Anthropic recommends three to five examples. They write for different models, which is one more reason to measure on yours.</p><h3>Limits</h3><p>Two small models of one family, 60 tasks, one wording per technique, examples written in advance rather than chosen from the model’s mistakes. Larger models may respond to the same techniques differently. The tasks were short and had one correct answer, which is not true of writing, research or coding. The test shows how to check techniques, not which one wins everywhere.</p><h3>Sources</h3><ul><li><a href="https://aws.amazon.com/what-is/prompt-engineering">What is Prompt Engineering?, AWS</a></li><li><a href="https://developers.openai.com/api/docs/guides/reasoning-best-practices">Reasoning best practices, OpenAI</a></li><li><a href="https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices">Prompting best practices, Claude Platform Docs</a></li><li><a href="https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/thinking/prompting-guide">Thinking prompting guide, Google Cloud</a></li><li><a href="https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507">Qwen3‑4B-Instruct-2507 model card</a></li><li><a href="https://huggingface.co/Qwen/Qwen3-4B-Thinking-2507">Qwen3‑4B-Thinking-2507 model card</a></li></ul><p><em>Vladimir Beskorovainyi, Enterprise AI Architect &amp; CTO, author of the Amazon bestseller “Enterprise AI: The KATA Way”, founder of Besk Tech (besk.tech)</em></p><p><em>Originally published at </em><a href="https://besk.tech/articles/what-is-prompt-engineering"><em>https://besk.tech</em></a><em> on December 3, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e67ca34d7e64" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is a Vector Database? Keyword Search vs Meaning Search on 40 Questions]]></title>
            <link>https://medium.com/@besk.tech/what-is-a-vector-database-keyword-search-vs-meaning-search-on-40-questions-541d72f40420?source=rss-f96be18d3d1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/541d72f40420</guid>
            <category><![CDATA[semantic-search]]></category>
            <category><![CDATA[vector-database]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Vladimir Beskorovainyi]]></dc:creator>
            <pubDate>Wed, 02 Dec 2026 00:00:56 GMT</pubDate>
            <atom:updated>2026-12-02T13:23:36.375Z</atom:updated>
            <content:encoded><![CDATA[<p>A vector database stores text as lists of numbers and finds the entries closest in meaning to a question. I ran the same questions through keyword search and meaning search on my laptop. When people used their own words, keyword search found the right document in the top three 9 times out of 20, meaning search 20 times. On bare error codes, where I expected meaning search to fail, it did not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9wfTu6uUh7K3rWB8" /></figure><p>A vector database stores text as vectors, lists of numbers that encode meaning, and answers a query by returning the stored items whose vectors are closest to the query’s vector. The useful questions are when it beats ordinary keyword search, when it does not, and whether you need a separate database for it at all. I measured all three on my laptop. For the first two I used 60 documents and 60 questions, and no database at all, which is itself part of the answer.</p><h3>What a vector database is</h3><p>An embedding model turns a piece of text into a vector of fixed length. EmbeddingGemma, the model I used, produces 768 numbers per text. It is trained so that texts with similar meaning land close to each other. “My refund has not arrived” and “the money for the returned item is still missing” share almost no words, but their vectors are near each other. I covered how embeddings behave in <a href="https://medium.com/articles/what-is-an-embedding">What Is an Embedding</a>.</p><p>A vector database keeps those vectors next to the original text and does one job well: given a new vector, find the nearest stored ones fast. Search then works in three steps.</p><ol><li>Every document is converted into a vector once, when it is added.</li><li>The question is converted into a vector by the same model.</li><li>The database returns the documents whose vectors are closest, usually by cosine similarity.</li></ol><p>Keyword search, by contrast, counts which words of the question appear in each document and how rare those words are. The standard formula is BM25. It is fast, predictable and blind to synonyms. A <a href="https://medium.com/articles/what-is-an-llm">large language model</a> does neither of these jobs by itself; it answers from whatever the search hands it.</p><h3>What I measured</h3><p>I wrote a small knowledge base for an imaginary online shop: 60 short documents about refunds, delivery, payments, accounts, 20 error codes and 8 subscription plans. Then 40 questions, each with one correct document, in two groups of 20, and later a third group.</p><p>- <strong>Meaning questions</strong> use other words than the document. “The vase came smashed into pieces” should find the document about items that arrive broken.</p><p>- <strong>Exact questions</strong> hinge on a code or a name. “I got ERR-4017 at checkout” should find ERR-4017 and not ERR-4071, ERR-4107 or ERR-4701, which exist next to it on purpose.</p><p>I wrote the method, the documents and the questions before the first run. Three ways of searching ran on the same data:</p><p>- BM25 keyword search (the rank_bm25 library, default settings, lowercase words, no stemming, no stop-word list);</p><p>- vector search with EmbeddingGemma (308M parameters, embeddinggemma in Ollama 0.40.4), running locally, with the query and document prefixes from its model card;</p><p>- a hybrid that merges both rankings with Reciprocal Rank Fusion: each document gets 1/(60 + its place) from each list, and the sums decide the order.</p><p>The machine was a MacBook Air M4 with 24 GB of memory. The measure is whether the correct document lands first, and whether it lands in the top three.</p><h3>Results</h3><ul><li><strong>Meaning: other words:</strong> keyword, top 1 / top 3: 4 / 9; vector, top 1 / top 3: 17 / 20; hybrid, top 1 / top 3: 11 / 14</li><li><strong>Exact: codes and plan names:</strong> keyword, top 1 / top 3: 18 / 20; vector, top 1 / top 3: 19 / 20; hybrid, top 1 / top 3: 19 / 20</li><li><strong>All 40:</strong> keyword, top 1 / top 3: 22 / 29; vector, top 1 / top 3: 36 / 40; hybrid, top 1 / top 3: 30 / 34</li></ul><p>Embedding all 60 documents took about one second. A single query, including turning the question into a vector, took 15 to 20 milliseconds.</p><p>### Where keyword search loses</p><p>On meaning questions keyword search put the right document in the top three only 9 times out of 20. “The vase came smashed into pieces” ranked the right document 49th of 60, because the document says “broken”, not “smashed”. “Do I owe customs fees if I order from abroad” ranked it 42nd, because the document says “import duties”. When the reader and the writer of a document use different words, keyword search has nothing to hold on to.</p><p>Vector search found every one of those 20 in the top three and 17 in first place. It missed first place three times, and each time the right document was second. For “my headphones stopped working after a year, will you fix them for free” it put the repair document first and the warranty document second. In my view both are reasonable answers.</p><p>### Where I expected vector search to lose</p><p>The common advice is that vectors are weak on exact tokens: product codes, invoice numbers, names. I built the error codes to test exactly that, with four codes made of the same digits in different order.</p><p>On this set the expectation did not hold. Vector search put the right document first in 19 of 20 exact questions. The single miss was the kind the advice warns about: ERR-8152 was confused with ERR-8512, same digits, both about invoice details. Keyword search failed to put the right document first twice: on “Pro 12 benefits”, where “Pro 120” ranked first, and on “I got ERR-4017 at checkout”. Both times the right document was second.</p><p>After the run I noticed a weakness in my own questions. Many exact questions also contain a topic word, such as “with my gift card” or “when saving company details”, and that word could be helping the vector model. So I wrote 20 more questions that are nothing but the code or the plan name: “ERR-4071”, “Pro 24”. On those, vector search put the right document first 20 times out of 20. So did keyword search. The one miss in the main set happened because of the extra words, not despite them: “when saving company details” pulled the model towards the neighbouring document about company names on invoices.</p><p>### The hybrid was not a free improvement</p><p>Combining both rankings is a common recommendation. Here the equal-weight hybrid scored worse than vectors alone: 14 of 20 in the top three on meaning questions against 20. When keyword search ranks the right document 49th or 42nd, it drags the combined place down. I then gave keyword search a weight of 0.3, chosen before the run and not tuned. That recovered most of the loss, 18 of 20, but still did not beat vectors alone.</p><p>The reason is simple. A hybrid helps when each method fails on different questions. Here vector search never left the right document out of the top three, so keyword search had nothing to rescue. The only question where keyword search beat vectors on first place, ERR-8152, stayed second in both hybrids. On your data the picture may differ, which is the point: test the hybrid on your own questions before you add it.</p><h3>Do you need a separate vector database?</h3><p>Not always. The search itself is simple arithmetic. For 60 documents I did not use a database at all: the vectors fit in memory and I compared the query with each of them directly. To see how far that goes, I timed the same direct comparison on random vectors of the same length. One query took 0.7 ms against 10,000 vectors, 4.8 ms against 100,000 and 49 ms against a million, which needed 3 GB of memory. Time grows in proportion to the number of vectors. On one laptop, a million documents is still searchable without any index.</p><p>A database starts to matter for three reasons:</p><ol><li><strong>Scale.</strong> Past a few million vectors, or with many users querying at once, comparing against each one becomes too slow and the memory adds up. Vector databases build approximate indexes. A widely used one is HNSW, a layered graph that jumps quickly towards the nearest neighbours. They trade a small chance of missing the exact nearest item for a large gain in speed.</li><li><strong>Updates.</strong> Documents change, and vectors must be added, replaced and deleted together with the text.</li><li><strong>Filters.</strong> Real queries combine meaning with conditions: only this customer’s documents, only this year, only published ones.</li></ol><p>If your data already lives in PostgreSQL, the pgvector extension adds a vector column type and nearest-neighbour search to the same database. That keeps vectors, text and filters in one place, under one backup and one access policy. A dedicated vector database makes sense when vector search is the main workload and the volume is large.</p><h3>Vector databases and RAG</h3><p>In a RAG system, retrieval-augmented generation, the model answers from documents the system found first. The vector database is that finding step, and the model cannot use a document it never received. In my test, keyword search left the right document out of the top three on 11 of 20 everyday questions. A RAG system built on it would have answered those 11 without the right material. I measured a case where retrieval added nothing in <a href="https://medium.com/articles/what-is-rag">What Is RAG</a>. The test in this article is the other half: how often retrieval finds the right document at all.</p><h3>What to take from this</h3><ol><li>Vector search is a sound default when users describe a problem in their own words. On my questions it found the right document in the top three 20 times out of 20, against 9 for keyword search.</li><li>Do not assume vectors fail on codes, and do not assume they succeed. Test with your own codes, including near-identical ones, and with the short queries your users actually type.</li><li>Do not add a hybrid by reflex. Measure it. In my test the equal-weight version made results worse, and the weighted one only came close to vectors alone.</li><li>Start inside the database you already have. A million vectors fit on a laptop. Move to a dedicated vector database when volume, update rate or concurrent load requires it.</li></ol><p>The test is small: 60 documents, 60 questions, one model, no index. It shows the mechanism, not a ranking of products. The method that matters is the same at any scale: write the questions and the correct answers before you run anything, and count.</p><h3>Sources</h3><ul><li><a href="https://ai.google.dev/gemma/docs/embeddinggemma/model_card">EmbeddingGemma model card, Google</a></li><li><a href="https://github.com/pgvector/pgvector">pgvector: open-source vector similarity search for Postgres</a></li><li><a href="https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf">Cormack, Clarke, Büttcher. Reciprocal Rank Fusion outperforms Condorcet and individual Rank Learning Methods, SIGIR 2009</a></li><li><a href="https://besk.tech/articles/what-is-rag">What Is RAG? A 1,534-Question Test Where Retrieval Only Took Things Away, BESK TECH</a></li></ul><p><em>Vladimir Beskorovainyi, Enterprise AI Architect &amp; CTO, author of the Amazon bestseller “Enterprise AI: The KATA Way”, founder of Besk Tech (besk.tech)</em></p><p><em>Originally published at </em><a href="https://besk.tech/articles/what-is-a-vector-database"><em>https://besk.tech</em></a><em> on December 2, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=541d72f40420" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is AI Slop? I Asked a Model for 10 LinkedIn Posts and 9 Began the Same Way]]></title>
            <link>https://medium.com/@besk.tech/what-is-ai-slop-i-asked-a-model-for-10-linkedin-posts-and-9-began-the-same-way-8fa5e9dd33ac?source=rss-f96be18d3d1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/8fa5e9dd33ac</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[content-marketing]]></category>
            <dc:creator><![CDATA[Vladimir Beskorovainyi]]></dc:creator>
            <pubDate>Tue, 01 Dec 2026 00:00:27 GMT</pubDate>
            <atom:updated>2026-12-01T09:04:59.337Z</atom:updated>
            <content:encoded><![CDATA[<p>AI slop is low-effort content mass-produced with generative AI. I asked an open model on my laptop for the same post ten times. Nine began with the same three words, and all ten used the word ‘thrive’. Giving it real facts halved the stock phrases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dGkK32pNJ3t5hI7D" /></figure><p>AI slop is low-quality content produced in bulk with generative AI: posts, articles, images, music and video made fast, with little thought and no checking, and published because they cost almost nothing to make. I asked an open model on my laptop for the same LinkedIn post ten times to count what gives such text away. Nine of the ten posts began with the same three words. All ten used the word “thrive”.</p><h3>What AI slop is</h3><p>In English, slop is watery leftover food, the kind fed to pigs. Applied to AI, the word covers content that exists because it was easy to generate. Nobody had something to say; a tool made it cheap to fill the space. Typical examples are a product page whose three paragraphs fit any product, a news site filled with rewritten articles, and a feed of near-identical images.</p><p>Plenty of text made with AI is fine. A draft written with a model, then checked, cut and filled with real facts, is an ordinary text with someone standing behind it. Slop is what gets published without that step.</p><p>It also differs from a hallucination, a confident wrong statement, which I described in <a href="https://besk.tech/articles/what-is-ai-hallucination">What Is AI Hallucination</a>. Slop can be accurate and still empty. It says nothing specific, and there is a lot of it.</p><h3>Why it all looks the same</h3><p>A language model writes the most likely continuation of a request; I explained the mechanism in <a href="https://besk.tech/articles/what-is-an-llm">What Is an LLM?</a>. In an earlier test I asked Qwen3, an open model, for a random number from 1 to 10 twenty times, and it said 7 in 14 of them. Asked for a fruit, it said apple every time (<a href="https://besk.tech/articles/what-is-generative-ai">What Is Generative AI?</a>). Ask the same model for a post about remote work, and it writes the most typical post about remote work. A thousand people asking for that post get a thousand copies of it.</p><p>People who work with language models learn to spot this by form. The sentences have a recognisable shape, the punctuation and the kinds of errors repeat, and there is usually far more text than a person would write. That is my experience, and I wanted numbers behind it.</p><h3>What I measured</h3><p>I ran Qwen3 with 4 billion parameters on my MacBook Air (Apple M4, 24 GB) through Ollama 0.40.4. Temperature and sampling were left at the model’s defaults; the script set the context length, the answer length limit and the model’s reasoning mode. I wrote the method, the prompts and a list of 20 stock phrases before the first run. The list includes “in today’s”, “game-changer”, “unlock”, “elevate”, “seamless”, “delve”, “journey”, “thrive”, “empower”, “boost” and “not just”.</p><p>There were two tasks, each asked in two ways:</p><p>- <strong>Generic:</strong> a short LinkedIn post about why remote work is good for teams, and a short product description for a reusable water bottle, 60 to 100 words.</p><p>- <strong>With facts:</strong> the same request plus four specific facts the model could not know. For the post: a team of 9 data engineers in 4 countries, a written stand-up since March, pull request review time down from 2 days to 6 hours, and a planning week in Tallinn each autumn. For the bottle: 650 ml, 0.6 mm steel and 290 g, a lid with no silicone seal, and a fit for a car cup holder but not a bike cage.</p><p>Each request ran ten times, 40 texts in all. I counted stock phrases and the largest group of texts that began with the same three words. I also measured how many three-word sequences the texts shared, but that number rose when facts were added, because every text repeated the same facts, so it cannot tell a stock phrase from content and I leave it out of the conclusions.</p><h3>What came back</h3><ul><li><strong>Remote work post, generic:</strong> texts with a stock phrase, of 10: 10; stock phrases per text: 2.4; largest group with the same first three words, of 10: 9 (“Remote work isn’t”)</li><li><strong>Remote work post, with facts:</strong> texts with a stock phrase, of 10: 9; stock phrases per text: 1.2; largest group with the same first three words, of 10: 5</li><li><strong>Water bottle, generic:</strong> texts with a stock phrase, of 10: 4; stock phrases per text: 0.6; largest group with the same first three words, of 10: 1 (every text opened differently)</li><li><strong>Water bottle, with facts:</strong> texts with a stock phrase, of 10: 3; stock phrases per text: 0.3; largest group with the same first three words, of 10: 4 (“Stay hydrated with”)</li></ul><p>The count in the last column treats a straight and a curly apostrophe as different characters, as the method was written. Counted as the same, which I checked after the run, all 10 generic posts opened with “Remote work isn’t”, against 7 of 10 posts with facts.</p><p>The generic post reads as slop to anyone. Nine of the ten continued with “just”: just a trend, just a perk, just convenient. Five called remote work “a team superpower”. “Thrive” appeared in all ten. “Empower” and “boost” appeared in four each.</p><p>With four real facts, the post used half as many stock phrases, and the largest group with the same opening shrank from nine texts to five. “Thrive” was still in seven of ten. The water bottle descriptions had fewer stock phrases from the start, and the facts halved them again. With facts, though, four of ten bottle descriptions opened with the same three words, “Stay hydrated with”.</p><p>One more count came after the run, which I had not planned. The em dash, a mark some readers now take as a sign of machine text, appeared in 32 of the 40 texts, including all ten generic posts.</p><h3>Where slop comes from</h3><p>The generic request asked for the typical post, and the model delivered exactly that. With nothing specific to work with, it filled the space with the safest words it knows: thrive, empower, superpower.</p><p>Facts are the one ingredient a model cannot supply. The 650 ml, the 290 g and the planning week in Tallinn had to come from the person asking. Each of them replaced a sentence the model would otherwise have filled from habit.</p><p>That makes slop mostly a publishing problem. Generating a generic text takes a second. Checking it, cutting it and adding what only you know takes the time the generic version skipped.</p><h3>What platforms and publishers are seeing</h3><p>On November 17, 2026, Digital Music News reported that SoundCloud had updated its terms, and that its chief executive described the target in an open letter as “AI slop, spam, and excessive uploads”. The updated terms let it withhold, reverse or recover payouts for what it calls AI abuse, meaning AI used to deceive or to inflate earnings.</p><p>Slop also travels under other people’s names. On November 13, 2026, Inside Higher Ed, republishing a Times Higher Education report, described three little-known journals that had published papers under the names of prominent academics. Several of the academics told the publication they had not written the papers or agreed to their names appearing there; the journals did not respond before publication.</p><h3>How to avoid publishing slop</h3><ol><li><strong>Start from your own facts.</strong> Numbers, names, dates, decisions and the one detail only you know. A model can arrange them; it cannot invent them truthfully.</li><li><strong>Cut the first sentence.</strong> In my test the opening repeated most. If yours sounds like a slogan, delete it and start with the fact.</li><li><strong>Search for the stock words.</strong> Thrive, empower, elevate, seamless, journey, superpower. One may be chance; three is a pattern readers notice.</li><li><strong>Make it shorter.</strong> Too much text is one of the first signs readers pick up.</li><li><strong>Have someone else read it.</strong> The writer, human or model, is the worst judge of whether a text says anything.</li></ol><p>The short version: the model supplies the form, and the facts have to come from you. A text with nothing of yours in it is the definition of slop.</p><h3>What this does not show</h3><p>One small open model, two tasks and 40 texts, one run. Large commercial models write more fluently and may use different stock phrases. My phrase list was written in advance and is incomplete. There is no comparison with human-written text, so the numbers show how much the request changes the model’s output, not how far that output is from a person’s. The em dash count and the apostrophe-insensitive opening count were added after the run.</p><h3>Sources</h3><ul><li><a href="https://www.digitalmusicnews.com/2026/11/17/soundcloud-ai-slop-crackdown/">SoundCloud Kicks Off Crackdown Targeting ‘AI Slop, Spam’, Digital Music News</a></li><li><a href="https://www.insidehighered.com/news/faculty/books-publishing/2026/11/13/ai-slop-papers-published-under-prominent-academics-names">‘AI Slop’ Papers Published Under Prominent Academics’ Names, Inside Higher Ed (from Times Higher Education)</a></li><li><a href="https://docs.ollama.com/api/chat">Ollama API: Chat</a></li><li><a href="https://besk.tech/articles/what-is-generative-ai">What Is Generative AI? I Asked a Model for a Random Number 20 Times and Got 7 Fourteen Times, BESK TECH</a></li><li><a href="https://besk.tech/articles/what-is-an-llm">What Is an LLM? I Asked One Who First Walked on Kepler-442b, BESK TECH</a></li><li><a href="https://besk.tech/articles/what-is-ai-hallucination">What Is AI Hallucination, and Why You Cannot See It, BESK TECH</a></li></ul><p><em>Vladimir Beskorovainyi, Enterprise AI Architect &amp; CTO, author of the Amazon bestseller “Enterprise AI: The KATA Way”, founder of Besk Tech (besk.tech)</em></p><p><em>Originally published at </em><a href="https://besk.tech/articles/what-is-ai-slop"><em>https://besk.tech</em></a><em> on December 1, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fa5e9dd33ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is Generative AI? I Asked a Model for a Random Number 20 Times and Got 7 Fourteen Times]]></title>
            <link>https://medium.com/@besk.tech/what-is-generative-ai-i-asked-a-model-for-a-random-number-20-times-and-got-7-fourteen-times-40218941ce56?source=rss-f96be18d3d1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/40218941ce56</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Vladimir Beskorovainyi]]></dc:creator>
            <pubDate>Mon, 30 Nov 2026 00:00:59 GMT</pubDate>
            <atom:updated>2026-11-30T12:37:41.614Z</atom:updated>
            <content:encoded><![CDATA[<p>Generative AI creates new text, images or code instead of picking an answer from a fixed list. I asked a model on my laptop the same eight questions 20 times each. A coffee shop slogan came back 16 different ways. A random number from 1 to 10 came back as 7 fourteen times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*u0QLdm0gVK1_WHl8" /></figure><p>Generative AI is artificial intelligence that creates new content, such as text, images, audio or code, in response to a prompt. Earlier AI mostly sorted things into known categories or predicted a number. Generative AI writes something that was not there before. I asked an open model on my laptop the same eight questions 20 times each to see what “generative” means in practice. A slogan for a coffee shop came back 16 different ways. A random number from 1 to 10 came back as 7 fourteen times.</p><h3>What generative AI is</h3><p>The word “generative” separates two kinds of systems. A classifier looks at an input and picks one answer from a list someone fixed in advance: spam or not spam, which department should handle a letter, whether a payment looks like fraud. A forecasting model produces a number. Both are useful and both are still everywhere.</p><p>A generative model produces new content of the same kind it learned from. A text model writes sentences, an image model draws pictures, a code model writes code. ChatGPT, Claude and Gemini are generative AI products built around large language models; I explained how those work in <a href="https://besk.tech/articles/what-is-an-llm">What Is an LLM?</a>. Most image generators work on a different principle, refining a picture out of noise step by step, but they share the same property: each run produces something new.</p><p>For text, the mechanism is simple to state. The model writes one token at a time, a word or a piece of a word (<a href="https://besk.tech/articles/what-is-a-token-in-ai">how tokens work</a>), and each time it looks at the likely next pieces and picks one. How it picks is controlled by a setting called temperature. At zero it always takes the most likely piece. Above zero it sometimes takes a less likely one, which is where the variety comes from.</p><h3>What I measured</h3><p>I ran Qwen3 with 4 billion parameters on my MacBook Air (Apple M4, 24 GB) through Ollama 0.40.4. I wrote the method and the eight prompts before the first run. Each prompt asked for a one-line answer, and there were four kinds, two prompts each:</p><p>- <strong>creative:</strong> a slogan for a small coffee shop, a name for a grey cat;</p><p>- <strong>a choice with no right answer:</strong> name one fruit, pick a random number from 1 to 10;</p><p>- <strong>a fact:</strong> the capital of Australia, the author of Pride and Prejudice;</p><p>- <strong>arithmetic:</strong> 17 times 23, the number of days in a leap year.</p><p>Each prompt went to the model 20 times with its default settings (temperature 0.6) and 5 times at temperature 0. This model always reasons before it answers; I counted only the final answer. I counted how many different answers came back, ignoring capital letters and full stops.</p><h3>What came back</h3><ul><li><strong>Coffee shop slogan:</strong> different answers out of 20: 16; most common: “Small coffee, big smiles”, 3 times</li><li><strong>Name for a grey cat:</strong> different answers out of 20: 5; most common: Ash 7, Grey 5, Mist 4</li><li><strong>Name one fruit:</strong> different answers out of 20: 1; most common: apple, 20 times</li><li><strong>Random number from 1 to 10:</strong> different answers out of 20: 3; most common: 7 fourteen times, 5 four times, 4 twice</li><li><strong>Capital of Australia:</strong> different answers out of 20: 1; most common: Canberra, right 20 of 20</li><li><strong>Author of Pride and Prejudice:</strong> different answers out of 20: 2; most common: “Jane Austen” 19, “Austen” 1, right 20 of 20</li><li><strong>17 × 23:</strong> different answers out of 20: 4; most common: 391 every time; 3 times the model wrote out the working instead of one number</li><li><strong>Days in a leap year:</strong> different answers out of 20: 1; most common: 366, right 20 of 20</li></ul><p>At temperature 0 every prompt gave exactly one answer, five times in a row. For the slogan it was “Small coffee, big warmth.”</p><h3>What the numbers say about “generative”</h3><p><strong>Variety appears only where many answers are almost equally likely.</strong> A coffee shop slogan can be written a thousand ways, and the model’s 20 answers fell into 16 versions. Even then it leaned on one pattern: “Small coffee, big smiles”, “Small cup, big joy”, “Small brew, big smiles”, “Small coffee, big heart”. It varied the words inside a shape it liked.</p><p><strong>“Random” is not random.</strong> Asked for a random number from 1 to 10, the model said 7 in 14 answers out of 20. It never said 1, 2, 3, 6, 8, 9 or 10. Asked for any fruit, it said apple all 20 times. A generative model does not draw from a fair lottery. It writes the most typical answer, with a little room to wander. If you need a random number, use a random number generator, not a language model, and for passwords or keys a cryptographic one.</p><p><strong>Facts were stable here, and that is the good case.</strong> Canberra, Jane Austen, 391 and 366 were right every time. These are facts the model has seen thousands of times. The risk is with facts it has seen rarely or never. In my LLM test the same model, given the sentence “The first person to walk on Kepler-442b was” to continue, wrote “a 20-year-old woman named Aisha”. No one has visited that planet. It generates a fluent answer either way.</p><p><strong>The same machine produces both.</strong> The randomness that gives a writer 16 slogans to choose from is still switched on when you ask a factual question. On these four well-known facts it changed nothing. On a fact the model has seen rarely, the same setting means the second answer may not match the first, and I measured how often confident wrong answers appear on a harder task in <a href="https://besk.tech/articles/what-is-ai-hallucination">What Is AI Hallucination</a>. Variety is a feature for text that only has to sound right. It is a cost for anything that has to be right.</p><h3>Why companies are careful with it</h3><p>In my experience, generative AI still makes many errors and inaccuracies. That is why it is hard to use in closed corporate networks, cut off from the internet, and for commercial work, and why, in my view, large companies do not trust it yet. Even when it gives a link to its source, someone still has to check it. That checking is the bottleneck of the technology today.</p><p>The earlier kinds of AI that I built for years had a fixed set of answers, so their errors could be counted against a test set and the system could be signed off. A generative system can say something nobody listed in advance. The error is not one of five known categories; it can be anything that reads well.</p><h3>What it is trained on is still argued about</h3><p>The questions around generative AI are not only about accuracy. On November 26, 2026, CNN reported that some artists in the United States, the United Kingdom and Canada were deleting their Instagram and Facebook accounts or weighing it over proposed Meta terms. According to CNN, the terms would let automated software scrape external websites linked from business accounts, such as portfolios and online stores, without the owners’ permission, and the artists fear their work would end up training AI. A Meta spokesperson told CNN the company is pausing the changes and that the current terms remain in effect. What a model is trained on and what it produces are both still being argued about.</p><h3>What to take from this</h3><ol><li><strong>Generative AI creates new content; earlier AI mostly chose from a fixed list.</strong> That difference is where both its usefulness and its errors come from.</li><li><strong>The same prompt can give different answers.</strong> In my test, a slogan had 16 versions out of 20. At temperature 0 it had one.</li><li><strong>It writes the typical answer, not a random one.</strong> Fourteen of 20 “random” numbers were 7, and the fruit was apple all 20 times.</li><li><strong>Check anything that has to be true.</strong> Use the variety for drafts and options, and verify facts, figures and links before they leave your desk.</li></ol><h3>What this does not show</h3><p>One small open model and eight prompts, 20 answers each at the default setting and 5 at temperature 0. Commercial chatbots use their own settings and instructions, so their spread will differ. The facts I asked about are very well known, so 20 out of 20 here says nothing about rare facts. Images, audio and video models generate differently from text models.</p><h3>Sources</h3><ul><li><a href="https://docs.ollama.com/api/chat">Ollama API: Chat</a></li><li><a href="https://www.cp24.com/news/world/2026/11/27/artists-are-quitting-instagram-and-facebook-over-fears-ai-will-steal-their-work/">Artists are quitting Instagram and Facebook over fears AI will steal their work, CP24</a></li><li><a href="https://edition.cnn.com/2026/11/26/tech/artists-meta-ai-slop-instagram-facebook">Artists are quitting Instagram and Facebook over fears AI will steal their work, CNN</a></li><li><a href="https://besk.tech/articles/what-is-an-llm">What Is an LLM? I Asked One Who First Walked on Kepler-442b, BESK TECH</a></li><li><a href="https://besk.tech/articles/what-is-a-token-in-ai">What Is a Token in AI? I Ran the Same 71 Tasks on Three Models, BESK TECH</a></li><li><a href="https://besk.tech/articles/what-is-ai-hallucination">What Is AI Hallucination, and Why You Cannot See It, BESK TECH</a></li></ul><p><em>Vladimir Beskorovainyi, Enterprise AI Architect &amp; CTO, author of the Amazon bestseller “Enterprise AI: The KATA Way”, founder of Besk Tech (besk.tech)</em></p><p><em>Originally published at </em><a href="https://besk.tech/articles/what-is-generative-ai"><em>https://besk.tech</em></a><em> on November 30, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40218941ce56" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is an LLM? I Asked One Who First Walked on Kepler-442b]]></title>
            <link>https://medium.com/@besk.tech/what-is-an-llm-i-asked-one-who-first-walked-on-kepler-442b-e411e4ca9f55?source=rss-f96be18d3d1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e411e4ca9f55</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Vladimir Beskorovainyi]]></dc:creator>
            <pubDate>Sun, 29 Nov 2026 00:00:28 GMT</pubDate>
            <atom:updated>2026-11-29T13:54:15.335Z</atom:updated>
            <content:encoded><![CDATA[<p>An LLM, a large language model, continues text with the most likely next piece. I measured that on my laptop: the model named a first person on a planet no one has visited, and the numbers inside it showed it was guessing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Xc1iQqCrraeQObaN" /></figure><p>An LLM is a large language model: a neural network trained on huge amounts of text to predict what comes next. It is not the LL.M. law degree, which shares the letters. ChatGPT, Claude and Gemini are products built around such models. I ran one on my laptop and asked it to continue “The first person to walk on Kepler-442b was”. It answered “a 20-year-old woman named Aisha”. No one has walked on Kepler-442b. The interesting part is what the model’s own numbers said while it wrote that.</p><h3>What an LLM is</h3><p>LLM stands for large language model. It is trained on a very large amount of text to do one thing: given everything so far, predict the next token. A token is a word or a piece of a word; I explained how they work in <a href="https://besk.tech/articles/what-is-a-token-in-ai">an earlier test</a>. After that first training, the model is trained further to answer questions and follow instructions, which is why it feels like talking to someone.</p><p>The closest everyday comparison is the word suggestion on a phone keyboard, or T9 on the old push-button phones. You type a few letters, and the phone offers the word you most likely mean. An LLM does the same at a vastly larger scale, one token at a time, until the answer is finished.</p><p>The most common misunderstanding I see is that people treat it as a thinking person. In practice it is much closer to that keyboard suggestion.</p><h3>Where the keyboard comparison stops working</h3><p>The mechanism is the same: pick the next piece of text by how likely it is. The scale is not. A phone keyboard looks at the letters you pressed and a word list. An LLM looks at the whole text before the current position, thousands of tokens, and has learned from trillions of tokens. So it continues not just a word but an argument, a block of code or the structure of a whole document. The bare model also does not look facts up anywhere; chat products may add a search step, but the model itself only has what stayed in its parameters after training. What neither of them has is a step that checks whether the continuation is true.</p><h3>What I measured</h3><p>I ran Qwen3 with 4 billion parameters on my MacBook Air (Apple M4, 24 GB) through Ollama 0.40.4. Ollama can return the probability of every token the model produces and of the four runners-up. I sent plain text with no chat wrapper, so the model simply continued it, at temperature 0, so the model always took the most likely token. I wrote the method and all the prompts before the first run.</p><p>First, four simple prompts and the model’s top candidates for the next token:</p><ul><li><strong>The cat sat on the:</strong> top candidate: mat, 91%; next candidates: matrix 4%, chair 1%</li><li><strong>The capital of France is:</strong> top candidate: Paris, 69%; next candidates: a blank line “____” 6%, “a” 4%</li><li><strong>1, 2, 3, 4,:</strong> top candidate: a space, 98%, then 5, 96%; next candidates:</li><li><strong>Anna paid Boris 100 dollars for the:</strong> top candidate: first, 11%; next candidates: a space 4%, delivery 4%, work 4%</li></ul><p>The last row shows how weak the pull of a single prompt can be: after “Anna paid Boris 100 dollars for the” no word gets even one chance in eight. The second row is worth a look too. The second-best continuation of “The capital of France is” is a blank to fill in. The model has seen enough school quizzes to expect one. It gave the same kind of answer for “The author of the novel Pride and Prejudice is”: it wrote a blank and then a multiple-choice list starting with “A. Charles Dickens”. It is continuing the kind of text it has seen, not answering a question.</p><h3>Real facts and invented ones</h3><p>Then I wrote six pairs of prompts in the same form. One prompt in each pair asks about something real, the other about something I invented. The tower, the element, the planet visit, the company, the country and the novel are all made up for this test.</p><ul><li><strong>The Eiffel Tower was completed in the year:</strong> model wrote: 1889; invented: The Krovenhal Tower was completed in the year; model wrote: 1200</li><li><strong>The chemical symbol for gold is:</strong> model wrote: Au; invented: The chemical symbol for veltrium is; model wrote: V</li><li><strong>The first person to walk on the Moon was:</strong> model wrote: Neil Armstrong; invented: The first person to walk on Kepler-442b was; model wrote: a 20-year-old woman named Aisha</li><li><strong>The CEO of Microsoft is:</strong> model wrote: the chief executive officer of Microsoft Corporation; invented: The CEO of Brannock Dynamics is; model wrote: a man named John</li><li><strong>The capital of Australia is:</strong> model wrote: a city that is not a state… Canberra; invented: The capital of Velmora is; model wrote: a city called Velmora</li><li><strong>The author of the novel Pride and Prejudice is:</strong> model wrote: a quiz blank, then options; invented: The author of the novel The Glass Orchard of Tamsin Vale is; model wrote: a woman named Tamsin Vale</li></ul><p>On all six invented prompts the model gave a concrete answer: a year, a symbol, a name. Not once did it say that the tower, the element, the company or the visit does not exist. On the page, “1200” reads exactly as confidently as “1889”.</p><p>The real column is not clean either. For Microsoft the model spelled out what CEO means and named no one. For Pride and Prejudice it wrote a quiz, with Jane Austen as option B. A prompt about a real fact does not guarantee the fact; it only makes it likely.</p><p>Before the run I decided to compare the probability of the first token of each continuation. That measure turned out weak: the first token was often just “a” or a space, and the invented prompt came out lower in only 3 of the 6 pairs. So after the run I also looked at the first token of the answer itself, the name, the number or the symbol. This second view was not planned in advance, and I report it as such:</p><ul><li><strong>Australia / Velmora:</strong> answer token, real: Canberra, 38%; answer token, invented: V(elmora), 28%</li><li><strong>Eiffel / Krovenhal:</strong> answer token, real: 1(889), 98%; answer token, invented: 1(200), 68%</li><li><strong>gold / veltrium:</strong> answer token, real: Au, 98%; answer token, invented: V, 57%</li><li><strong>Moon / Kepler-442b:</strong> answer token, real: Neil, 91%; answer token, invented: A(isha), 3%</li><li><strong>Pride and Prejudice / Tamsin Vale:</strong> answer token, real: no answer, a quiz; answer token, invented: T(amsin), 14%</li><li><strong>Microsoft / Brannock Dynamics:</strong> answer token, real: no name; answer token, invented: John, 7%</li></ul><p>Where both sides gave an answer, the invented one always had the lower probability: from 3% to 68% against 38% to 98% for the real ones. In that sense the model was less sure. But the text it produced carries none of that. It took the most likely token each time, and the most likely token of a weak guess still makes a fluent sentence.</p><p>That is one of the mechanisms behind what is called hallucination. I measured how often such confident wrong answers appear on a real task in <a href="https://besk.tech/articles/what-is-ai-hallucination">What Is AI Hallucination</a>.</p><h3>A chat is a text the model continues</h3><p>A chatbot hides this, but it works the same way. When I sent “What is an LLM?” through Ollama’s chat interface, the model read 16 tokens. The question itself is 6. The other 10 are the chat template: markers that say where the user’s turn starts and where the assistant’s turn should begin. The model is still continuing a text. The text just ends with a marker that says the assistant speaks next.</p><h3>What makes one LLM different from another</h3><p><strong>Size.</strong> It is counted in parameters, the numbers inside the model that training adjusts. 7B means 7 billion. More parameters usually means better answers and more memory: at 16 bits each parameter takes 2 bytes, so a 7B model needs about 14 GB just for its weights and a 32B model about 64 GB.</p><p><strong>Generation.</strong> In my benchmark built on BIRD, 1,534 questions where the model turns plain English into a database query (<a href="https://arxiv.org/abs/2606.29733">arXiv:2606.29733</a>), I ran five open models myself:</p><ul><li><strong>Qwen2.5-Coder 32B:</strong> 54.9%</li><li><strong>Qwen2.5-Coder 14B:</strong> 52.0%</li><li><strong>Qwen2.5-Coder 7B:</strong> 42.6%</li><li><strong>Code Llama 13B:</strong> 26.3%</li><li><strong>Code Llama 7B:</strong> 23.7%</li></ul><p>On my text-to-SQL benchmark, Code Llama with 13 billion parameters, released in 2023, finished 16 points behind Qwen2.5-Coder with 7 billion, released in 2024. A newer small model can beat an older bigger one.</p><p><strong>Open or closed weights.</strong> An open model can be downloaded and run on your own machine, which matters when the data cannot leave it. A closed model is available only through the vendor’s service. On November 16, 2026 Alibaba launched Qwen4-Max, a model with 2.4 trillion parameters of which 71 billion work on each token, and kept its weights closed. Smaller Qwen4 models are promised as open, without a date.</p><h3>How I choose a model</h3><p>I start with the hardware the model will run on, because it is usually the hard limit. Then I pick the best model that fits in that memory, keeping the generation in mind. Then I test it on my own material, because a leaderboard says how a model does on average and I need to know how it does on my questions.</p><p>I also keep one rule from the test above: the model will answer even when it should not. Anything that depends on a fact gets checked by something other than the model’s own confidence in the wording.</p><h3>What to take from this</h3><ol><li><strong>An LLM predicts the next token.</strong> Everything else, answering, translating, writing code, grows out of that.</li><li><strong>Fluent is not the same as sure.</strong> In my test the wording of a guess and of a fact looked identical; only the probabilities differed.</li><li><strong>It does not say what it does not know.</strong> On six invented subjects it gave six concrete answers, though with lower probabilities.</li><li><strong>Generation can matter more than size.</strong> A 2024 model with 7B parameters beat a 2023 model with 13B by 16 points.</li></ol><h3>What this does not show</h3><p>One small open model, one run at temperature 0, six pairs of prompts and four single ones. Large commercial chatbots add instructions, search and refusals around the model, so they may decline more often than a bare model continuing text. The probability of a single token is a rough signal, not a reliable lie detector, and the answer-token comparison was chosen after the run. The benchmark covers one task, turning questions into database queries.</p><h3>Sources</h3><ul><li><a href="https://arxiv.org/abs/2606.29733">How far do on-premises open LLMs get on Text-to-SQL? A cross-family size and technique frontier on BIRD, arXiv:2606.29733</a></li><li><a href="https://docs.ollama.com/api/generate">Ollama API: Generate a response</a></li><li><a href="https://qz.com/alibaba-qwen4-max-flagship-ai-model-us-rivals-111626">Alibaba launches Qwen4-Max flagship AI model to rival U.S. leaders, Quartz</a></li><li><a href="https://www.technology.org/2026/11/16/alibaba-qwen4-max-flagship-ai-model-safety-cost/">Alibaba launches Qwen4-Max flagship AI model, Technology.org</a></li><li><a href="https://besk.tech/articles/what-is-a-token-in-ai">What Is a Token in AI? I Ran the Same 71 Tasks on Three Models, BESK TECH</a></li><li><a href="https://besk.tech/articles/what-is-ai-hallucination">What Is AI Hallucination, and Why You Cannot See It, BESK TECH</a></li></ul><p><em>Vladimir Beskorovainyi, Enterprise AI Architect &amp; CTO, author of the Amazon bestseller “Enterprise AI: The KATA Way”, founder of Besk Tech (besk.tech)</em></p><p><em>Originally published at </em><a href="https://besk.tech/articles/what-is-an-llm"><em>https://besk.tech</em></a><em> on November 29, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e411e4ca9f55" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is an Embedding? Two Models Rated “Boris Paid Anna” Closer Than the Right Answer]]></title>
            <link>https://medium.com/@besk.tech/what-is-an-embedding-two-models-rated-boris-paid-anna-closer-than-the-right-answer-5b6e239c9345?source=rss-f96be18d3d1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b6e239c9345</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Vladimir Beskorovainyi]]></dc:creator>
            <pubDate>Sat, 28 Nov 2026 00:00:06 GMT</pubDate>
            <atom:updated>2026-11-28T06:29:44.222Z</atom:updated>
            <content:encoded><![CDATA[<p>An embedding turns text into a list of numbers so that texts with similar meaning get similar numbers. I tested two open embedding models on my laptop with 55 pairs of sentences. Both knew what a sentence was about. Neither reliably knew what it said.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Lq63fU9Fjl9gR8lG" /></figure><p>An embedding is a list of numbers that a model makes from a piece of text, so that texts with similar meaning get similar numbers. It is how a search engine finds a document that answers your question in different words, and how a RAG system decides what to put in front of a language model. I tested two open embedding models on my laptop with 55 pairs of sentences. Both of them scored a sentence with the roles swapped, such as “Boris paid Anna 100 dollars” for “Anna paid Boris 100 dollars”, as closer to the original than a correct paraphrase. That happened in all 10 sentences I tried, in English and in Russian.</p><h3>What an embedding is</h3><p>Take the sentence “The payment went through.” An embedding model turns it into 768 numbers. The first eight, from the model I used, are:</p><p>-0.2049, 0.0160, 0.0154, 0.0234, 0.0126, 0.0933, -0.0754, -0.0305</p><p>No single number means anything on its own. What matters is where the whole list points. The model was trained so that sentences with similar meaning point in similar directions, and unrelated sentences point in different ones. A list of numbers like this is also called a vector, which is why the databases that store them are called vector databases.</p><p>The idea is older than chatbots. In 2013 word2vec learned one vector per word from large amounts of text, so that words used in similar contexts got similar vectors. Language models still start the same way: their first layer, the embedding layer, turns each token of your text into a vector before any other computation happens. I described tokens in <a href="https://besk.tech/articles/what-is-a-token-in-ai">an earlier test</a>. An embedding model goes one step further and turns a whole sentence or document into one vector.</p><p>The same idea works beyond text. Images, audio and code can all be turned into vectors. On November 17, 2026 Google described EmbeddingGemma 2 and its technical report: an open model that puts text, images, audio and video into one shared space of 768-number vectors, so that a photo of a dog and the words “a dog” land near each other.</p><h3>How similarity is measured</h3><p>Two embeddings are compared with cosine similarity. It gives one number: close to 1 when the two vectors point the same way, close to 0 when they have nothing in common. In my test, unrelated pairs, such as a payment and a cat sleeping on a windowsill, averaged between 0.13 and 0.25. Pairs on the same subject averaged between 0.84 and 0.98.</p><p>This is what makes search by meaning work. You turn every document into an embedding once. When a question arrives, you turn it into an embedding too, and return the documents with the highest similarity. No keyword has to match.</p><h3>What I tested</h3><p>I ran two open models on my MacBook Air (Apple M4, 24 GB of memory) through Ollama 0.40.4: EmbeddingGemma, the first version of Google’s model, and Qwen3-Embedding 0.6B. I wrote the method and all the sentences before the first run. The comparison ran once; the speed test ran three times, and I report the median.</p><p>There were five base sentences in English and the same five in Russian, about a payment, a bank loan, a delivery, a leave request and a court ruling. The first one was “Anna paid Boris 100 dollars for the repair on Monday.” Each base sentence got four partners:</p><ol><li><strong>A paraphrase:</strong> the same fact in other words. “On Monday Boris received 100 dollars from Anna for fixing it.”</li><li><strong>A negation:</strong> one “not” that reverses the meaning. “Anna did not pay Boris 100 dollars for the repair on Monday.”</li><li><strong>A different number:</strong> “Anna paid Boris 900 dollars for the repair on Monday.”</li><li><strong>Swapped roles:</strong> “Boris paid Anna 100 dollars for the repair on Monday.”</li></ol><p>That makes 40 pairs. I added 10 pairs of unrelated sentences and 5 pairs of an English sentence with its Russian translation: 55 in total.</p><p>The paraphrase is the only partner that says the same thing. The other three are traps. They look almost the same and mean something else. A model that understands the sentence should score the paraphrase highest. I counted how often a trap beat the paraphrase, across 5 sentences, 3 traps and 2 languages: 30 comparisons per model.</p><h3>Embeddings know the topic, not the fact</h3><ul><li><strong>Vector length:</strong> EmbeddingGemma: 768; Qwen3-Embedding 0.6B: 1,024</li><li><strong>A trap scored above the paraphrase:</strong> EmbeddingGemma: 20 of 30; Qwen3-Embedding 0.6B: 25 of 30</li><li><strong>Swapped roles beat the paraphrase:</strong> EmbeddingGemma: 10 of 10; Qwen3-Embedding 0.6B: 10 of 10</li><li><strong>A different number beat the paraphrase:</strong> EmbeddingGemma: 5 of 10; Qwen3-Embedding 0.6B: 10 of 10</li><li><strong>A negation beat the paraphrase:</strong> EmbeddingGemma: 5 of 10; Qwen3-Embedding 0.6B: 5 of 10</li><li><strong>Unrelated pairs, average similarity, EN / RU:</strong> EmbeddingGemma: 0.19 / 0.18; Qwen3-Embedding 0.6B: 0.25 / 0.13</li></ul><p>Here is the first sentence with EmbeddingGemma in English:</p><ul><li>the paraphrase: 0.890;</li><li>“Anna did not pay Boris”: 0.875;</li><li>“Anna paid Boris 900 dollars”: 0.893;</li><li>“Boris paid Anna”: 0.987.</li></ul><p>The sentence that reverses who paid whom came out almost identical to the original. The correct paraphrase tied with a sentence where the amount is nine times larger: 0.890 against 0.893 is no real difference.</p><p>My reading of why: swapping two names keeps every word and changes only their order, and an embedding is a summary of the whole sentence, not a record of who did what. A changed number is a single word in a sentence of about a dozen. A paraphrase uses different words, and the model has to recognise the meaning through them. Both models do recognise it: they put the paraphrase far above anything unrelated. They just put the near-copies even higher.</p><p>So an embedding is a good measure of what a text is about and a weak measure of what it claims. For search that is usually fine: a question about Anna’s payment should find documents about Anna’s payment. For anything that depends on the exact fact, it is not enough on its own.</p><h3>Two more things the test showed</h3><p><strong>One sentence in two languages is close.</strong> EmbeddingGemma gave an English sentence and its Russian translation an average similarity of 0.86, almost as high as a Russian paraphrase (0.89). Qwen3-Embedding gave 0.75. A multilingual model can find a Russian document for an English question.</p><p><strong>A shorter vector lost very little.</strong> Both models are trained so that the start of the vector carries most of the meaning; EmbeddingGemma’s model card lists 512, 256 and 128 numbers as supported sizes alongside the full 768. I cut the vectors to the first 512, 256 and 128 numbers and repeated the comparison. Not one of the 30 outcomes changed for either model. At 128 numbers EmbeddingGemma’s similarities moved by 0.044 on average. A vector of 128 numbers takes a sixth of the space of 768, which matters when there are millions of documents.</p><p>Speed on the laptop: EmbeddingGemma turned 1,000 short sentences into embeddings in 13.3 seconds, 75 per second, using 685 MB of memory. Qwen3-Embedding took 34.2 seconds, 29 per second, with 2.4 GB. Its three runs ranged from 28 to 39 seconds because the machine was not idle, so take that number as approximate.</p><h3>How I would choose an embedding model</h3><p>Leaderboards rank models by averages over dozens of tasks. That average says little about whether a model can tell your two closest documents apart. On my pairs the faster and smaller model made fewer trap errors than the larger one. Before I picked a model for real work, I would write twenty pairs from my own documents that differ by one fact, run every candidate on them, and count how often the wrong one wins. It takes about an hour, and for my use it told me more than the rank.</p><h3>What this means in production</h3><p>I build and run a system that turns plain-language questions into SQL across more than 500 data marts. A description of that many tables does not fit into a model’s context window, so every question first goes through retrieval: embeddings pick the tables that look relevant, and only those reach the model. Without that step the query cannot run at all.</p><p>In my open benchmark on BIRD, 1,534 questions with narrow schemas that fit entirely in the window, I tested the same step (<a href="https://arxiv.org/abs/2606.29733">arXiv:2606.29733</a>, <a href="https://github.com/beskvladimir-create/nl2sql-onprem-bench">code</a>). The embedding retriever used all-MiniLM-L6-v2 and picked the top six tables by cosine similarity. It found 96.53% of the tables each query needed, against 93.95% for a simple keyword method. That did not buy accuracy. On Qwen2.5-Coder-32B it won 33 questions and lost 39 against giving the model the full schema. The net difference was -0.39 points, indistinguishable from zero. On a smaller model, CodeLlama-7B, embedding linking was 2.80 points worse than the keyword method, and that difference held up after correction for multiple tests.</p><p>The laptop test points the same way. An embedding finds what looks related, and what looks related is not always what the query needs. Recall, the share of needed tables found, says nothing about the queries broken by the one table that was left out. That is the number to watch. I wrote more about this in <a href="https://besk.tech/articles/what-is-rag">What Is RAG?</a></p><h3>What to take from this</h3><ol><li><strong>An embedding measures the topic, not the fact.</strong> Use it to find candidates, then check the fact with something that reads the text, such as a language model or an exact filter.</li><li><strong>Test with near-misses, not only with unrelated text.</strong> Any model separates a court ruling from a cat. The useful test is a pair that differs by one word.</li><li><strong>Judge retrieval by what it breaks.</strong> A high share of found documents can hide the queries ruined by the one it missed.</li><li><strong>Try a shorter vector before buying storage.</strong> On my pairs, 128 numbers out of 768 changed no outcome.</li></ol><h3>What this does not show</h3><p>This is 55 pairs on one laptop, an illustration and not a ranking of models. The result depends on how far a paraphrase moves from the original words: the negation trap won mostly on the leave request and the court ruling, where the paraphrase was rewritten most heavily. I passed the sentences as they are, without the task prefixes both models accept for search, so scores in a real search setup may differ. EmbeddingGemma in Ollama is the first version, not EmbeddingGemma 2. The production system is described from my own experience; its data are closed.</p><h3>Sources</h3><ul><li><a href="https://blog.google/innovation-and-ai/technology/developers-tools/embeddinggemma-2-technical-report/">EmbeddingGemma 2 technical report, Google</a></li><li><a href="https://arxiv.org/abs/2610.37364">EmbeddingGemma 2: Unified and Efficient Multimodal Representations, arXiv:2610.37364</a></li><li><a href="https://github.com/ollama/ollama/blob/main/docs/api.md">Ollama API reference</a></li><li><a href="https://arxiv.org/abs/2606.29733">How far do on-premises open LLMs get on Text-to-SQL? A cross-family size and technique frontier on BIRD, arXiv:2606.29733</a></li><li><a href="https://github.com/beskvladimir-create/nl2sql-onprem-bench">nl2sql-onprem-bench, GitHub</a></li><li><a href="https://besk.tech/articles/what-is-rag">What Is RAG? A 1,534-Question Test Where Retrieval Only Took Things Away, BESK TECH</a></li><li><a href="https://besk.tech/articles/what-is-a-token-in-ai">What Is a Token in AI? I Ran the Same 71 Tasks on Three Models, BESK TECH</a></li></ul><p><em>Vladimir Beskorovainyi, Enterprise AI Architect &amp; CTO, author of the Amazon bestseller “Enterprise AI: The KATA Way”, founder of Besk Tech (besk.tech)</em></p><p><em>Originally published at </em><a href="https://besk.tech/articles/what-is-an-embedding"><em>https://besk.tech</em></a><em> on November 28, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b6e239c9345" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why “We Anonymise Before Sending to AI” Is Weaker Than It Sounds]]></title>
            <link>https://medium.com/@besk.tech/why-we-anonymise-before-sending-to-ai-is-weaker-than-it-sounds-68efe9d6fb3e?source=rss-f96be18d3d1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/68efe9d6fb3e</guid>
            <category><![CDATA[data-privacy]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Vladimir Beskorovainyi]]></dc:creator>
            <pubDate>Fri, 27 Nov 2026 14:28:02 GMT</pubDate>
            <atom:updated>2026-11-27T14:28:02.974Z</atom:updated>
            <content:encoded><![CDATA[<h4>Five open-source scrubbers, 2,000 synthetic work documents, and a test set locked before the first run. Even counting only the data types it claims to handle, the best tool still left personal data in about one document in three.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BX5ZTtAzQX8eJwK9CrqdQA.jpeg" /></figure><p>Ask a company how it uses ChatGPT or Claude on internal documents, and the careful ones give the same answer: we anonymise first. A tool removes names, passport numbers and account details, and only the clean text leaves the building.</p><p>I wanted to know how often that is actually true. So I built an open benchmark on documents that look like real work: contracts, certificates, letters, HR files and hospital discharge summaries, 1,000 in Russian and 1,000 in UK English. Then I ran five open-source scrubbers on them: pii-guard, GLiNER Guard Omni, Microsoft Presidio, OpenAI privacy-filter and Prompt Anonymizer.</p><p>The answer was uncomfortable.</p><h3>One document in three</h3><p>Counting only the types of personal data each tool claims to handle, the best result on Russian documents was pii-guard, which still left personal data in 31.5% of them. The best on UK documents was OpenAI privacy-filter, at 33.0%. On these synthetic documents, even the strongest open tool leaves something behind in about one document in three. This supported-types count is descriptive; it was not one of the pre-registered measures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NXktQ49v8JltznxsZa9QYw.jpeg" /></figure><p>What leaked was not exotic. A passport number written with dots. An IBAN or a National Insurance number split by dots. A card number spelled out in words. Names with initials in the body of a contract. Real documents can contain these, because people write numbers the way they write them, not the way a regular expression expects.</p><p>The cause differs by tool, and the honest reading matters. For pii-guard, almost every leak in the types it supports came from numbers in hard formats: in Russian documents where every number was written the usual way, it leaked in 1 of 603. My generator puts hard formats into about 40% of documents, so the lesson for pii-guard is narrow: if your documents spell numbers out or write them with dots, it will miss them. OpenAI privacy-filter, GLiNER Guard Omni and Presidio still leaked in three to four UK documents in ten that had only ordinary formats, so for them the result does not come down to formats.</p><h3>Why most evaluations would not have caught this</h3><p>The second lesson is about how AI tools get evaluated, and it applies far beyond privacy.</p><p>I also build a competing engine, pii-roundtrip, and a benchmark run by the author of a competing tool deserves suspicion. So I treated the final evaluation the way a clinical trial treats its primary outcome. The test set was generated in advance. Its files, SHA-256 hashes, decision thresholds, run plan and a stopping rule were published before the first run. Every tool ran on it exactly once. A threshold counted as passed only if the whole 95% confidence interval was on the right side of it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rk6nc5xci1sC9Iq3X1rMFA.jpeg" /></figure><p>This is not bureaucracy. It is the only thing that stopped me from fooling myself. On that locked set, my own engine left an original value in 0.3% of Russian and 0.2% of UK documents, and it still missed one of my own thresholds: name placeholders in Russian answers were restored correctly in only 94.6% of cases for the weaker of the two models, against a 99% target, mostly because the name came back in the wrong grammatical form. Because the stopping rule was public, the verdict stayed in the paper as “not passed”. The fix shipped in later releases; on the same, already-seen answers it reaches 99.3%, for reference only, and the lower end of its interval is still below 99%. Without a locked set, it would have been easy to keep tuning until the number looked right.</p><p>If a vendor shows you a single accuracy number, ask whether the test set was fixed before they looked at the results.</p><h3>Five questions to ask before you trust a scrubber</h3><ol><li><strong>Which data types does it actually detect?</strong> Two of the five tools (pii-guard and OpenAI privacy-filter) do not look for organisation names at all. A fair benchmark will not count that against the tool, but your documents still contain it.</li><li><strong>Was it tested on documents like yours?</strong> Short chat messages and twenty-page contracts are different problems. Ask for results on long work documents.</li><li><strong>How does it handle numbers written by people?</strong> Dots, spaces, typos, words. Ask for examples.</li><li><strong>Can the answer be restored?</strong> Deleting data makes the model’s answer useless. Reversible placeholders keep it usable, but only if restoration is reliable.</li><li><strong>Was the test set locked in advance, and can you rerun it?</strong> If the data and predictions are not published, you are trusting a number, not a measurement.</li></ol><h3>What I would do on Monday</h3><p>Take ten real documents of the kind your team sends to AI tools. Run your current scrubber. Search the output for every original value. It takes an hour, and it tells you more than any vendor slide.</p><p>The benchmark, the data, every tool’s predictions and the raw model answers are open, so you can rerun it on your own tool. pii-roundtrip, the engine I built on top of the two tools that made the fewest mistakes on the external datasets (pii-guard and GLiNER Guard Omni), is free and open source under Apache 2.0, with a desktop app for Mac that works offline and a Windows beta.</p><p>All evaluation data in this study are synthetic, and the engine was developed on documents from the same generator, which the other tools were not. The full method and its limits are in the preprint.</p><h3>Sources</h3><ul><li><a href="https://arxiv.org/abs/2610.34012">Reversible Pseudonymisation of Documents Sent to External LLMs, arXiv:2610.34012</a></li><li><a href="https://github.com/beskvladimir-create/pii-roundtrip">pii-roundtrip: code, data and predictions, GitHub</a></li><li><a href="https://pii-roundtrip.besk.tech/">pii-roundtrip desktop app</a></li></ul><p><em>Vladimir Beskorovainyi, Enterprise AI Architect &amp; CTO, author of the Amazon bestseller “Enterprise AI: The KATA Way”, founder of Besk Tech (besk.tech)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68efe9d6fb3e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is Inference in AI? My Laptop Spent 64 Seconds Reading the Prompt and 32 Writing the Answer]]></title>
            <link>https://medium.com/@besk.tech/what-is-inference-in-ai-my-laptop-spent-64-seconds-reading-the-prompt-and-32-writing-the-answer-b81e50da5954?source=rss-f96be18d3d1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b81e50da5954</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Vladimir Beskorovainyi]]></dc:creator>
            <pubDate>Thu, 26 Nov 2026 00:00:19 GMT</pubDate>
            <atom:updated>2026-11-26T10:36:28.951Z</atom:updated>
            <content:encoded><![CDATA[<p>Inference is a trained model doing its job: reading your input and producing an output, on every request. I measured both halves on my laptop and lived with their limits on a production GPU. Reading a long prompt took twice as long as writing the answer, and on my own server the bill came in memory, not tokens.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oMw-4LsdXJNz7sgq" /></figure><p>Inference is a trained model doing its job: it reads your input and produces an output, every time you send a request. I gave the same task to three models on my laptop. The largest spent 64 seconds reading the prompt, 3,500 tokens of table descriptions with one question at the end, and 32 seconds writing the answer. Given the question alone, the same model started answering in a second and a half. Through an API you pay for inference per token. On your own server you pay in GPU memory and GPU time.</p><h3>What inference is</h3><p>A model goes through two stages. First training: its internal numbers, the weights, are fitted on a large set of examples. That happens once and costs a lot. Then inference: the weights stay fixed, the model takes new input and produces a result. A chatbot’s reply, an object found in a photo, an SQL query written from a plain-language question. All of it is inference.</p><p>Training happens once. Inference happens on every request from every user for as long as the model is in service, so its cost repeats with every request.</p><p>The word misleads. In everyday English an inference is a reasoned conclusion. In AI it only means running the model. Calling something inference does not mean the model reasoned, or that its answer is right.</p><h3>Two phases: reading and writing</h3><p>A language model works in tokens, short pieces of text; <a href="https://besk.tech/articles/what-is-a-token-in-ai">I counted where they go in an earlier test</a>. Every request goes through two phases.</p><ol><li><strong>Reading the prompt, called prefill.</strong> The model processes your whole text in one pass, all tokens together. While this runs, you see nothing. The wait until the first word appears is called time to first token.</li><li><strong>Writing the answer, called decode.</strong> The model produces one token at a time. Each one depends on the ones before it, so they cannot be computed at once.</li></ol><p>I measured both on my MacBook Air: Apple M4, 24 GB of memory, Ollama 0.40.4, three Qwen3 models with the same 4-bit compression (Q4_K_M). There were two prompts. The short one was a single question: write an SQL query for the ten customers with the highest order total in 2025. The long one put a description of 16 made-up tables in front of the same question, about 3,500 tokens. Every answer was capped at 200 tokens. Each case ran three times; the table shows the median of the timings Ollama reports for each request.</p><ul><li><strong>Qwen3 4B:</strong> memory: 3.8 GB; short: first token: 0.15 s; short: writing, tokens/s: 33; short: full answer: 6.3 s; long: reading the prompt: 16.8 s; long: writing, tokens/s: 22; long: full answer: 26 s</li><li><strong>Qwen3 8B:</strong> memory: 6.7 GB; short: first token: 0.81 s; short: writing, tokens/s: 14; short: full answer: 15.3 s; long: reading the prompt: 35.4 s; long: writing, tokens/s: 12; long: full answer: 52 s</li><li><strong>Qwen3 14B:</strong> memory: 10 GB; short: first token: 1.41 s; short: writing, tokens/s: 7; short: full answer: 31.9 s; long: reading the prompt: 64.5 s; long: writing, tokens/s: 6; long: full answer: 96 s</li></ul><p>Three things stand out.</p><p>Reading took longer than writing. On the 14B model two thirds of the time went to reading the table descriptions, and for all of that minute the screen stayed empty. The 200-token answer took half as long.</p><p>Size cost time in proportion, memory less so. The 14B model has 3.7 times the weights of the 4B. Its full answer to the long prompt took 3.7 times as long, and it used 2.6 times the memory.</p><p>Writing slows down when the prompt is long. On the 4B model it fell from 33 to 22 tokens per second, because every new token looks back at everything already read.</p><p>The test also caught two mistakes of my own, and I threw both runs away. In the first, Ollama served repeated prompts from its cache, and reading came out at up to 95,000 tokens per second. In the second, it quietly cut the long prompt to 4,096 tokens and dropped the beginning. A speed number is only as good as the check behind it.</p><h3>Where the memory goes: my production case</h3><p>In production I run a model on my own server. The data must not leave a closed network, so an API was never an option. The system turns plain-language questions into SQL.</p><p>I picked the model for one A100 GPU with 80 GB of memory. On my 34 tests, Gemma3-27B stopped at about 70% after four rounds of prompt changes. Qwen3-32B scored 79% at once and 84% after the prompts were tuned. That is an internal measurement on closed data; nobody outside can check it.</p><p>Inference memory goes to two things. The first is the weights, and their size is fixed. The second is what the model keeps about every token it has read so it does not compute it again, called the KV cache. For Qwen3-32B in 16-bit that is a quarter of a megabyte per token, by its published configuration. It grows with every token of the prompt and with every request running at the same time.</p><p>At first I ran the model in full 16-bit precision. The weights alone took about 65 GB: 32.8 billion of them at two bytes each. That left room for about 7,500 tokens of context per request, with four requests at a time. Four such requests hold more than 7 GB of cache.</p><p>Memory was the first wall. The step that plans the SQL needs the database schema with its table descriptions, and the schema did not fit. Any request longer than 7,500 tokens failed. A second problem came later: the container crashed after five to seven days of running.</p><p>I tried FP8, an 8-bit number format that would halve the weights. The A100 has no native support for it, and there was no gain. For a while I stayed on 16-bit and restarted the service ahead of time. For steady operation I then moved to AWQ, which compresses the weights to 4 bits. The model shrank to about 20 GB and the context grew to 32,000 tokens. Answers became slower, because the A100 spends time unpacking the weights.</p><p>Nobody charged me per token; the server is mine. Every one of these decisions was about GPU memory. Compression traded speed for room to read.</p><h3>What inference costs on your own server</h3><p>On your own hardware the meter is GPU time. My open benchmark on BIRD ran 1,534 questions with vLLM in 16-bit on self-hosted GPUs (<a href="https://arxiv.org/abs/2606.29733">arXiv:2606.29733</a>, <a href="https://github.com/beskvladimir-create/nl2sql-onprem-bench">code</a>). In my Conf42 AI Agents 2026 talk I priced its wall-clock times at $1.80 per GPU hour.</p><p>The benchmark shows how an inference technique can eat a budget. Self-consistency, where the model answers five times and the most common answer wins, added at most 0.13 percentage points across two runs, which is not significant. It took five times the tokens. The model time per question, measured at the 95th percentile with 64 requests in flight, went from 10.6 to 50.0 seconds. Self-correction, one extra pass of the same model over its own answer, added 1.2 to 4.4 points depending on the model. At $1.80 per GPU hour that extra pass came to $0.12 to $0.22 per 1,000 queries.</p><p>So every extra call to the model has a price in GPU seconds, whether or not a bill ever mentions tokens.</p><h3>Why chip money is moving to inference</h3><p>In mid-November AMD completed its purchase of Taalas, a company that makes chips only for inference. According to OC3D’s coverage, Taalas etches a specific model’s weights into the chip. Such a chip does not train or change a model. It only runs it.</p><p>The deal points the same way as my laptop and my server. A model is trained once and run millions of times, so the race is for hardware that runs it faster and cheaper.</p><h3>What to take from this</h3><ol><li><strong>Count the length of the prompt, not only the answer.</strong> A long schema or document in the prompt costs time before the first word and memory for as long as the request runs.</li><li><strong>Pick the model for the memory you have.</strong> Weights, plus context, plus concurrent requests. In my case 80 GB decided more than any leaderboard.</li><li><strong>Compression is a trade.</strong> AWQ gave me four times the context and slower answers.</li><li><strong>Price every extra model call.</strong> On your own server it is GPU time, even with no token bill.</li></ol><h3>What this does not show</h3><p>The laptop test is one computer and one program. It is not the speed of a server handling a queue of requests, and it does not judge the quality of the answers. The script asked every model not to show its reasoning; Qwen3 4B ignored that and wrote its reasoning instead of the query. The timings per token still hold. The production numbers are internal, on closed data. The BIRD benchmark is public and can be rerun from the links above.</p><h3>Sources</h3><ul><li><a href="https://www.ibm.com/think/topics/ai-inference">What is AI inference?, IBM</a></li><li><a href="https://huggingface.co/Qwen/Qwen3-32B/blob/main/config.json">Qwen3</a>-<a href="https://huggingface.co/Qwen/Qwen3-32B/blob/main/config.json">32B model configuration, Hugging Face</a></li><li><a href="https://github.com/ollama/ollama/blob/main/docs/api.md">Ollama API reference</a></li><li><a href="https://www.engineering.com/amd-completes-acquisition-of-ai-inference-chip-pioneer-taalas/">AMD completes acquisition of AI inference chip pioneer Taalas, Engineering.com</a></li><li><a href="https://overclock3d.net/news/misc/amd-strengthens-its-ai-stack-with-taalas-acquisition/">AMD strengthens its AI stack with Taalas acquisition, OC3D</a></li><li><a href="https://arxiv.org/abs/2606.29733">How far do on-premises open LLMs get on Text-to-SQL? A cross-family size and technique frontier on BIRD, arXiv:2606.29733</a></li><li><a href="https://github.com/beskvladimir-create/nl2sql-onprem-bench">nl2sql-onprem-bench, GitHub</a></li><li><a href="https://besk.tech/articles/what-is-a-token-in-ai">What Is a Token in AI? I Ran the Same 71 Tasks on Three Models, BESK TECH</a></li></ul><p><em>Vladimir Beskorovainyi, Enterprise AI Architect &amp; CTO, author of the Amazon bestseller “Enterprise AI: The KATA Way”, founder of Besk Tech (besk.tech)</em></p><p><em>Originally published at </em><a href="https://besk.tech/articles/what-is-inference-in-ai"><em>https://besk.tech</em></a><em> on November 26, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b81e50da5954" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Claude’s Install as App Needs You Online. I Built an Open Version That Doesn’t]]></title>
            <link>https://medium.com/@besk.tech/claudes-install-as-app-needs-you-online-i-built-an-open-version-that-doesn-t-2a34970084fc?source=rss-f96be18d3d1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a34970084fc</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[desktop-app]]></category>
            <dc:creator><![CDATA[Vladimir Beskorovainyi]]></dc:creator>
            <pubDate>Wed, 25 Nov 2026 00:00:45 GMT</pubDate>
            <atom:updated>2026-11-26T10:35:43.443Z</atom:updated>
            <content:encoded><![CDATA[<p>Claude’s new Install as app opens only online and signed in, on Mac or Windows. deskhatch installs any HTML as a desktop app offline, on macOS and Linux, from one 5.6 MB macOS runtime that Apple notarized once per release.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_hhps7mShSbyVAh6" /></figure><p>On November 24 Anthropic <a href="https://claude.com/resources/articles/install-as-app">added Install as app</a> to Claude Desktop. A Claude artifact gets its own icon and window and opens like any other app, but only online, signed in to Claude, on a Mac or a Windows PC. The next day I published <a href="https://github.com/beskvladimir-create/deskhatch">deskhatch</a>, an open version for HTML from anywhere. It works offline, runs on macOS and Linux, and calls the model you choose. Every app runs on one runtime: 5.6 MB on macOS, signed and notarized once per release. Notarization is Apple’s automated check for malware and signing problems, not a security review of deskhatch.</p><h3>What Anthropic shipped</h3><p>Anthropic presents the feature for knowledge workers and developers. Its <a href="https://support.claude.com/en/articles/18516354-install-an-artifact-as-an-app">help page</a> suggests requests like a Pomodoro timer in the menu bar or a reminder to stretch every hour. An installed app can stay at browser level, ask for notifications, shortcuts and a menu bar item, or get Full access, which lets it run programs and read, change or delete files without asking each time.</p><p>The help page also lists the limits, as of November 25, 2026:</p><ul><li>an app opens only online and signed in to Claude Desktop;</li><li>Mac and Windows only, with no Linux, web or mobile;</li><li>building an app and every request it makes to Claude count toward the plan’s usage limits;</li><li>only Claude artifacts can be installed, and not every one qualifies: Docs, Slides and Sheets cannot be;</li><li>Anthropic does not review apps before install.</li></ul><p>It is rolling out as a beta on the Free, Pro, Max, Ultra, Team and Enterprise plans. On Enterprise an owner has to turn it on first.</p><p>For someone who works in Claude all day, none of this is a problem. It is a problem for HTML that came from somewhere else, for a laptop without a network, and for Linux.</p><h3>What I built</h3><p>deskhatch does the same with HTML from anywhere: Claude, ChatGPT, Gemini, an editor, an old page.</p><pre>npx deskhatch install page.html</pre><p>The page gets an icon in the dock or the app menu, its own window, and a hatch object in JavaScript: model calls, a store per app, notifications, a tray icon, global hotkeys and access to folders the user picked. The model is the one you configure: Ollama, LM Studio or llama.cpp on your own machine, or your own key for any OpenAI-compatible API. The key sits in the system keychain, never in the app.</p><p>An app is a folder of three files: app.json, index.html and icon.png. This is the manifest of the Pomodoro example from the repository:</p><pre>{<br>  &quot;schema&quot;: 1,<br>  &quot;id&quot;: &quot;pomodoro&quot;,<br>  &quot;name&quot;: &quot;Pomodoro&quot;,<br>  &quot;permissions&quot;: &quot;desktop&quot;,<br>  &quot;window&quot;: { &quot;width&quot;: 420, &quot;height&quot;: 560 },<br>  &quot;tray&quot;: { &quot;enabled&quot;: true, &quot;tooltip&quot;: &quot;Pomodoro&quot;, &quot;hideOnClose&quot;: true },<br>  &quot;hotkeys&quot;: { &quot;toggle&quot;: &quot;CmdOrCtrl+Shift+P&quot;, &quot;startStop&quot;: &quot;CmdOrCtrl+Shift+O&quot; }<br>}</pre><p>And this is all the page needs to keep a log, notify and answer a hotkey:</p><pre>await hatch.store.set(&#39;log&#39;, log);<br>const saved = await hatch.store.get(&#39;log&#39;);<br>await hatch.notify(&#39;Focus session done&#39;, &#39;Take a break.&#39;);<br>hatch.on(&#39;hotkey&#39;, name =&gt; { if (name === &#39;startStop&#39;) running ? stop() : start(); });</pre><p>npx deskhatch export my-app packs the folder into one .hatch file. The other person installs it with one command or drops it on the runtime. There is no store and no account.</p><p>I measured what an install leaves on a Mac. The installed package of the Pomodoro example is 20 KB. Its launcher in Applications is 148 KB. With the runtime already downloaded, install took 0.47 seconds.</p><h3>Why one signed runtime</h3><p>I have built and signed many desktop apps one at a time. To hand an app to someone else on a Mac without a Gatekeeper warning, it has to be signed with a Developer ID and notarized by Apple. That needs a paid Apple Developer Program membership and a signing and notarization round for every build.</p><p>deskhatch moves that work to one place. The runtime is signed and notarized once per release, and spctl reports it as Notarized Developer ID. An app is not a program. It is a folder of files that the runtime opens, so it needs no signature of its own, and the person who installs it needs no Apple account.</p><p>On macOS the option --standalone gives an app its own copy of the runtime, about the same size, so the system shows the app&#39;s own name in the menu bar and the app switcher. That copy is made on the user&#39;s machine and signed ad hoc there. It never passes through a browser download, so it carries no quarantine flag. Gatekeeper does not check that copy, and the runtime&#39;s notarization does not cover it.</p><h3>Permissions</h3><ul><li><strong>web, the default:</strong> requests from the page: none; notifications, tray, hotkeys: no; files: none</li><li><strong>desktop:</strong> requests from the page: only listed hosts; notifications, tray, hotkeys: yes; files: folders the user picked</li><li><strong>full:</strong> requests from the page: only listed hosts; notifications, tray, hotkeys: yes; files: the home folder</li></ul><p>In every tier the model is reached through the runtime. The runtime is built to enforce the tier in Rust and through the page’s content security policy, so the HTML should not be able to raise its own level. A web app is not allowed to make network requests, load remote scripts or read files. Every page is blocked from navigating away from its own package or opening a new window. ~/.ssh, ~/.gnupg, ~/.aws and deskhatch&#39;s own folder are blocked in every tier.</p><p>Two of those rules came from checking this post against the code. Version 0.2.2 let a page leave by setting location.href, which the content security policy does not cover, and let full read outside the home folder. Both are fixed in 0.2.3, and the repository has a test that fails on 0.2.2 and passes now. If you installed 0.2.2, update. Nobody has audited deskhatch independently, so treat these rules as design goals, not a certification.</p><p>There is no API to start a program, in any tier. That does not make full harmless: it can write any file in your home folder, shell startup files included, and code there runs at your next login. Grant full only to apps you wrote or trust. Claude&#39;s Full access can run programs directly.</p><h3>Side by side</h3><ul><li><strong>Opens offline:</strong> Claude Install as app: no; deskhatch: yes</li><li><strong>Account:</strong> Claude Install as app: Claude, signed in; deskhatch: none</li><li><strong>Model:</strong> Claude Install as app: Claude, counted against the plan; deskhatch: any: local, or your own key</li><li><strong>Platforms:</strong> Claude Install as app: macOS, Windows; deskhatch: macOS, Linux</li><li><strong>Source of the HTML:</strong> Claude Install as app: Claude artifacts; deskhatch: any file</li><li><strong>Starting programs:</strong> Claude Install as app: with Full access; deskhatch: no API for it</li></ul><p>Claude’s version has things mine does not. Its apps use the connectors you have set up in Claude, they update when you edit the artifact, and they run on Windows. For an app that has to start other programs, deskhatch is the wrong tool.</p><h3>Try it</h3><pre>npx deskhatch gallery<br>npx deskhatch install examples/pomodoro<br>npx deskhatch new &quot;a pomodoro timer with a tray icon and a daily log&quot;</pre><p>new sends the request and the hatch API reference to your model, takes the HTML out of the reply and installs it. I have not measured how often a local model gets it right on the first try. The npx wrapper needs Node 18 or newer. On Linux the runtime comes as an AppImage or a .deb; neither is signed yet.</p><h3>What is open, Windows first</h3><p>Windows is where I need help. Tauri, which deskhatch is built on, targets Windows, but the release has no Windows build yet. What is missing is listed in <a href="https://github.com/beskvladimir-create/deskhatch/issues/1">issue #1</a>:</p><ul><li>a launcher in runtime/src/packages.rs: a Start menu shortcut that starts the runtime with --app &lt;id&gt;, with the icon converted from icon.png to .ico;</li><li>an NSIS or MSI bundle in the release workflow;</li><li>opening .hatch files with the runtime;</li><li>the win32 asset name and binary path in cli/index.js;</li><li>a test of the tray and the global hotkeys on Windows.</li></ul><p>Code signing for SmartScreen can wait. A pull request for any one of these items is welcome, and I review and merge them myself. A thumbs-up on #1 decides the order of work.</p><p>Three more items are open: streaming replies from hatch.llm.chat (<a href="https://github.com/beskvladimir-create/deskhatch/issues/3">#3</a>), importing a Claude artifact from its share link (<a href="https://github.com/beskvladimir-create/deskhatch/issues/4">#4</a>), and the app name on macOS, where an app on the shared runtime is called Deskhatch in the menu bar unless it is installed with --standalone (<a href="https://github.com/beskvladimir-create/deskhatch/issues/2">#2</a>).</p><p>deskhatch is an independent open source project. It is not affiliated with, endorsed by or sponsored by Anthropic. Claude is a trademark of Anthropic.</p><p>If something breaks on your machine, open an issue and tell me what you ran. If you build something with it, the repository has a showcase file that takes pull requests, and a star tells me the idea is worth continuing. deskhatch is MIT-licensed.</p><h3>Sources</h3><ul><li><a href="https://claude.com/resources/articles/install-as-app">Install as app, Claude blog</a></li><li><a href="https://support.claude.com/en/articles/18516354-install-an-artifact-as-an-app">Install an artifact as an app, Claude Help Center</a></li><li><a href="https://github.com/beskvladimir-create/deskhatch">deskhatch, GitHub</a></li><li><a href="https://developer.apple.com/documentation/security/notarizing-macos-software-before-distribution">Notarizing macOS software before distribution, Apple Developer</a></li></ul><p><em>Vladimir Beskorovainyi, Enterprise AI Architect &amp; CTO, author of the Amazon bestseller “Enterprise AI: The KATA Way”, founder of Besk Tech (besk.tech)</em></p><p><em>Originally published at </em><a href="https://besk.tech/articles/install-as-app-open-source"><em>https://besk.tech</em></a><em> on November 25, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a34970084fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is a Token in AI? I Ran the Same 71 Tasks on Three Models]]></title>
            <link>https://medium.com/@besk.tech/what-is-a-token-in-ai-i-ran-the-same-71-tasks-on-three-models-26a232af1c85?source=rss-f96be18d3d1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/26a232af1c85</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Vladimir Beskorovainyi]]></dc:creator>
            <pubDate>Wed, 25 Nov 2026 00:00:09 GMT</pubDate>
            <atom:updated>2026-11-25T06:21:41.402Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://besk.tech/articles/topic/llm">Language Models</a> · Explainer</p><p>A token is the unit a language model reads, writes and bills in. I gave the same 71 tasks to three Claude models. The mid-size one got 57 of 63 right for about half the price of the largest, which got 58. In this test the model choice moved the bill far more than trimming the context did.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PWZO0YJRsdrcDLKe" /></figure><p>A token is the unit a language model reads, writes and bills in. I gave the same 71 tasks to three Claude models and counted every token. The largest model got 58 of 63 checkable tasks right. The mid-size one got 57 at about half the cost. The smallest got 48. That choice moved the cost far more than disconnecting eight unused servers did, and the reason is where the tokens go.</p><h3>What a token is</h3><p>A model does not see letters or words. Before it reads your text, a tokenizer cuts it into tokens. Common words become one token, rarer words split into several pieces, and punctuation often becomes a token of its own. A common rule of thumb for English is about three quarters of a word per token. It is only a rule of thumb: the split depends on the tokenizer, and Anthropic notes that its newer models produce about 30% more tokens for the same text than earlier ones. The three models in this test use the same newer tokenizer, so their counts compare directly.</p><p>The model then writes its answer one token at a time, each one chosen from what came before.</p><p>Using a model is counted in these units. The context window, how much the model can hold at once, is a number of tokens. API prices are per million tokens, with input and output priced separately, and rate limits depend on tokens used.</p><h3>Where the tokens actually go</h3><p>People picture a token bill as the question plus the answer. In this test it was almost neither.</p><p>Each of the 71 tasks was a single short request, and the session stopped at the model’s first real tool call, so the answers were tiny by design. On every model, output was under 0.4% of all tokens. On the largest model the 71 tasks used about 9.6 million tokens, and 19,338 of them were output.</p><p>The rest was the context a session starts with: the system prompt, built-in tool definitions, skills, project instructions, and the instructions and tool list of the connected servers. Full tool descriptions load only when the model searches for them. Each model call sends that whole context again, but repeats are read from cache at a twentieth of the input price on the two larger models. What cost money was writing it into the cache in the first place, once per fresh session, about 47,000 to 50,000 tokens per task. On the largest model that was $26.69 of the $28.32. Output was $0.39.</p><p>I measured that starting context before. With every server connected, an empty Claude Code session started at 47.8 thousand tokens. After I disconnected eight servers I had not used in 30 days, it started at 34.4 thousand, about 28% less. <a href="https://besk.tech/articles/mcp-tools">That article</a> covers where those tokens came from.</p><h3>The test</h3><p>The 71 tasks come from my <a href="https://besk.tech/articles/mcp-tool-search">tool search measurement</a>: requests like finding a file in my notes, listing deployments or checking analytics, with eleven tool servers connected. For 63 of them the right tool was written down before the run. Each task ran in a fresh Claude Code session, and a hook recorded and blocked the first tool the model chose, so nothing was executed.</p><p>I ran the same set on three models. The largest ran on November 23, the other two on November 25, with the same servers connected; Claude Code’s tool list was 31 tools longer on the 25th, for a reason I have not traced. The costs are Claude Code’s own estimates at list price, not an invoice, and they reconcile to the cent with Anthropic’s published prices.</p><ul><li><strong>Claude Opus 5.5:</strong> right of 63: 58; cost: $28.32; cost per right answer: $0.49</li><li><strong>Claude Sonnet 5.5:</strong> right of 63: 57; cost: $14.46; cost per right answer: $0.25</li><li><strong>Claude Haiku 5.5:</strong> right of 63: 48; cost: $0.78; cost per right answer: $0.016</li></ul><p>The three models read about the same amount: 9.6 million, 7.8 million and 9.3 million tokens. What differs is the price of each token.</p><p>I ran each model once. In an earlier pair of identical runs on one model, the score differed by two tasks, so one task between the two larger models is not a result. Ten tasks is large next to that.</p><h3>What the smallest model got wrong</h3><p>Ten fewer right answers sounds like the small model is simply worse. The errors are more specific.</p><p>Twelve of its fifteen misses were the same move: it reached for the command line instead of the connected tool. Nine of them were GitHub tasks, where it chose the shell over the GitHub server. By the rules of the test that counts as wrong, because the right tool was written down in advance. Some of those could still have finished the job through the gh command line tool.</p><p>So the gap is not spread evenly. On the 16 GitHub tasks the small model missed 9. On the other 47 it missed 6. Within the GitHub tasks the shell won once for the largest model, three times for the mid-size one and nine times for the small one.</p><p>Three tasks were missed by all three models. A bigger model did not fix them.</p><h3>Why the model choice is the bigger lever</h3><p>Disconnecting eight servers cut the starting context by about 28%. Moving the same tasks from the largest model to the mid-size one cut the bill by 49% for one right answer fewer. Moving to the small one cut it by about 36 times.</p><p>The reason is arithmetic. A smaller context saves on part of the tokens. A cheaper model lowers the price of every token the session writes, reads and produces. Anthropic’s own pricing page gives the same advice in short form: Haiku for simple tasks, Sonnet for most workloads, Opus for the most complex reasoning.</p><p>My own rule is the short version: choosing the right model for the task is the basis of saving tokens.</p><h3>What this test suggests doing</h3><ol><li><strong>Write down what right looks like before you run anything.</strong> Here that was the expected tool for each of 63 tasks.</li><li><strong>Run the same tasks on more than one model.</strong> Compare right answers and cost per right answer, not total cost alone.</li><li><strong>Read the errors, not only the score.</strong> The small model’s misses clustered in one kind of task, which tells you which tasks it can take.</li><li><strong>Trim the context too.</strong> It lowered the starting cost of every session, on every model.</li></ol><p>One set of 71 short tasks, one kind of work, the first tool choice only. Long sessions produce far more output, and output costs five times the input price, so the split between context and answer will look different there. The price of each token still depends on the model.</p><h3>Sources</h3><ul><li><a href="https://platform.claude.com/docs/en/about-claude/pricing">Claude API pricing, Anthropic</a></li><li><a href="https://code.claude.com/docs/en/model-config">Claude Code, model configuration</a></li><li><a href="https://besk.tech/articles/mcp-tools">MCP Tools: I Have 738 Connected and Call 39 in a Month, BESK TECH</a></li><li><a href="https://besk.tech/articles/mcp-tool-search">MCP Tool Search: Does the Model Pick the Right Tool Out of 738?, BESK TECH</a></li></ul><p><em>Vladimir Beskorovainyi, Enterprise AI Architect &amp; CTO, author of the Amazon bestseller “Enterprise AI: The KATA Way”, founder of Besk Tech (besk.tech)</em></p><p><em>Originally published at </em><a href="https://besk.tech/articles/what-is-a-token-in-ai"><em>https://besk.tech</em></a><em> on November 25, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26a232af1c85" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>