<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/why-every-ai-model-gets-avalonia-wrong-and-how-i-m-fixing-it--obpgvx7ac" -->

---
title: Why Every AI Model Gets Avalonia Wrong (And How I'm...
description: Every AI model gets Avalonia wrong. Not slightly wrong — structurally, fundamentally wrong. Claude, GPT, Qwen — none of them understand how Avalonia layouts...
canonical: https://daily.dev/posts/why-every-ai-model-gets-avalonia-wrong-and-how-i-m-fixing-it--obpgvx7ac
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Why Every AI Model Gets Avalonia Wrong (And How I'm Fixing It) | daily.dev
og:description: Every AI model gets Avalonia wrong. Not slightly wrong — structurally, fundamentally wrong. Claude, GPT, Qwen — none of them understand how Avalonia layouts...
og:url: https://daily.dev/posts/why-every-ai-model-gets-avalonia-wrong-and-how-i-m-fixing-it--obpgvx7ac
og:image: https://api.daily.dev/og/posts/OBpGVX7aC.png
og:image:alt: Why Every AI Model Gets Avalonia Wrong (And How I'm Fixing It)
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Why Every AI Model Gets Avalonia Wrong (And How I'm Fixing It)

**[AngelSix](https://daily.dev/sources/angelsix)** · 30 min read · 0 upvotes · 0 comments

## Summary

Every AI model gets Avalonia wrong. Not slightly wrong — structurally, fundamentally wrong. Claude, GPT, Qwen — none of them understand how Avalonia layouts actually work. They've been trained on TypeScript, CSS, and HTML. They have no visual brain for XAML.

So I'm building one from scratch.

This is the first video in a series documenting my journey to create an open-weight AI model that writes real, production-grade Avalonia code. We start exactly where every training pipeline should: making the model fail on purpose — so we know precisely what to fix.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 WHAT YOU'LL LEARN
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
► Why every current AI model is structurally broken for Avalonia UI
► The synthetic data bootstrapping technique for targeted model training
► AI Mecha — my custom multi-agent harness application and how it works
► The Universal UI Layout Loss framework (inner positioning, finite vs infinite space, state selectors)
► How to intentionally break a model to reveal exactly what to fix
► The full roadmap: basic markdown prompts → RAG → fine-tuning → open-weight model release

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 CHAPTERS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
0:00 Why AI Fails at Avalonia
0:39 AI Mecha: The Multi-Agent Workflow App
1:34 From Cloud to Local AI (The Journey)
3:09 The Goal: Training From Scratch
3:46 Making the Model Fail on Purpose
4:49 Synthetic Data Bootstrapping Explained
5:26 Universal UI Layout Loss Framework
7:36 Setting Up the Test Environment
9:06 Testing Llama: First Prompt
12:21 Analysing Llama's Failures
13:34 Refining the Prompt
19:01 Switching to Qwen
22:19 Adding the Compilation Rule
26:00 Iterating on Output Quality
28:26 The Linting Problem
29:31 What Comes Next

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔗 LINKS & RESOURCES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌐 AngelSix: https://www.angelsix.com
📂 GitHub Resources: https://github.com/angelsix
📋 Full Series Playlist: https://www.youtube.com/playlist?list=PLrW43fNmjaQUEVov5qPNrLyaBAKDCNcPD

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=TZUymq6dMOA>

---

[View this post on daily.dev](https://daily.dev/posts/why-every-ai-model-gets-avalonia-wrong-and-how-i-m-fixing-it--obpgvx7ac)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Why Every AI Model Gets Avalonia Wrong (And How I'm Fixing It)","url":"https://daily.dev/posts/why-every-ai-model-gets-avalonia-wrong-and-how-i-m-fixing-it--obpgvx7ac","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/why-every-ai-model-gets-avalonia-wrong-and-how-i-m-fixing-it--obpgvx7ac"},"datePublished":"2026-10-04T13:04:30.112Z","dateModified":"2026-10-04T21:48:48.825Z","description":"Every AI model gets Avalonia wrong. Not slightly wrong — structurally, fundamentally wrong. Claude, GPT, Qwen — none of them understand how Avalonia layouts...","image":"https://i.ytimg.com/vi/TZUymq6dMOA/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/TZUymq6dMOA/sddefault.jpg","isAccessibleForFree":true,"articleSection":"AngelSix","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"AngelSix","logo":"https://media.daily.dev/image/upload/s--h1ikmN_u--/f_auto,q_auto/v1791119063/logos/angelsix?_a=BAMAMicg0","url":"https://daily.dev/sources/angelsix"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/why-every-ai-model-gets-avalonia-wrong-and-how-i-m-fixing-it--obpgvx7ac","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"","timeRequired":"PT30M","video":{"@type":"VideoObject","name":"Why Every AI Model Gets Avalonia Wrong (And How I'm Fixing It)","description":"Every AI model gets Avalonia wrong. Not slightly wrong — structurally, fundamentally wrong. Claude, GPT, Qwen — none of them understand how Avalonia layouts...","thumbnailUrl":"https://i.ytimg.com/vi/TZUymq6dMOA/sddefault.jpg","uploadDate":"2026-10-04T13:04:30.112Z","duration":"PT30M","url":"https://api.daily.dev/r/OBpGVX7aC","embedUrl":"https://www.youtube.com/embed/TZUymq6dMOA"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"AngelSix","item":"https://daily.dev/sources/angelsix"},{"@type":"ListItem","position":3,"name":"Why Every AI Model Gets Avalonia Wrong (And How I'm Fixing It)"}]}
```

