Posts

We tried 14 levers to get reliable SDUI card JSON from a local LLM model

Image
In freemansoft/Flutter-AdaptiveCards a demonstration Dart chat server hands a question to a local Ollama model, asks for the answer as Adaptive Card JSON, and a Flutter client app renders the reply. Everything below is an attempt to make that card generation more reliable and more faithful to what was asked. The figures are transcribed from ModelBehavior.md , a lab notebook in that repository. Giving the explanation a place in the card worked; banning prose did not qwen2.5-coder:7b  answered a request to explain a snippet of code with a valid Adaptive Card, then appended the explanation after it. A reply is either a card or prose, with nothing in between: the client renders a card only when the entire reply is one, so appending the explanation demoted the whole thing to text and the user saw raw JSON. The obvious repair was to tell the model harder not to write anything after the card. That did not work. It scored the same and stopped producing cards at all,...

An SDUI demo that turned into a local-model benchmark

Image
freemansoft/Flutter-AdaptiveCards is a Flutter renderer for Adaptive Cards. The project includes a demonstration Flutter chat client and Dart chat server. Enter a question in the client. It goes to the Dart server, which asks a local model running on Ollama to answer in Adaptive Card JSON. The server decides whether the reply is a card or ordinary text and forwards the card body; the client renders it as a server-driven UI (SDUI) whose payload was generated by a language model rather than by a backend programmatic service. It is a demo architecture and not a production one. A production system would more likely use the model for intent detection, which would then be mapped to an API call that returns structured domain data, with a deterministic mapping layer turning that into a card. The demo is thin without any real application tier, instead relying on the model for JSON card creation. The model's reply is the UI, not text about it Adaptive card generati...

Soft entity resolution using ElasticSearch and data analysis: DOT chameleon-carrier detection as a PoC

Image
A few years ago I tried to build a probabilistic/soft entity resolution system a few years ago using Elasticsearch with its ability to match "like" terms. The idea was to create a candidate list of companies that closed and re-opened a short time later, a pattern often used to avoid some type of consequences. The project was more work than I felt like doing at the time. Recently, I decided to try to push the project forward using Claude Code as my development team.  The LLM filled in the blank spaces, created tests, and helped me analyze the data to understand what I needed to do.  All within just a couple of days. Entitopia as a working project Entitopia  is a proof of concept for using semantic matching and multi-property similarity as part of probabilistic entity resolution. It looks for an _indicator_: a carrier that shut down under one DOT registration while a closely-resembling "new" carrier registered shortly after. That pattern has plenty of legitimate expla...