<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Madjar Evan</title>
    <description>The latest articles on DEV Community by Madjar Evan (@madjar).</description>
    <link>https://dev.to/madjar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1081539%2F51396ff1-2681-4ba6-ba45-204349d883e5.jpeg</url>
      <title>DEV Community: Madjar Evan</title>
      <link>https://dev.to/madjar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/madjar"/>
    <language>en</language>
    <item>
      <title>Generative UI with LLMs: making web pages adapt to each user</title>
      <dc:creator>Madjar Evan</dc:creator>
      <pubDate>Tue, 21 Apr 2026 14:03:05 +0000</pubDate>
      <link>https://dev.to/madjar/generative-ui-with-llms-making-web-pages-adapt-to-each-user-375f</link>
      <guid>https://dev.to/madjar/generative-ui-with-llms-making-web-pages-adapt-to-each-user-375f</guid>
      <description>&lt;p&gt;Most web apps show the same layout to every user. Large language models (LLMs) change this: they let you generate adaptive, per-user interfaces that restructure themselves based on what each person cares about.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Web pages look the same for every user, but LLMs can adapt them per user or per cohort.&lt;/li&gt;
&lt;li&gt;The LLM generates a template &lt;strong&gt;once&lt;/strong&gt; — not on every page render. Cost stays bounded.&lt;/li&gt;
&lt;li&gt;I built a working Django + OpenAI prototype where a recipe page rearranges itself from a free-form user prompt. Screenshots and stack details in Section 9.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  1. Why adapt web pages per user?
&lt;/h2&gt;

&lt;p&gt;Adaptive interfaces have two connected motivations — one for the user, another for the site owner.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For the user — convenience.&lt;/strong&gt; On a product, job, or apartment page, about 80% of the information is usually irrelevant to a specific person. Someone looks at price and location; someone else cares about furniture; someone else about the tech stack and salary. Today the user scrolls, visually filters, and wastes time on things they don't need. An adaptive interface removes that work: the page arrives already sorted and trimmed to fit their interest.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And more than convenience — new information.&lt;/strong&gt; Adaptive interfaces can do more than remove clutter; they can add things that weren't on the original page: turning a news article into a knowledge graph with connections between people and events, enriching dense technical text with inline explanations for beginners, or assembling a summary from multiple sources. This is no longer repackaging — it's enrichment, and it's only possible thanks to LLMs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For the site owner — traffic and engagement.&lt;/strong&gt; When the page shows what matters to the user right away, they:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;stay on the site longer;&lt;/li&gt;
&lt;li&gt;reach the target action faster (submit a request, call, buy);&lt;/li&gt;
&lt;li&gt;leave for a competitor less often;&lt;/li&gt;
&lt;li&gt;are more likely to come back.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's the classic chain: &lt;strong&gt;convenience → engagement → business metrics&lt;/strong&gt;. Adaptive interfaces don't invent new value — they remove the familiar friction between the user and the information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example.&lt;/strong&gt; On a real estate site, a user is looking for an apartment with a specific furniture setup. On the standard page, the furniture block is buried at the bottom — below the description of the building, its year of construction, and the developer's history. To get to what matters, the person scrolls, skims, and often closes the tab before getting there. On the adapted page, the furniture block sits at the top, everything else is collapsed or removed. Within a few seconds the user can tell whether the apartment fits, and is more likely to reach the "submit request" button. Same action — but the friction is gone.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. What can an LLM change on a page? Four levels
&lt;/h2&gt;

&lt;p&gt;Page adaptation can happen at four levels — from the most surface-level (just text) to the deepest (the whole markup). The deeper the level, the more freedom the system has to rethink the page, but also the more context is needed about the user and the higher the risk of getting it wrong.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Level&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;What exactly changes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;I&lt;/td&gt;
&lt;td&gt;Content&lt;/td&gt;
&lt;td&gt;Text inside &lt;code&gt;&amp;lt;p&amp;gt;...&amp;lt;/p&amp;gt;&lt;/code&gt; — wording, headings, paragraphs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;II&lt;/td&gt;
&lt;td&gt;Font&lt;/td&gt;
&lt;td&gt;CSS font styles: weight, family, size, spacing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;III&lt;/td&gt;
&lt;td&gt;Block styles&lt;/td&gt;
&lt;td&gt;Position and shape of &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;, and other containers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IV&lt;/td&gt;
&lt;td&gt;Page design&lt;/td&gt;
&lt;td&gt;The entire HTML markup — a fully regenerated page&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  3. Individual vs cohort adaptation: how it works
&lt;/h2&gt;

&lt;p&gt;Adaptation can work at two scales:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Individually&lt;/strong&gt; — the page adjusts to one specific user.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;By cohort&lt;/strong&gt; — the page adjusts to a group of people sharing a common trait (age, role, interests, language, perceptual needs, etc.).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Either way, the system needs &lt;strong&gt;data&lt;/strong&gt; — what exactly to adapt and for whom. That data can be collected in two ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;From the user themselves.&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Directly&lt;/em&gt; — the user configures the page through a settings interface.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Indirectly&lt;/em&gt; — the user answers questions about preferences, and the system derives settings from the answers.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The system infers it&lt;/strong&gt; — like a recommendation system, based on behavior, history, device, context.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For cohorts the logic is the same: the user either selects their group (if a ready-made adapted design matches it), or the system tries to detect the cohort automatically.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Example: adapting a job listing page
&lt;/h2&gt;

&lt;p&gt;Before digging into the mechanics, let's look at the idea through a simple example.&lt;/p&gt;

&lt;p&gt;A standard job listing page is overloaded: a long company pitch, mixed responsibilities and requirements, the tech stack buried in a paragraph, salary at the very bottom. Every company has its own format, and the user keeps hunting for the same pieces of information again and again.&lt;/p&gt;

&lt;p&gt;An adaptive interface can collapse this into a compact view that the user has configured once: at the top — the job title, stack, location, and 3–4 key requirements. Everything else is hidden behind "show more".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Standard view:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌──────────────────────────────────────────┐
│ Middle PHP Developer                     │
│                                          │
│ About TechCorp: we are a leading,        │
│ fast-growing, dynamic team ...           │
│                                          │
│ Responsibilities:                        │
│   • Develop and maintain services        │
│   • Take part in code reviews            │
│   • ...                                  │
│                                          │
│ Requirements:                            │
│   • 3+ years of experience               │
│   • PHP 8, Laravel                       │
│   • ...                                  │
│                                          │
│ We offer: snacks, health insurance, ...  │
│ Contact: hr@example.com                  │
└──────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Adapted view:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌──────────────────────────────────────────┐
│ Middle PHP Developer                     │
│                                          │
│ Stack:         PHP 8, Laravel, MySQL     │
│ Location:      Chișinău, hybrid          │
│ Requirements:  3+ years, ORM, Docker     │
│                                          │
│ [show more]                              │
└──────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the shallow view — here the LLM mostly repackages structure. The more complex case — template caching, cost, and protection of critical information — is covered below in the real estate example.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. When does the LLM actually run? (not on every page load)
&lt;/h2&gt;

&lt;p&gt;If the LLM had to be called on every page render, an adaptive interface would be both expensive and slow. But that's not required: the LLM is called &lt;strong&gt;once&lt;/strong&gt; — when a template is created for a user or cohort. After that, pages are assembled from that template via ordinary rendering, with no model involved.&lt;/p&gt;

&lt;p&gt;There are two modes, differing in who initiates generation and when it happens:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Who initiates&lt;/th&gt;
&lt;th&gt;When it's generated&lt;/th&gt;
&lt;th&gt;Where it's stored&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Individual&lt;/td&gt;
&lt;td&gt;User (via settings)&lt;/td&gt;
&lt;td&gt;Once at runtime, the moment settings are saved&lt;/td&gt;
&lt;td&gt;In the user's profile&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cohort&lt;/td&gt;
&lt;td&gt;Administrator&lt;/td&gt;
&lt;td&gt;Once at build-time (or on a schedule)&lt;/td&gt;
&lt;td&gt;As part of the build or in the CDN&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;What exactly gets stored as "the template"&lt;/strong&gt; depends on the mode:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the individual case — a JSON description of the blocks: their order, visibility, and styles. This format is safe (arbitrary markup can't break the site) and compact.&lt;/li&gt;
&lt;li&gt;In the cohort case — ready-made component code, which the administrator reviews before deployment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Invalidation.&lt;/strong&gt; When the data schema changes (e.g. a field is added or renamed), previously generated templates no longer match reality — they need to be invalidated and regenerated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two-level cache.&lt;/strong&gt; In some cases the LLM is needed not only for the template but for the content itself — for example, if the template calls for a shortened version of the description, someone has to produce that shortened version too. This is solved with a second level of cache:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Level one — the template, keyed by &lt;code&gt;(user)&lt;/code&gt; or &lt;code&gt;(cohort)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Level two — the rewritten content, keyed by &lt;code&gt;(object, style)&lt;/code&gt;. The shortened description of apartment #42 in the "under 200 characters" style is generated once and reused for all users who chose that style.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This turns "LLM per request" into "LLM once per unique object-and-style pair".&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Full walkthrough: adapting a real estate listing
&lt;/h2&gt;

&lt;p&gt;Let's walk through the mechanics on a concrete example — the apartment page on a real estate site. Each user here has their own priorities: some care about furniture, others about the neighborhood, others about the building itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.1. The settings interface
&lt;/h3&gt;

&lt;p&gt;The account settings have a free-form input field: the user describes in their own words what matters to them.&lt;/p&gt;

&lt;p&gt;Example input:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"I want to see photos and furniture right away. Keep the description short, no fluff. Move building info to the very bottom — it's not important to me."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Free-form input is convenient because the user isn't boxed in by toggles and checkboxes — they just say what they want, the way they'd say it to a friend.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.2. What the LLM does
&lt;/h3&gt;

&lt;p&gt;The LLM turns this text into a JSON template — a structured description of the page: which blocks to show, in what order, with what settings.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"blocks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"gallery"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nl"&gt;"order"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"style"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"detailed"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"furniture"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="nl"&gt;"order"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"style"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"detailed"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"order"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"style"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"short"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"maxLength"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"building"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nl"&gt;"order"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"style"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"compact"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"furniture_priority"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"fridge"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"dishwasher"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"conditioner"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The template is stored in the user's profile and used to render every apartment page they open.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.3. Consistency
&lt;/h3&gt;

&lt;p&gt;The template is generated once and stays stable between visits. The user gets used to the block layout on the page and finds what they need faster: where the furniture is, where the description is, where the contacts are.&lt;/p&gt;

&lt;p&gt;The template is only regenerated when the user re-saves their settings. No unexpected interface changes between visits, no "magical" reshuffling of the page.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.4. Cost and latency
&lt;/h3&gt;

&lt;p&gt;Generating a template is a single LLM call. Let's ballpark the scale:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Latency.&lt;/strong&gt; A request returning a couple hundred tokens takes 1–3 seconds on modern models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost.&lt;/strong&gt; At current prices, one such request runs about $0.001–0.01 depending on the model (cheaper for lighter models, more expensive for stronger ones). This is an order-of-magnitude estimate, not a precise quote — the real numbers depend on the model and prompt size.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frequency.&lt;/strong&gt; A real user re-tunes their preferences rarely — say, up to ten times a year. That puts the annual cost of templates for 1M active users at roughly $10K–$100K in total — not per request.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Subsequent page renders run as usual, with no LLM involved: the server fetches the template from the profile and plugs in the data for the specific apartment. The model is not touched on each request.&lt;/p&gt;

&lt;p&gt;When saving settings, the user sees a brief "preparing your view…" spinner for a couple of seconds — a one-off wait, not a delay on every page load.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On shortened descriptions.&lt;/strong&gt; If the template says &lt;code&gt;"style": "short"&lt;/code&gt;, then at render time someone has to compress the original description text. That's another LLM call, but it's cached by the &lt;code&gt;(apartment, style)&lt;/code&gt; pair and reused across all users with that style. For 10,000 apartments and 3 popular shortening styles, that's 30,000 calls total — once per pair, not millions per day.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.5. Protecting critical information
&lt;/h3&gt;

&lt;p&gt;While "simplifying" the page, the LLM could drop something important: the price, contacts, a deposit. Two mechanisms guard against that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Required blocks.&lt;/strong&gt; The site developer defines a list of blocks the LLM is not allowed to hide. For apartments, that's the price, address, and contacts. The LLM may reorder them but can't remove them. A template that violates this rule is rejected — the default is used instead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Show original" toggle.&lt;/strong&gt; Every adapted page offers a one-click return to the full original version. If the user feels the shortened version missed something, or simply wants to see everything as-is, a single click restores the standard page.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.6. Who pays for this
&lt;/h3&gt;

&lt;p&gt;The LLM costs are borne by the site owner — as part of infrastructure or marketing spend, not a charge to the user. The $10K–$100K per million active users per year mentioned above is in the same ballpark as a single marketing campaign. If the adaptation lifts conversion or retention by even a few percent, the investment pays for itself many times over. The economics work like any other UX investment; the difference is that the effect comes not from a one-off redesign but from continuous tuning to specific users.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Where to put the adaptation logic: site, proxy, extension, browser
&lt;/h2&gt;

&lt;p&gt;By now it's clear &lt;em&gt;what&lt;/em&gt; is adapted and &lt;em&gt;how&lt;/em&gt; it's stored. The remaining question: &lt;em&gt;where&lt;/em&gt; does the adaptation logic live? There are several options, differing in who controls the adaptation and how many sites it works on.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;Who controls&lt;/th&gt;
&lt;th&gt;Scope&lt;/th&gt;
&lt;th&gt;What the user does&lt;/th&gt;
&lt;th&gt;How it's integrated&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Site-level&lt;/td&gt;
&lt;td&gt;Site owner&lt;/td&gt;
&lt;td&gt;One site&lt;/td&gt;
&lt;td&gt;Nothing&lt;/td&gt;
&lt;td&gt;Part of the site's code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Proxy&lt;/td&gt;
&lt;td&gt;Site owner or third party&lt;/td&gt;
&lt;td&gt;Sites using the proxy&lt;/td&gt;
&lt;td&gt;Nothing&lt;/td&gt;
&lt;td&gt;Between the site and the user&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Browser extension&lt;/td&gt;
&lt;td&gt;User&lt;/td&gt;
&lt;td&gt;All sites&lt;/td&gt;
&lt;td&gt;Installs an extension&lt;/td&gt;
&lt;td&gt;Browser plugin&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI browser&lt;/td&gt;
&lt;td&gt;User&lt;/td&gt;
&lt;td&gt;All sites&lt;/td&gt;
&lt;td&gt;Switches browsers&lt;/td&gt;
&lt;td&gt;Built into the browser&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The two axes here are &lt;em&gt;who initiates the adaptation&lt;/em&gt; and &lt;em&gt;how many sites it works on&lt;/em&gt;. Site-level and proxy solve the problem on the site owner's side; extensions and AI browsers solve it on the user's side, on top of any site.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Use cases: e-commerce, news, recipes, real estate
&lt;/h2&gt;

&lt;p&gt;An adaptive interface isn't a single feature but an approach that shows up differently across domains. Below are a few scenarios, each highlighting a different facet of the idea.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.1. E-commerce — cohort approach
&lt;/h3&gt;

&lt;p&gt;In e-commerce it makes sense to split users into cohorts and generate a dedicated version of the page for each one. For seniors — larger font and only the essential information; for power users — detailed specs and comparison with alternatives; for beginners — simpler wording and more explanation.&lt;/p&gt;

&lt;p&gt;Generation happens at build-time: the administrator gives the LLM requirements for each cohort, the model produces page versions, and the administrator reviews the results before deploying. At runtime the user simply gets the version that fits them — no LLM calls required.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.2. News — where an LLM is indispensable
&lt;/h3&gt;

&lt;p&gt;In the earlier examples (real estate, jobs), the LLM mostly repackaged structure — reordered blocks, hid unneeded ones, sometimes shortened text. That kind of work can be approximated without a language model, e.g. through drag-and-drop settings.&lt;/p&gt;

&lt;p&gt;News is different. The content itself &lt;em&gt;is&lt;/em&gt; the product of the page, and it can't simply be "rearranged" — it needs to be understood, reassembled, and enriched. Here are three scenarios where only an LLM handles the job:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A knowledge graph from an article.&lt;/strong&gt; An article about a central bank rate hike contains dozens of entities: people, organizations, events, concepts. The LLM extracts them along with their connections and displays them as a graph — click a node and a card expands. A template can't do this: each article's graph is unique and is built from the article's own content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adaptive depth of context.&lt;/strong&gt; A novice reader going through an article about the central bank rate doesn't always understand the terminology. The LLM sees their level of knowledge and adds inline explanations: "the key rate is…", "the previous hike was on…". An expert doesn't see those callouts, but does see an expanded "related regulator decisions" section. This only works as a content-level transformation tied to the specific article.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-source synthesis.&lt;/strong&gt; An aggregator has five articles about the same event from different outlets. The LLM assembles a synthesis: "all of them agree on X; source A claims Y, B contradicts it; only C has the unique detail Z." The result is a new artifact that doesn't exist in the database — it comes into being only after the LLM builds it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  8.3. Recipe site — different users, different interests
&lt;/h3&gt;

&lt;p&gt;The same recipe page can be shown differently depending on who is reading it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A vegetarian&lt;/strong&gt; — sees at a glance whether the dish fits them, and alternatives for meat ingredients.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A diabetic&lt;/strong&gt; — carbs, glycemic index, and calories are pulled to the top; the recipe itself is below.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A beginner cook&lt;/strong&gt; — photos of each step, technique explanations, a timer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An experienced cook&lt;/strong&gt; — only the ingredient list and a short description of the technique.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A parent with a child&lt;/strong&gt; — allergens and cooking time on top, everything else secondary.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Same page — five different first screens. The example makes it clear that "one page for everyone" isn't a technological inevitability but a simplification that can be dropped.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.4. Real Estate
&lt;/h3&gt;

&lt;p&gt;Already covered in detail in Section 6: prioritizing blocks from the user's free-form intent, shortened descriptions, and protection of required fields like price and contacts.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.5. Language adaptation and multilingualism
&lt;/h3&gt;

&lt;p&gt;Choosing a language and style of presentation is a special case of the same idea. A standard translation works bluntly: the same text is translated once and shown identically to every speaker of that language. With an LLM you can adapt not just the language but also the style, density, and tone — to a specific reader.&lt;/p&gt;

&lt;p&gt;A few examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For a young reader — shorter sentences, modern vocabulary.&lt;/li&gt;
&lt;li&gt;For an older reader — a more formal and detailed tone.&lt;/li&gt;
&lt;li&gt;For a foreigner learning the language — simplified grammar and explanations of complex terms.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From the same database you get several versions of the text. Each is generated once and cached by the &lt;code&gt;(object, style+language)&lt;/code&gt; pair — following the same pattern as the shortened descriptions in Section 6.4.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.6. Where adaptation doesn't belong
&lt;/h3&gt;

&lt;p&gt;Adaptive interfaces work well where a page is overloaded and different users have different priorities. But there are contexts where adaptation is more likely to do harm than good:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Legal and medical documents.&lt;/strong&gt; The exact wording of a contract, insurance terms, a prescription, an informed consent form — these are the law or a protocol, letter by letter. Any "simplification" by an LLM is unacceptable here. At most, it makes sense to show a plain-language retelling alongside — never in place of — the original.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Financial and payment interfaces.&lt;/strong&gt; Account numbers, bank details, transfer amounts, confirmation codes — every single character matters. An LLM mistake here costs money, not just inconvenience.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pages with nothing superfluous.&lt;/strong&gt; If a page is already minimal (a login form, a single button, a short card), there's nothing to adapt — and trying will create chaos where everything was already clear.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Complex tools with a well-established interface.&lt;/strong&gt; Control panels, code editors, accounting software — users spent weeks memorizing where every button is. Automatically restructuring such an interface is a productivity loss, not a win.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The rule is simple: adaptation belongs where the cost of error is low and users have different priorities. Where the cost of error is high, or the interface is already well-learned, it's better to leave things alone.&lt;/p&gt;




&lt;h2&gt;
  
  
  9. A working Django + OpenAI prototype
&lt;/h2&gt;

&lt;p&gt;To validate the approach beyond diagrams, I built a small working prototype — a recipe site where a logged-in user can adjust the block priority right on the recipe page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What the user sees.&lt;/strong&gt; The recipe page shows seven blocks in a default order: photos, timing, ingredients, instructions, nutrition, allergens, chef's tips. Above the blocks sits an adaptation panel asking &lt;em&gt;"What matters to you in a recipe?"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnbp6kp9akptxpau1ldn9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnbp6kp9akptxpau1ldn9.png" alt="Default recipe page layout before AI-driven block reordering" width="800" height="735"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Default view — photos on top, everything else in standard order.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The user types their intent in plain language, hits &lt;strong&gt;Apply&lt;/strong&gt;, and the blocks reorder live — no page reload. Two buttons appear: &lt;strong&gt;Accept&lt;/strong&gt; saves the order to the user's profile so every other recipe opens with the same layout; &lt;strong&gt;Revert&lt;/strong&gt; restores the default.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F70rkl9v22dmnrvhckzqh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F70rkl9v22dmnrvhckzqh.png" alt="Recipe page after AI-driven adaptation — chef's tips moved to the top" width="800" height="736"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;After applying "Tips should be at the first stage. The rest as before" — chef's tips moves to the top; the rest stays in order.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it works under the hood.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stack:&lt;/strong&gt; Django + Django templates + vanilla JavaScript. OpenAI API (&lt;code&gt;gpt-4o-mini&lt;/code&gt;) turns the free-form text into a block order.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Template format:&lt;/strong&gt; just a JSON array of block IDs in the desired order. Any ID not in the array is hidden. No styles, no extra metadata — the minimum that still lets the user express priority.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage:&lt;/strong&gt; the array lives in a &lt;code&gt;UserTemplate&lt;/code&gt; model, one-to-one with the user.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safety:&lt;/strong&gt; the backend filters the LLM's response against an allowlist of seven known block IDs, so the model can't inject anything unexpected.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost:&lt;/strong&gt; the LLM is only called when the user hits &lt;strong&gt;Apply&lt;/strong&gt;. Every subsequent page render is a regular Django server render, with no LLM involved.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What this confirmed.&lt;/strong&gt; The prototype reproduces the core mechanic from this article end-to-end with minimal tooling. Three concrete observations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A plain-language prompt from the user reliably turns into a correct block order. If the model returns something unexpected, the allowlist filters it out.&lt;/li&gt;
&lt;li&gt;The LLM only runs when the user clicks &lt;strong&gt;Apply&lt;/strong&gt;. Users who don't change anything cost nothing.&lt;/li&gt;
&lt;li&gt;The feature feels like a normal preference setting, not like "the AI took over the page" — which matters for trust and consistency.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  10. Conclusion
&lt;/h2&gt;

&lt;p&gt;The web page is no longer a static artifact. The same data can now be delivered to each user or cohort in the form most convenient for them — and sometimes with additional information that wasn't in the source data at all.&lt;/p&gt;

&lt;p&gt;What makes this realistic in practice is how the LLM's work is distributed. The model is only invoked when preferences change or a cohort is rebuilt; templates and rewritten content are cached; the per-page render delay stays at zero; cost stays bounded. The risk of losing something important is covered by two simple mechanisms: required blocks and the "Show original" toggle.&lt;/p&gt;

&lt;p&gt;The next step is not to rewrite your whole site, but to pick a single page type (a product card, an apartment, a job listing, an article) and adapt it to specific users. That's enough to see whether the approach works in your product.&lt;/p&gt;




&lt;h2&gt;
  
  
  11. Limitations: accessibility, privacy, testing
&lt;/h2&gt;

&lt;p&gt;This article describes the approach but doesn't close every question that comes up when you try to implement it. Five questions worth thinking through before you build on the idea:&lt;/p&gt;

&lt;h3&gt;
  
  
  Does this break accessibility?
&lt;/h3&gt;

&lt;p&gt;It can. Automatically regenerated markup can break screen readers (used, for example, by blind users) and other assistive technologies. You have to explicitly make sure headings, buttons, and element order stay correctly marked up — otherwise "interface improvement" turns into an accessibility regression.&lt;/p&gt;

&lt;h3&gt;
  
  
  What about user privacy?
&lt;/h3&gt;

&lt;p&gt;To adapt the page, data about the user's preferences and behavior ends up in the LLM. You have to decide upfront what the user consents to, which data goes out, and how long the results are stored — in many countries this is regulated by personal-data protection laws.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do you A/B test an adaptive page?
&lt;/h3&gt;

&lt;p&gt;Classical A/B testing is complicated by the fact that each user sees their own version of the page. You need cohort-level metrics and an explicit feedback signal — for example, the share of "Show original" clicks as an indicator that the adaptation didn't fit.&lt;/p&gt;

&lt;h3&gt;
  
  
  What happens when the LLM fails?
&lt;/h3&gt;

&lt;p&gt;When generation fails or the model is unavailable, the system has to fall back to the default version cleanly, with no visible glitches for the user.&lt;/p&gt;

&lt;h3&gt;
  
  
  How is this different from reader modes and personalization engines?
&lt;/h3&gt;

&lt;p&gt;The idea overlaps with browser reader modes, on-site personalization systems, interface-simplifier extensions, and the recent wave of AI-driven generative interfaces. A serious product built on this idea has to show honestly how it differs and where it wins.&lt;/p&gt;




&lt;p&gt;None of these questions invalidates the approach — but each needs separate work before the idea turns from a concept into a real product.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>ux</category>
      <category>ui</category>
    </item>
  </channel>
</rss>
