<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>Dukehoff Blog</title>
  <subtitle>Large Java systems, migrations, developer tooling and coding agents.</subtitle>
  <link href="https://dukehoff.com/blog/feed.xml" rel="self" />
  <link href="https://dukehoff.com/" />
  <updated>2026-11-12T00:00:00Z</updated>
  <id>https://dukehoff.com/</id>
  <author>
    <name>Anton Epple</name>
  </author>
  <entry>
    <title>dukehoff-decide 0.3.0: two classifiers decide more than one</title>
    <link href="https://dukehoff.com/en/blog/dukehoff-decide-0-3-0/" />
    <updated>2026-11-12T00:00:00Z</updated>
    <id>https://dukehoff.com/en/blog/dukehoff-decide-0-3-0/</id>
    <category term="release" label="release" />
    <content type="html">&lt;p&gt;dukehoff-decide turns a multiple-choice question in a Java application into a type, returns calibrated
probabilities and hands uncertain cases to a person (&lt;a href=&quot;https://dukehoff.com/en/blog/dukehoff-decide/&quot;&gt;the introduction&lt;/a&gt;). It
started with a small language model; &lt;a href=&quot;https://dukehoff.com/en/blog/dukehoff-decide-0-2-0/&quot;&gt;0.2.0&lt;/a&gt; added a classifier you train on
your own labelled cases, which decides in under a millisecond.&lt;/p&gt;
&lt;p&gt;The gate is what makes this useful: above a confidence threshold the application acts on its own, below it a
person decides. So the number that matters is how many cases end up above the threshold while the decisions there
stay right. Version 0.3.0 raises that number by combining backends.&lt;/p&gt;
&lt;h2&gt;A second classifier that reads meaning&lt;/h2&gt;
&lt;p&gt;The new module &lt;code&gt;dukehoff-decide-embedding&lt;/code&gt; contains &lt;code&gt;EmbeddingClassifier&lt;/code&gt;. A frozen embedding model (bge-m3, for
example) turns each text into a vector in which texts with similar meaning lie close together, even when they share
no words, and a logistic regression is trained on those vectors. It needs an embedding server such as llama.cpp
and takes 20 to 90 ms per decision. On long texts written by people, like consumer complaints, it is the most
accurate backend we have measured.&lt;/p&gt;
&lt;pre class=&quot;language-java&quot;&gt;&lt;code class=&quot;language-java&quot;&gt;&lt;span class=&quot;token class-name&quot;&gt;Embedder&lt;/span&gt; embedder &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;OpenAiEmbedder&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;builder&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;            &lt;span class=&quot;token comment&quot;&gt;// any OpenAI-compatible /v1/embeddings endpoint&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;baseUrl&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;http://localhost:8081/v1&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;bge-m3&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;modelId&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;bge-m3-q8_0&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;build&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token class-name&quot;&gt;EmbeddingClassifier&lt;/span&gt; model &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;EmbeddingClassifier&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;train&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;embedder&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Triage&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; labeled&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;The cascade&lt;/h2&gt;
&lt;p&gt;Word counts and embeddings are often unsure about different cases. That is the whole idea of the cascade: the cheap
classifier decides what it is sure about, and the next one only sees the rest.&lt;/p&gt;
&lt;pre class=&quot;language-java&quot;&gt;&lt;code class=&quot;language-java&quot;&gt;&lt;span class=&quot;token class-name&quot;&gt;Cascade&lt;/span&gt;&lt;span class=&quot;token generics&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Triage&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt; triage &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Cascade&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
        linearTask&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;requireConfidence&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0.9&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;       &lt;span class=&quot;token comment&quot;&gt;// each task calibrated on its own&lt;/span&gt;
        embeddingTask&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;requireConfidence&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0.9&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token class-name&quot;&gt;Outcome&lt;/span&gt;&lt;span class=&quot;token generics&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Triage&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt; outcome &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; triage&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;decide&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;state&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token class-name&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;token generics&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Outcome&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Triage&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt; all &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; triage&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;decideAll&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;inbox&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;   &lt;span class=&quot;token comment&quot;&gt;// each stage gets the open cases in one batch&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Each stage is calibrated and gated on its own, so the threshold means the same thing at every stage. A case
neither stage is sure about comes back as &lt;code&gt;Uncertain&lt;/code&gt;, as before. A language model fits as the last stage, for the
few cases both classifiers leave. There is also &lt;code&gt;Ensemble&lt;/code&gt;, which averages the parts into one backend; it is
slightly more accurate at a given threshold, but the cascade decides more and is cheaper.&lt;/p&gt;
&lt;h2&gt;What it gains&lt;/h2&gt;
&lt;p&gt;Share of cases decided automatically at threshold 0.9, with the accuracy of those decisions in brackets. Every
number is a mean over five runs, each with its own calibration, test and training examples:&lt;/p&gt;
&lt;div class=&quot;table-scroll&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th style=&quot;text-align:right&quot;&gt;word counts&lt;/th&gt;
&lt;th style=&quot;text-align:right&quot;&gt;embeddings&lt;/th&gt;
&lt;th style=&quot;text-align:right&quot;&gt;cascade&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;consumer complaints (10 products)&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;44.2% (96.9%)&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;40.5% (97.3%)&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;&lt;strong&gt;54.3%&lt;/strong&gt; (96.3%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;voice assistant, English (18 scenarios)&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;77.1% (97.2%)&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;74.2% (97.9%)&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;&lt;strong&gt;85.9%&lt;/strong&gt; (96.7%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;voice assistant, German&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;73.5% (97.4%)&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;70.3% (97.1%)&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;&lt;strong&gt;82.1%&lt;/strong&gt; (96.1%)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;The cascade decides 8.6 to 10.1 points more than word counts alone, at 0.5 to 1.3 points lower accuracy. It never
did worse in a single run. And it is cheap: the embedding is only computed for the cases the word counts are
unsure about, 56% of the complaints and a quarter of the voice requests.&lt;/p&gt;
&lt;p&gt;The numbers in the &lt;a href=&quot;https://github.com/dukehoff-gmbh/dukehoff-decide#results&quot;&gt;README&lt;/a&gt; are now all means over
five runs. With 300 test cases a single run moves by several points, and our first single run had been a
favourable one.&lt;/p&gt;
&lt;h2&gt;Also new&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Calibration now chooses between temperature and temperature plus per-option bias by cross-validation on the
training cases, so the holdout set stays untouched and its numbers are honest.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;decideAll&lt;/code&gt; works on gated tasks too, so backends that batch, like embedding requests, are called once per
batch.&lt;/li&gt;
&lt;li&gt;dukehoff-decide has a project page: &lt;a href=&quot;https://dukehoff-gmbh.github.io/dukehoff-decide/&quot;&gt;dukehoff-gmbh.github.io/dukehoff-decide&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;0.3.0 is source and binary compatible with 0.2.0.&lt;/p&gt;
&lt;h2&gt;Get it&lt;/h2&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code class=&quot;language-xml&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;dependency&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;groupId&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;com.dukehoff.decide&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;groupId&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;artifactId&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;dukehoff-decide-embedding&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;artifactId&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;version&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;0.3.0&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;version&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;dependency&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;Cascade&lt;/code&gt; and &lt;code&gt;Ensemble&lt;/code&gt; are in &lt;code&gt;dukehoff-decide-core&lt;/code&gt;; &lt;code&gt;LinearClassifier&lt;/code&gt; is in &lt;code&gt;dukehoff-decide-classifier&lt;/code&gt;.
dukehoff-decide is open source under the Apache License 2.0 and needs Java 21. Getting started and the
limitations are in the &lt;a href=&quot;https://github.com/dukehoff-gmbh/dukehoff-decide&quot;&gt;README on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you have a decision in your application that people make by hand today, and a history of how they
made it, &lt;a href=&quot;https://dukehoff.com/en/contact/&quot;&gt;get in touch&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Das KI-Abo für 20 Euro und seine Nebenkosten</title>
    <link href="https://dukehoff.com/blog/ki-privat-abos-im-unternehmen/" />
    <updated>2026-11-09T00:00:00Z</updated>
    <id>https://dukehoff.com/blog/ki-privat-abos-im-unternehmen/</id>
    <content type="html">&lt;p&gt;Ein Entwickler hat ein Claude-Abo, die Kollegin nutzt ChatGPT Plus, ein Dritter hat sich Copilot Pro geholt. Jeder zahlt 10 bis 20 Euro im Monat, die Firma erstattet es. Verglichen mit Business-Tarifen oder Preisen pro Token ist das sehr günstig, und es funktioniert.&lt;/p&gt;
&lt;p&gt;So machen es viele kleine und mittlere Unternehmen, genau wie Freelancer. Das ist verständlich: Die Privat-Abos sind stark subventioniert, und wer einmal ausgerechnet hat, was dieselbe Nutzung zu API-Preisen kosten würde, bleibt gern dabei.&lt;/p&gt;
&lt;p&gt;Nur ist der Preis nicht alles, was man bezahlt. Ein Teil der Rechnung kommt später, und zwar nicht vom Anbieter.&lt;/p&gt;
&lt;img class=&quot;illustration&quot; src=&quot;https://dukehoff.com/images/blog/ki-abo-kassenbon.webp&quot; width=&quot;960&quot; height=&quot;960&quot; loading=&quot;lazy&quot; alt=&quot;Skizze eines Kassenbons für ein KI-Abo: oben 20,00 Euro, darunter Posten ohne Preis wie Trainingsdaten, Auftragsverarbeitung, Geschäftsgeheimnisse, Offboarding, Haftung und Kontrolle, jeweils mit Fragezeichen. Die Summe ist ein grün eingekreistes Fragezeichen.&quot;&gt;
&lt;h2&gt;1. Ihre Daten trainieren das nächste Modell&lt;/h2&gt;
&lt;p&gt;Bei vielen Privat-Abos werden Eingaben fürs Training verwendet, solange man nicht widerspricht. Zwei Beispiele:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Claude Free, Pro und Max:&lt;/strong&gt; Seit September 2025 nutzt Anthropic Chats und Coding-Sessions dieser Tarife fürs Training, wenn der Nutzer nicht widerspricht. Wer zustimmt, dessen Daten werden fünf Jahre statt 30 Tage gespeichert.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GitHub Copilot Free, Pro und Pro+:&lt;/strong&gt; Seit dem 24. April 2026 verwendet GitHub die Interaktionsdaten dieser Tarife fürs Training, ebenfalls mit Widerspruchsmöglichkeit.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Die Business- und Enterprise-Tarife sind jeweils ausgenommen. Bei den Privat-Abos entscheidet jeder Mitarbeiter selbst, und das Unternehmen weiß in der Regel nicht, wer widersprochen hat und wer nicht.&lt;/p&gt;
&lt;h2&gt;2. Kein Vertrag zur Auftragsverarbeitung&lt;/h2&gt;
&lt;p&gt;Sobald personenbezogene Daten im Prompt landen, verarbeitet ein Dienstleister diese Daten im Auftrag des Unternehmens. Dafür verlangt die DSGVO einen Vertrag zur Auftragsverarbeitung (Art. 28). Das muss nicht gleich eine Kundenliste sein: Ein Logauszug mit E-Mail-Adressen, eine Supportanfrage oder Testdaten aus der Produktion reichen.&lt;/p&gt;
&lt;p&gt;Business-Tarife bieten einen solchen Vertrag an. Ein Privat-Abo, das ein Mitarbeiter auf seinen Namen abgeschlossen hat, nicht.&lt;/p&gt;
&lt;h2&gt;3. Geschäftsgeheimnisse verlieren ihren Schutz&lt;/h2&gt;
&lt;p&gt;Das Geschäftsgeheimnisgesetz schützt Informationen nur dann, wenn das Unternehmen „angemessene Geheimhaltungsmaßnahmen“ trifft (§ 2 Nr. 1 GeschGehG). Wer seinen Quellcode, Kalkulationen oder Verträge in einen Dienst gibt, der die Eingaben speichert und womöglich zum Training nutzt, riskiert diesen Schutz. So beschreibt es auch ein &lt;a href=&quot;https://www.lto.de/recht/hintergruende/h/ki-kuenstliche-intelligenz-ai-coding-code-software-programmieren&quot;&gt;Beitrag in der Legal Tribune Online&lt;/a&gt; vom Juli 2026, mit dem treffenden Fazit, dass die Wahl des Tarifs entscheidet, ob der Code geschützt bleibt.&lt;/p&gt;
&lt;p&gt;Bekanntestes Beispiel ist Samsung: 2023 haben Ingenieure dort vertraulichen Quellcode in ChatGPT kopiert. Samsung hat daraufhin die Nutzung solcher Dienste eingeschränkt.&lt;/p&gt;
&lt;h2&gt;4. Wer geht, nimmt das Wissen mit&lt;/h2&gt;
&lt;p&gt;Ein Privat-Abo gehört dem Mitarbeiter. Verlässt er das Unternehmen, bleiben alle Verläufe in seinem Konto: Fragen zur Architektur, Auszüge aus dem Code, Analysen, Entwürfe für Angebote. Das Unternehmen kann das Konto weder sperren noch die Daten löschen lassen, und es weiß oft nicht einmal, was darin steht.&lt;/p&gt;
&lt;p&gt;Mit einem Firmenkonto werden Zugänge zentral vergeben und beim Austritt entzogen, wie bei jedem anderen System auch.&lt;/p&gt;
&lt;h2&gt;5. Keine Haftungsfreistellung&lt;/h2&gt;
&lt;p&gt;KI-generierter Code kann Code aus fremden Projekten sehr ähnlich sein. Für diesen Fall bieten einige Anbieter in ihren Business-Tarifen eine Haftungsfreistellung an. Bei GitHub Copilot gilt sie zum Beispiel nur für Business und Enterprise, und nur, wenn Vorschläge, die öffentlichem Code entsprechen, blockiert sind.&lt;/p&gt;
&lt;p&gt;Bei den Privat-Abos gibt es diese Freistellung nicht. In den Verbraucherbedingungen von Anthropic ist es sogar umgekehrt: Dort stellt der Nutzer den Anbieter frei.&lt;/p&gt;
&lt;h2&gt;6. Keine Kontrolle&lt;/h2&gt;
&lt;p&gt;Ohne Firmenkonto gibt es keine zentrale Verwaltung. Das Unternehmen kann nicht festlegen, welche Modelle und Funktionen genutzt werden, ob Vorschläge aus öffentlichem Code erlaubt sind oder welche Daten das Haus verlassen dürfen. Es gibt keine Protokolle und keinen Überblick, wer welches Werkzeug wofür nutzt. Und ändert ein Anbieter seine Bedingungen, seine Limits oder seine Preise, erfährt das Unternehmen davon, wenn die Arbeit stockt.&lt;/p&gt;
&lt;h2&gt;Verbieten hilft nicht&lt;/h2&gt;
&lt;p&gt;Die naheliegende Reaktion wäre, private KI-Abos einfach zu verbieten. Das löst das Problem selten. Die Werkzeuge sind zu nützlich, und wer sie im Alltag schätzen gelernt hat, nutzt sie im Zweifel weiter, dann eben ohne dass jemand davon weiß. Diese „Schatten-KI“ ist schwerer zu kontrollieren als jedes offizielle Werkzeug.&lt;/p&gt;
&lt;p&gt;Besser ist ein Angebot, das mindestens so gut ist wie das Privat-Abo, aber unter den Bedingungen des Unternehmens läuft.&lt;/p&gt;
&lt;h2&gt;Was stattdessen hilft&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Bestandsaufnahme:&lt;/strong&gt; Wer nutzt welche Werkzeuge, wofür und mit welchen Daten? Die ehrliche Antwort ist meist überraschend.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Business-Tarife für die wichtigsten Werkzeuge:&lt;/strong&gt; Sie kosten mehr als Privat-Abos, schließen das Training aus, bieten einen Vertrag zur Auftragsverarbeitung und eine zentrale Verwaltung.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Eine kurze Richtlinie:&lt;/strong&gt; Welche Werkzeuge sind erlaubt? Was darf in einen Prompt, was nicht? Eine Seite reicht oft.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lokale Modelle für besonders sensible Daten:&lt;/strong&gt; Manche Aufgaben lassen sich mit kleinen Modellen auf eigener Hardware erledigen, ohne dass Daten das Haus verlassen.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Schulung:&lt;/strong&gt; Wer weiß, wie die Werkzeuge mit Daten umgehen und wie man sie effizient einsetzt, macht weniger Fehler und verbraucht weniger. Der AI Act verlangt von Unternehmen, die KI einsetzen, ohnehin Maßnahmen zur KI-Kompetenz ihrer Mitarbeiter. Dazu folgt ein eigener Beitrag.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Wie wir helfen&lt;/h2&gt;
&lt;p&gt;Wir sehen uns mit Ihnen an, welche KI-Werkzeuge in Ihrem Unternehmen heute schon genutzt werden, und schlagen ein Setup vor, das zu Ihren Daten und Ihrem Budget passt. Wir richten es ein, schulen Ihr Team im Umgang damit und betreiben, wo nötig, lokale Modelle auf Ihren Servern.&lt;/p&gt;
&lt;p&gt;Mehr dazu auf unserer Seite zu den &lt;a href=&quot;https://dukehoff.com/leistungen/&quot;&gt;Leistungen&lt;/a&gt;. Oder schreiben Sie uns, wie Ihre Mitarbeiter heute mit KI arbeiten: &lt;a href=&quot;https://dukehoff.com/kontakt/&quot;&gt;Kontakt&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Dieser Beitrag beschreibt technische und organisatorische Risiken und ist keine Rechtsberatung. Für die rechtliche Bewertung im Einzelfall wenden Sie sich an Ihre Rechtsberatung oder Ihren Datenschutzbeauftragten.&lt;/em&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Es muss nicht immer ein LLM sein</title>
    <link href="https://dukehoff.com/blog/es-muss-nicht-immer-ein-llm-sein/" />
    <updated>2026-11-05T00:00:00Z</updated>
    <id>https://dukehoff.com/blog/es-muss-nicht-immer-ein-llm-sein/</id>
    <content type="html">&lt;p&gt;Sprachmodelle sind der Hammer. Und plötzlich sieht jedes Problem aus wie ein Nagel.&lt;/p&gt;
&lt;p&gt;Eingehende Mail der richtigen Abteilung zuordnen? LLM. Reklamation einer Kategorie zuordnen? LLM. Eine Beschwerde als dringend markieren? LLM, natürlich mit GPU-Server oder Cloud-Abo, Token-Rechnung und der Frage, ob die Kundendaten das Haus verlassen dürfen.&lt;/p&gt;
&lt;p&gt;Dabei ist das alles Multiple Choice. Die Antwort steht schon fest, sie ist nur eine von wenigen Möglichkeiten: Vertrieb, Buchhaltung oder Service. Dringend oder nicht. Für eine solche Auswahl ist ein großes Sprachmodell eine sehr aufwendige und teure Lösung.&lt;/p&gt;
&lt;img class=&quot;illustration&quot; src=&quot;https://dukehoff.com/images/blog/duke-butterbrot-statt-kaviar.webp&quot; width=&quot;960&quot; height=&quot;960&quot; loading=&quot;lazy&quot; alt=&quot;Duke, das Java-Maskottchen, beißt zufrieden in ein Butterbrot. Daneben steht unangetastet eine goldene Dose Kaviar mit der Aufschrift LLM.&quot;&gt;
&lt;h2&gt;Was im Mittelstand wirklich anfällt&lt;/h2&gt;
&lt;p&gt;Wer sich die Abläufe in einem typischen mittelständischen Unternehmen ansieht, findet viele solcher Entscheidungen, oft hunderte am Tag:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Wohin gehört diese Mail, diese Anfrage, dieser Anhang?&lt;/li&gt;
&lt;li&gt;Ist das eine Bestellung, eine Rückfrage oder eine Reklamation?&lt;/li&gt;
&lt;li&gt;Wie dringend ist der Vorgang?&lt;/li&gt;
&lt;li&gt;Welcher Kunde, welches Projekt, welche Kostenstelle?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Heute liest dafür meist ein Mensch jede einzelne Nachricht, nur um sie weiterzuleiten. Das kostet Zeit, und es ist genau die Art Arbeit, die niemand gern macht. Hier lohnt sich Automatisierung. Aber nicht zwingend mit dem größten verfügbaren Werkzeug.&lt;/p&gt;
&lt;h2&gt;Das unterschätzte Werkzeug: Ihre eigenen Entscheidungen&lt;/h2&gt;
&lt;p&gt;Für &lt;a href=&quot;https://dukehoff.com/werkzeuge/&quot;&gt;Dukehoff Decide&lt;/a&gt;, unsere Open-Source-Bibliothek für automatisierte Entscheidungen, haben wir in Version 0.2.0 deshalb etwas fast schon Altmodisches eingebaut: einen klassischen Klassifikator. Vereinfacht gesagt zählt er, welche Wörter in welchen Fällen vorkommen, und lernt daraus, wie ähnliche Fälle in der Vergangenheit entschieden wurden. Er braucht keine Grafikkarte, keinen Modellserver und keine Cloud. Er läuft auf dem Server, den Sie schon haben, und die Daten bleiben im Haus.&lt;/p&gt;
&lt;p&gt;Was er braucht, sind Beispiele: Fälle, die schon von Menschen entschieden wurden. Und die liegen in den meisten Unternehmen längst vor. Jede Mail, die einmal an die richtige Abteilung weitergeleitet wurde, jede Reklamation, die eine Kategorie bekommen hat, ist ein solches Beispiel. Das ERP- oder Ticketsystem ist oft ein Archiv voller Trainingsdaten, das nur niemand so nennt.&lt;/p&gt;
&lt;h2&gt;Was das bringt&lt;/h2&gt;
&lt;p&gt;Wir haben den Klassifikator auf öffentlichen Datensätzen mit kleinen und mittelgroßen Sprachmodellen verglichen, alle auf demselben Notebook:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Geschwindigkeit:&lt;/strong&gt; Für eine Kundennachricht braucht der Klassifikator 27 Mikrosekunden, also weniger als eine Zehntausendstelsekunde. Das kleine Sprachmodell braucht gut eine Fünftelsekunde, das mittelgroße knapp eine Sekunde.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Verlässlichkeit:&lt;/strong&gt; Bei Verbraucherbeschwerden aus einem öffentlichen US-Datensatz entscheidet der Klassifikator die Hälfte der Fälle allein, und 97,3 % davon sind richtig. Die andere Hälfte gibt er an einen Menschen weiter, weil er sich nicht sicher genug ist. Das mittelgroße Sprachmodell entscheidet nur bei 23 % der Fälle allein, dort allerdings mit 98,5 % noch etwas genauer.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Das zweite Ergebnis ist das wichtigere. Eine gute Automatisierung entscheidet nicht alles, sondern weiß, wann sie unsicher ist, und gibt genau diese Fälle an einen Menschen ab. Dafür sorgt in Dukehoff Decide eine Kalibrierung: Erst wenn die Sicherheit des Modells auf echten Fällen geprüft ist, darf es allein entscheiden.&lt;/p&gt;
&lt;p&gt;Die Details zu Messung und Einschränkungen stehen im &lt;a href=&quot;https://dukehoff.com/en/blog/dukehoff-decide-0-2-0/&quot;&gt;Beitrag zu Version 0.2.0&lt;/a&gt; (auf Englisch).&lt;/p&gt;
&lt;h2&gt;Und das Sprachmodell?&lt;/h2&gt;
&lt;p&gt;Der Klassifikator lernt nur aus Beispielen. Wo es nur ein paar hundert davon gibt oder die Fälle schwierig sind, ist ein Sprachmodell besser. Wie Sie anfangen, hängt deshalb davon ab, was schon da ist:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Es gibt genug entschiedene Fälle im System:&lt;/strong&gt; Dann kann der Klassifikator direkt daraus lernen. Ein Sprachmodell brauchen Sie gar nicht.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Es gibt noch zu wenige:&lt;/strong&gt; Dann gibt es zwei Wege.
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ohne Sprachmodell:&lt;/strong&gt; Die Mitarbeiter entscheiden vorerst weiter wie bisher, und das System zeichnet jede Entscheidung auf. Sobald genug Beispiele zusammengekommen sind, übernimmt der Klassifikator. Das ist der einfachste Weg, bis zur ersten Entlastung dauert es aber eine Weile.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mit Sprachmodell als Starthilfe:&lt;/strong&gt; Ein kleines, lokal betriebenes Sprachmodell entscheidet die eindeutigen Fälle sofort, die unsicheren entscheiden weiterhin Menschen. Mit diesen Entscheidungen wird später der Klassifikator trainiert. So entlastet die Automatisierung vom ersten Tag an.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Den teuren neuen Hammer dürfen Sie also verwenden, wenn er sich lohnt. Im zweiten Fall baut er sich sogar seinen eigenen Akkuschrauber.&lt;/p&gt;
&lt;h2&gt;Erst das Problem, dann das Werkzeug&lt;/h2&gt;
&lt;p&gt;Die eigentliche Lehre geht über dieses Beispiel hinaus. Ob ein großes Sprachmodell, ein kleines lokales Modell, ein klassisches Statistikverfahren oder eine einfache Regel die richtige Lösung ist, entscheidet nicht der aktuelle Trend, sondern das Problem. Deshalb steht am Anfang jedes Vorhabens eine sorgfältige Analyse, mit Fragen wie diesen:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Wie viele Fälle gibt es,&lt;/strong&gt; und wie viel Zeit kosten sie heute?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Gibt es schon entschiedene Fälle&lt;/strong&gt; im System, aus denen sich lernen lässt?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Was kostet ein Fehler?&lt;/strong&gt; Eine falsch weitergeleitete Mail ist ärgerlich, eine falsch freigegebene Zahlung ist teuer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dürfen die Daten das Haus verlassen?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Muss eine Entscheidung nachvollziehbar sein,&lt;/strong&gt; etwa gegenüber Kunden oder Prüfern?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wie schnell muss es gehen?&lt;/strong&gt; In Echtzeit am Telefon, oder reicht einmal pro Stunde?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Aus den Antworten ergibt sich das passende Werkzeug. Oft ist es eine Kombination, und manchmal ist es gar keine KI, sondern eine gut gemachte Regel.&lt;/p&gt;
&lt;h2&gt;Wie wir Ihnen helfen&lt;/h2&gt;
&lt;p&gt;Genau das ist unsere Arbeit:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Analyse:&lt;/strong&gt; Wir sehen uns mit Ihnen die Abläufe an, finden die Entscheidungen, bei denen sich Automatisierung lohnt, und prüfen mit Ihren eigenen Daten, welches Werkzeug passt, bevor jemand Geld für eine große Lösung ausgibt.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pilot:&lt;/strong&gt; Wir automatisieren einen Prozess, zum Beispiel die Zuordnung eingehender Mails, und messen, wie viel davon zuverlässig ohne Menschen geht.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integration und Betrieb:&lt;/strong&gt; Wir bauen die Lösung in Ihre bestehende Software ein, auf Ihren Servern, wo die Daten im Haus bleiben müssen.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Mehr dazu auf unserer Seite zu den &lt;a href=&quot;https://dukehoff.com/leistungen/&quot;&gt;Leistungen&lt;/a&gt;. Oder schreiben Sie uns, welche Entscheidungen bei Ihnen heute noch von Hand getroffen werden: &lt;a href=&quot;https://dukehoff.com/kontakt/&quot;&gt;Kontakt&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>dukehoff-decide 0.2.0: decisions in under a millisecond with a trained classifier</title>
    <link href="https://dukehoff.com/en/blog/dukehoff-decide-0-2-0/" />
    <updated>2026-10-26T00:00:00Z</updated>
    <id>https://dukehoff.com/en/blog/dukehoff-decide-0-2-0/</id>
    <category term="release" label="release" />
    <content type="html">&lt;p&gt;dukehoff-decide turns a multiple-choice question in a Java application into a type. It answers the
question with a small local language model, returns calibrated probabilities and hands uncertain
cases to a person (&lt;a href=&quot;https://dukehoff.com/en/blog/dukehoff-decide/&quot;&gt;the introduction&lt;/a&gt;). A language model is the right
way to start: it needs nothing but the question, the option descriptions and a few hundred labelled
examples for calibration.&lt;/p&gt;
&lt;p&gt;An application that has run for a while has something better: thousands of cases where a person
made the decision. Version 0.2.0 puts them to use. The new module &lt;code&gt;dukehoff-decide-classifier&lt;/code&gt;
contains &lt;code&gt;LinearClassifier&lt;/code&gt;, a classifier you train on your own labelled cases. It plugs in where the
language model was, so calibration, the gate and the report work unchanged, and so does the code
that uses the decisions. Thanks to &lt;a href=&quot;https://github.com/otulach&quot;&gt;Ondřej Tulach&lt;/a&gt; for the idea of adding a linear classifier.&lt;/p&gt;
&lt;h2&gt;What it looks like&lt;/h2&gt;
&lt;pre class=&quot;language-java&quot;&gt;&lt;code class=&quot;language-java&quot;&gt;&lt;span class=&quot;token class-name&quot;&gt;LinearClassifier&lt;/span&gt; model &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;LinearClassifier&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;train&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Triage&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; labeled&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
model&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;save&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Path&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;src/main/resources/decide/triage.model&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token class-name&quot;&gt;DecisionTask&lt;/span&gt;&lt;span class=&quot;token generics&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Triage&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt; raw &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Decider&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;builder&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;backend&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;model&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;build&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;task&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Triage&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
profiles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;save&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Calibration&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;fit&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;raw&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; train&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; holdout&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;profile&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;   &lt;span class=&quot;token comment&quot;&gt;// cases the model was not trained on&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;At runtime, &lt;code&gt;LinearClassifier.load(path)&lt;/code&gt; returns the backend. With Spring Boot, declare it as a
&lt;code&gt;ScoringBackend&lt;/code&gt; bean and the starter uses it instead of the language model.&lt;/p&gt;
&lt;p&gt;Under the hood it is deliberately simple: word and character n-grams (TF-IDF) and one logistic
regression per field. It has no dependencies besides &lt;code&gt;dukehoff-decide-core&lt;/code&gt; and needs no model
server.&lt;/p&gt;
&lt;h2&gt;How fast&lt;/h2&gt;
&lt;p&gt;Training on 20,000 texts takes about a minute. Deciding takes well under a millisecond. Measured on
an M1 Pro:&lt;/p&gt;
&lt;div class=&quot;table-scroll&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;time per decision&lt;/th&gt;
&lt;th style=&quot;text-align:right&quot;&gt;Qwen2.5 1.5B&lt;/th&gt;
&lt;th style=&quot;text-align:right&quot;&gt;Qwen2.5 7B&lt;/th&gt;
&lt;th style=&quot;text-align:right&quot;&gt;LinearClassifier&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;customer message&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;0.22 s&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;0.98 s&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;27 µs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;consumer complaint (long text)&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;0.38 s&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;1.8 s&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;0.4 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;The language model times are wall time over the whole run, with four requests in flight.&lt;/p&gt;
&lt;h2&gt;How accurate&lt;/h2&gt;
&lt;p&gt;That depends on how many labels you have. We compared both approaches on four public datasets, each
with 300 test examples. The language models were calibrated, and the classifier was trained on
examples that are in neither the calibration nor the test set.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Customer messages&lt;/strong&gt; (11 categories): the classifier gets 100% with 20,000 training examples,
the calibrated models 87.0% (1.5B) and 91.3% (7B). Even with every training message removed that
closely resembles a calibration or test message, it reaches 99% from 1,000 examples. This dataset names its
categories with a few words (&amp;quot;invoice&amp;quot;, &amp;quot;refund&amp;quot;), which is easy for word counts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Voice assistant requests&lt;/strong&gt; (18 scenarios, often only implied): with the 300 labels that
calibration needs anyway, the language models are clearly better. The classifier catches up with
the 1.5B model at about 1,000 examples and with the 7B model at about 3,000. With all of them
(about 15,900) it gets 88.3% in English and 85.0% in German, against 83.0% and 78.3% for the 7B
model.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Consumer complaints&lt;/strong&gt; (10 financial products, written by real consumers, the longest texts):
78.0% against 74.3% for the 7B model. At a threshold of 0.9 the gate decides half of the complaints
on its own, 97.3% of them correctly. With the 7B model it is 23%.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On a fourth dataset, where queue and priority mostly cannot be inferred from the text, the classifier
does better than the models, but it is not good enough to route whole tickets automatically either.
The calibration report says so. Details and how to rerun everything are in the
&lt;a href=&quot;https://github.com/dukehoff-gmbh/dukehoff-decide#results&quot;&gt;README&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;When to switch&lt;/h2&gt;
&lt;p&gt;Start with a language model. Its confident decisions are useful from day one, and the uncertain
cases that people handle produce exactly the labels a classifier needs. Once there are a few thousand,
train one, calibrate it on cases it has not seen, and compare the reports.&lt;/p&gt;
&lt;p&gt;One difference to keep in mind: a language model reads the question and the option descriptions, so
sharpening a description can make it more accurate. The classifier learns only from the labelled
examples and never sees those texts. Rewording a question changes nothing for it, and adding an option
means retraining. It refuses to score a task whose options no longer match the ones it was trained on.&lt;/p&gt;
&lt;h2&gt;Get it&lt;/h2&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code class=&quot;language-xml&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;dependency&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;groupId&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;com.dukehoff.decide&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;groupId&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;artifactId&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;dukehoff-decide-classifier&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;artifactId&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;version&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;0.2.0&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;version&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;dependency&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;dukehoff-decide is open source under the Apache License 2.0 and needs Java 21. Getting started and the
limitations are in the &lt;a href=&quot;https://github.com/dukehoff-gmbh/dukehoff-decide&quot;&gt;README on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you have a decision in your application that people make by hand today, and a history of how they
made it, &lt;a href=&quot;https://dukehoff.com/en/contact/&quot;&gt;get in touch&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>dukehoff-decide: typed, calibrated decisions from small language models</title>
    <link href="https://dukehoff.com/en/blog/dukehoff-decide/" />
    <updated>2026-10-23T00:00:00Z</updated>
    <id>https://dukehoff.com/en/blog/dukehoff-decide/</id>
    <category term="announcement" label="announcement" />
    <category term="release" label="release" />
    <content type="html">&lt;p&gt;Many LLM calls in business applications ask a question whose answer is one of a few options. Which
team handles this ticket? Is this message spam? How urgent is it? The usual way is to send the
question to a large model, ask for JSON, parse the text and hope the answer is one of the allowed
values. And when the model says it is sure, there is no way to tell whether that means anything.&lt;/p&gt;
&lt;p&gt;dukehoff-decide turns such a question into a Java type and answers it with a small model that runs
locally. You get a valid value of that type, a probability for every option, and a gate that
decides on its own only where those probabilities are reliable. It is open source under the Apache
License 2.0, and version 0.1.0 is on Maven Central.&lt;/p&gt;
&lt;h2&gt;What it looks like&lt;/h2&gt;
&lt;pre class=&quot;language-java&quot;&gt;&lt;code class=&quot;language-java&quot;&gt;&lt;span class=&quot;token annotation punctuation&quot;&gt;@Question&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;Triage an incoming customer support ticket&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;record&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Triage&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;token annotation punctuation&quot;&gt;@Question&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;How urgent is this ticket?&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Priority&lt;/span&gt; priority&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token annotation punctuation&quot;&gt;@Question&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;Which team should handle it?&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Team&lt;/span&gt; team&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token annotation punctuation&quot;&gt;@Question&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;Does the customer threaten to cancel?&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;boolean&lt;/span&gt; churnRisk&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token class-name&quot;&gt;Decision&lt;/span&gt;&lt;span class=&quot;token generics&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Triage&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt; d &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; triage&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;decide&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;State&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;ticketText&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
d&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;                      &lt;span class=&quot;token comment&quot;&gt;// always a valid Triage&lt;/span&gt;
d&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;distribution&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;priority&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;     &lt;span class=&quot;token comment&quot;&gt;// Map&amp;lt;Priority, Double&gt;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;switch&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;triage&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;requireConfidence&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0.9&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;decide&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;state&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Outcome&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Confident&lt;/span&gt;&lt;span class=&quot;token generics&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Triage&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; dec&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;          &lt;span class=&quot;token operator&quot;&gt;-&gt;&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;route&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;dec&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Outcome&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Uncertain&lt;/span&gt;&lt;span class=&quot;token generics&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Triage&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; dec&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; why&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&gt;&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sendToHuman&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;state&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; dec&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; why&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Every field becomes a question with a fixed set of options: a boolean is yes or no, an enum has one
option per constant, a scale has one option per step. The model answers each question with a single
token, and dukehoff-decide reads the probabilities of all options from the model&#39;s
log-probabilities. There is no text to parse, so there is no invalid answer.&lt;/p&gt;
&lt;h2&gt;Why calibration matters&lt;/h2&gt;
&lt;p&gt;Raw model probabilities are usually overconfident, and small models often favour particular
options. So you calibrate once, offline, with a few hundred historical cases whose answer you know,
for example tickets and the team that finally handled them. dukehoff-decide fits a correction per
field and writes a report: accuracy before and after, how many cases a gate at each threshold would
decide automatically, how accurate those are, and which options get confused.&lt;/p&gt;
&lt;p&gt;The report is worth reading. A warning such as &amp;quot;option CONTACT receives 16 of 30 errors&amp;quot; points to an
option whose description matches too much. In our tests, rewording one such description raised
accuracy from 76% to 88–90%, more than a model 4.7 times as large did.&lt;/p&gt;
&lt;h2&gt;What we measured&lt;/h2&gt;
&lt;p&gt;Customer messages from a public dataset, 11 categories, Qwen2.5 1.5B (4-bit) with llama.cpp,
300 examples for calibration and 300 different ones for the test:&lt;/p&gt;
&lt;div class=&quot;table-scroll&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;calibration&lt;/th&gt;
&lt;th style=&quot;text-align:right&quot;&gt;before&lt;/th&gt;
&lt;th style=&quot;text-align:right&quot;&gt;after&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;category correct&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;87.7%&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;93.7%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;decided automatically (threshold 0.9)&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;50%&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;71%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;of those correct&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;94.0%&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;99.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;Always guessing the most frequent category would be right 21.3% of the time.&lt;/p&gt;
&lt;p&gt;The second test matters as much. On a dataset of support tickets where queue and priority mostly
cannot be inferred from the text, the models still claimed over 99% confidence. Raw scores would
have routed 42% to 65% of the tickets automatically, with under 10% of them fully correct. After
calibration, none were routed automatically. That is the right answer: the gate knows when the model
doesn&#39;t.&lt;/p&gt;
&lt;p&gt;Details, both datasets and how to rerun them are in the
&lt;a href=&quot;https://github.com/dukehoff-gmbh/dukehoff-decide#results&quot;&gt;README&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Get it&lt;/h2&gt;
&lt;p&gt;You need Java 21 and a server with an OpenAI-compatible API that returns log-probabilities. We
verified it with Ollama and llama.cpp.&lt;/p&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code class=&quot;language-xml&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;dependency&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;groupId&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;com.dukehoff.decide&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;groupId&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;artifactId&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;dukehoff-decide-openai&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;artifactId&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;version&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;0.1.0&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;version&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;dependency&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For Spring Boot, use &lt;code&gt;dukehoff-decide-spring-boot-starter&lt;/code&gt; instead. It creates a &lt;code&gt;DecisionTask&lt;/code&gt; bean
per type and comes with a health check and Micrometer metrics. Getting started, the Spring Boot setup
and the limitations are in the &lt;a href=&quot;https://github.com/dukehoff-gmbh/dukehoff-decide&quot;&gt;README on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you want to replace calls to a large model in your application with a small one you can run
yourself, or need help with the labelled examples for calibration, &lt;a href=&quot;https://dukehoff.com/en/contact/&quot;&gt;get in touch&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Dukehoff MCP for Java: an IDE for coding agents</title>
    <link href="https://dukehoff.com/en/blog/dukehoff-mcp-for-java/" />
    <updated>2026-10-18T00:00:00Z</updated>
    <id>https://dukehoff.com/en/blog/dukehoff-mcp-for-java/</id>
    <category term="announcement" label="announcement" />
    <category term="release" label="release" />
    <content type="html">&lt;p&gt;Imagine being a Java developer in 1996, before modern IDEs, with nothing but command-line
tools and maybe Notepad. To rename a method, you search for its name, then open each of
maybe 22 files to check whether a hit refers to that method or to an unrelated one
with the same name, and replace each occurrence with sed or manually. You get there eventually,
and once it compiles, you&#39;re probably done. It just takes a lot of steps and time.&lt;/p&gt;
&lt;p&gt;You may be surprised, but that&#39;s pretty much how coding agents work in 2026 when you ask them to rename a method.&lt;/p&gt;
&lt;p&gt;&lt;video controls=&quot;&quot; muted=&quot;&quot; playsinline=&quot;&quot; preload=&quot;none&quot; width=&quot;1280&quot; height=&quot;804&quot; poster=&quot;https://dukehoff.com/images/dukehoff-mcp/rename-without.jpg&quot;&gt;
&lt;source src=&quot;https://dukehoff.com/images/dukehoff-mcp/rename-without.mp4&quot; type=&quot;video/mp4&quot;&gt;
&lt;/video&gt;&lt;/p&gt;
&lt;p class=&quot;source&quot;&gt;Without the server: Claude Code with Sonnet 5.5 renames a method in Apache Commons Lang. 32 s model time, 994 tokens.&lt;/p&gt;
&lt;p&gt;Dukehoff MCP for Java gives the agent the analysis and refactoring operations of
an IDE as tools: find usages, rename, move, change signature, safe delete, inline.
The agent passes the method&#39;s signature to the rename tool, and the server finds the method,
renames it everywhere, overrides included, writes the files, and returns the diff plus
a compile check that names any new errors.&lt;/p&gt;
&lt;p&gt;&lt;video controls=&quot;&quot; muted=&quot;&quot; playsinline=&quot;&quot; preload=&quot;none&quot; width=&quot;1280&quot; height=&quot;804&quot; poster=&quot;https://dukehoff.com/images/dukehoff-mcp/rename-with.jpg&quot;&gt;
&lt;source src=&quot;https://dukehoff.com/images/dukehoff-mcp/rename-with.mp4&quot; type=&quot;video/mp4&quot;&gt;
&lt;/video&gt;&lt;/p&gt;
&lt;p class=&quot;source&quot;&gt;With the server: the same task. 10 s model time, 230 tokens.&lt;/p&gt;
&lt;p&gt;Some Java IDEs have integrated tools like this, but the way we develop software has
changed. Many developers now start an agent in a terminal, let it write the code,
and review the result in the pull request. Dukehoff MCP for Java runs headless,
so your agent doesn&#39;t need a running IDE to use these tools. And when you do work
in an IDE, the same tools are there too: in VS Code next to Copilot, or in a running NetBeans.&lt;/p&gt;
&lt;p&gt;Be nice to your agent and give it the right tools for the tedious, repetitive and
error-prone tasks. The server is open source, and for exactly these tasks it saves
you and your agent turns, tokens and time.&lt;/p&gt;
&lt;h2&gt;What it saves&lt;/h2&gt;
&lt;dl class=&quot;results&quot;&gt;
&lt;div&gt;&lt;dt&gt;−82%&lt;span&gt;turns&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;&lt;strong&gt;Rename a method used in 22 files&lt;/strong&gt;9 turns instead of 51, $0.22 instead of $0.56.&lt;span class=&quot;setup&quot;&gt;NetBeans, &lt;code&gt;java/&lt;/code&gt; folder, Opus 5.5&lt;/span&gt;&lt;/dd&gt;&lt;/div&gt;
&lt;div&gt;&lt;dt&gt;−91%&lt;span&gt;cost&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;&lt;strong&gt;Find the callers of one overload&lt;/strong&gt;91% less cost, 85% less time.&lt;span class=&quot;setup&quot;&gt;Apache Commons Lang, Sonnet 5&lt;/span&gt;&lt;/dd&gt;&lt;/div&gt;
&lt;div&gt;&lt;dt&gt;−40%&lt;span&gt;turns&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;&lt;strong&gt;Modernize 84 places among 144 candidates&lt;/strong&gt;40% fewer turns, about 22% less cost and 39% less time than writing its own scripts.&lt;span class=&quot;setup&quot;&gt;Told to use the rules, Sonnet 5.5&lt;/span&gt;&lt;/dd&gt;&lt;/div&gt;
&lt;/dl&gt;
&lt;p&gt;Each figure compares the same agent with and without the server.&lt;/p&gt;
&lt;p&gt;These are real numbers we measured with Claude models. Find the details
in &lt;a href=&quot;https://github.com/dukehoff-gmbh/dukehoff-mcp/blob/main/eval/RESULTS.md&quot;&gt;eval/RESULTS.md&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We are not alone with this idea. Netflix and JetBrains recently reported that giving
agents the headless code intelligence of IntelliJ IDEA made them typically 20–30% more efficient,
and up to about 65% in the best case
(&lt;a href=&quot;https://blog.jetbrains.com/ai/2026/10/how-netflix-made-ai-coding-agents-more-efficient/&quot;&gt;JetBrains blog&lt;/a&gt;).
Their tooling is proprietary: the editor extension needs an IntelliJ IDEA Ultimate subscription,
and support for terminal agents is still to come. Dukehoff MCP for Java is open source, free,
and works today with Claude Code, Codex, Copilot and others, in the terminal, in VS Code and in NetBeans.&lt;/p&gt;
&lt;h2&gt;Why we hit the Jackpot with NetBeans&lt;/h2&gt;
&lt;p&gt;Apache NetBeans is free and open source, and it understands Java with javac itself,
the same compiler your build uses: types, overloads and overrides are resolved exactly,
not approximated. It runs without a window just as well; its LSP server, which powers
the Apache NetBeans extension for VS Code, does that every day. And it has a mature
refactoring engine, built over more than twenty years.&lt;/p&gt;
&lt;p&gt;Beyond that, NetBeans has a hidden gem: Jackpot, a rule-based rewrite engine.
A Jackpot rule matches code by its structure and types, not by its text, so a
migration changes what it should and leaves look-alikes alone.
Agents can write such rules themselves, and we ship tested rule sets for common migrations:
JUnit 4 to 5, Java modernization, and javax to jakarta.&lt;/p&gt;
&lt;h2&gt;Get it&lt;/h2&gt;
&lt;p&gt;Dukehoff MCP for Java is free and open source under the Apache License 2.0. Pick the way that fits how you work:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Claude Code, Codex, Copilot CLI and other terminal agents:&lt;/strong&gt; download &lt;code&gt;dukehoff-mcp-&amp;lt;version&amp;gt;.tar.gz&lt;/code&gt; (macOS, Linux) or &lt;code&gt;.zip&lt;/code&gt; (Windows) from the &lt;a href=&quot;https://github.com/dukehoff-gmbh/dukehoff-mcp/releases/latest&quot;&gt;latest release&lt;/a&gt;, unpack it, and let it print the registration for your agent: &lt;code&gt;dukehoff-mcp --config claude&lt;/code&gt; (&lt;a href=&quot;https://github.com/dukehoff-gmbh/dukehoff-mcp#installation&quot;&gt;installation&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;VS Code with GitHub Copilot:&lt;/strong&gt; install &lt;em&gt;Dukehoff MCP for Java&lt;/em&gt; from the &lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=dukehoff.dukehoff-mcp-java&quot;&gt;Visual Studio Marketplace&lt;/a&gt;, or search for &amp;quot;Dukehoff MCP&amp;quot; in VS Code&#39;s Extensions view. It brings the Apache NetBeans extension along; the tools appear in Copilot&#39;s agent mode.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;NetBeans:&lt;/strong&gt; download &lt;code&gt;dukehoff-mcp-netbeans-&amp;lt;version&amp;gt;.nbm&lt;/code&gt; and &lt;code&gt;dukehoff-mcp-launcher-&amp;lt;version&amp;gt;.jar&lt;/code&gt; from the &lt;a href=&quot;https://github.com/dukehoff-gmbh/dukehoff-mcp/releases/latest&quot;&gt;latest release&lt;/a&gt;, install the plugin under Tools &amp;gt; Plugins &amp;gt; Downloaded, and connect your terminal agent to the running IDE with &lt;code&gt;--ide&lt;/code&gt; (&lt;a href=&quot;https://github.com/dukehoff-gmbh/dukehoff-mcp#with-a-running-netbeans-ide&quot;&gt;how&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You need a JDK 17 or newer; VS Code 1.101 or newer for the extension, NetBeans 31 or
newer for the plugin. To make your agent reach for the tools on its own, add the short
section from &lt;a href=&quot;https://github.com/dukehoff-gmbh/dukehoff-mcp#telling-the-agent-when-to-use-the-tools&quot;&gt;Telling the agent when to use the tools&lt;/a&gt; to
your &lt;code&gt;CLAUDE.md&lt;/code&gt; or &lt;code&gt;AGENTS.md&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you have a migration where the meaning of a change depends on types,
such as an in-house framework, a vendor library swap or a Java EE to Jakarta EE
move beyond the APIs, we can help: &lt;a href=&quot;https://dukehoff.com/en/contact/&quot;&gt;get in touch&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Dukehoff MCP for Java runs on Apache NetBeans. It is not part of, nor endorsed by, the Apache
NetBeans project or the Apache Software Foundation. &amp;quot;Apache&amp;quot;, &amp;quot;NetBeans&amp;quot; and &amp;quot;Apache NetBeans&amp;quot; are
trademarks of the Apache Software Foundation.&lt;/p&gt;
</content>
  </entry>
</feed>
