<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Lorentz Yeung on Medium]]></title>
        <description><![CDATA[Stories by Lorentz Yeung on Medium]]></description>
        <link>https://medium.com/@entzyeung?source=rss-fd48b1922412------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*UF4nUNJ1LFtsVgBw3yPqxA.jpeg</url>
            <title>Stories by Lorentz Yeung on Medium</title>
            <link>https://medium.com/@entzyeung?source=rss-fd48b1922412------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 06:01:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@entzyeung/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[My System Beats Claude Sonnet 4.6 on Accuracy. Here’s the Story.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://aiadvances.org/my-system-beats-claude-sonnet-4-6-on-accuracy-heres-the-story-0cb339bc64aa?source=rss-fd48b1922412------2"><img src="https://cdn-images-1.medium.com/max/1360/1*bRFqdNGw4RkAjPwehizDww.png" width="1360"></a></p><p class="medium-feed-snippet">What a live data pipeline does that raw prompting can&#x2019;t &#x2014; verified against HM Land Registry.</p><p class="medium-feed-link"><a href="https://aiadvances.org/my-system-beats-claude-sonnet-4-6-on-accuracy-heres-the-story-0cb339bc64aa?source=rss-fd48b1922412------2">Continue reading on AI Advances »</a></p></div>]]></description>
            <link>https://aiadvances.org/my-system-beats-claude-sonnet-4-6-on-accuracy-heres-the-story-0cb339bc64aa?source=rss-fd48b1922412------2</link>
            <guid isPermaLink="false">https://medium.com/p/0cb339bc64aa</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[hallucinations]]></category>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[london]]></category>
            <dc:creator><![CDATA[Lorentz Yeung]]></dc:creator>
            <pubDate>Sun, 19 Apr 2026 12:48:38 GMT</pubDate>
            <atom:updated>2026-04-20T07:06:49.247Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[2026 Review: Analyzing London’s Two-Speed Market Through Lens of 2025 Data]]></title>
            <link>https://entzyeung.medium.com/2026-review-analyzing-londons-two-speed-market-through-lens-of-2025-data-d5d0268c0eb0?source=rss-fd48b1922412------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5d0268c0eb0</guid>
            <category><![CDATA[london-property-search]]></category>
            <category><![CDATA[rental-property]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[london]]></category>
            <dc:creator><![CDATA[Lorentz Yeung]]></dc:creator>
            <pubDate>Thu, 16 Apr 2026 23:55:32 GMT</pubDate>
            <atom:updated>2026-04-16T23:55:32.361Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="London’s Two-Speed Market: What the 2025 Data Actually Shows" src="https://cdn-images-1.medium.com/max/1024/1*DHUVQxnlzzWCZ1niUSOnVw.jpeg" /><figcaption>2026 Review: Analyzing London’s Two-Speed Market Through Lens of 2025 Data</figcaption></figure><p>The headline median barely moved — but beneath it, outer London surged while prime central London fell sharply. Here is what the official Land Registry numbers actually say.</p><p>The headline for 2025 is easy to write: London’s median sale price came in at £507,000, barely changed from £510,000 the year before. Flat. Quiet. Not much to see here.</p><p>That reading is wrong. Beneath the aggregate number sit four distinct stories — none of which the median tells on its own.</p><h3>A market still finding its footing</h3><p>London recorded <strong>87,589 completed sales in 2025</strong>, the lowest annual volume since at least 2018, excluding the COVID-affected 2020. The post-rate-rise slowdown that started in 2023 has not reversed. Buyers are still cautious, chains are still slow, and transaction count is the clearest signal of underlying confidence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*er-Gns1aL_N3F54zRF2d5g.jpeg" /><figcaption>A market still finding its footing</figcaption></figure><p>Volume in 2025 was 39% below the 2021 peak. The brief recovery in 2024 has reversed. For sellers, this matters more than the median: in a thin market, properties take longer to find buyers and price discovery is noisier.</p><p>Going back five years, the nominal five-year gain is roughly 5.5% — just over 1% per year. Well below inflation over the same period. In real terms, London buyers have been paying more pounds for less purchasing power.</p><h3>Outer and inner London are not the same market</h3><p>The flat aggregate conceals a sharp geographic split. Outer and outer-south London boroughs have been quietly rising. Prime central London has been correcting — and not modestly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ggJ4-R5VMaqvsWXhPH0Zg.jpeg" /><figcaption><strong>Boroughs with the largest gains and the sharpest falls (2024 → 2025)</strong></figcaption></figure><p>Kensington &amp; Chelsea dropped £150,000 in median terms in a single year. Bromley rose £30,000. These are not minor fluctuations around a common trend — they represent structurally different dynamics playing out simultaneously within the same city boundary.</p><p>The pattern is consistent with what has been visible since 2022: buyers priced out of inner London have shifted demand to well-connected outer boroughs with good schools and faster commutes. Meanwhile, the top end of the market is facing a combination of higher borrowing costs, stamp duty drag at high values,¹ and continued softness in international demand for trophy assets.</p><p>The two-speed split is not a blip. It has been building for three years. The 2025 data is its clearest expression yet.</p><h3>Buying a flat in London has been a losing trade</h3><p>The property type split over five years is unambiguous — and consequential for anyone making a buying decision today.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8I0pWGRJ1aiEybV7mEE8KQ.jpeg" /><figcaption>Buying a flat in London has been a losing trade</figcaption></figure><p>Flat prices have <strong>fallen</strong> over five years — from £435,500 in 2020 to £420,000 in 2025, a drop of 3.6% in nominal terms, and considerably worse in real terms once inflation is accounted for.</p><p>Terraced houses went in the other direction: from £500,000 in 2020 to £562,500 in 2025, a gain of 12.5% in nominal terms. Semi-detached (£615,000) and detached (£865,000) are up similarly.</p><p>The gap between flats and houses has widened significantly since 2020. There is no single cause. Service charge uncertainty, ongoing cladding remediation costs,² the long tail of leasehold reform anxiety,³ and changing preferences for outdoor space since the pandemic are all plausible contributors. What is clear is that the flat market and the house market are no longer moving together — and have not been for several years.</p><p>For a buyer choosing between a flat and a terraced house at similar price points, the five-year return differential is roughly 16 percentage points in nominal terms. That is the cost of compromising on property type.</p><h3>The new-build premium has vanished</h3><p>For most of the past decade, new-build properties in London commanded a meaningful premium over resale — typically 20–30%.⁴ In 2025, that premium has essentially disappeared.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lYi3sjaJXh1svxHzCFuC5g.jpeg" /><figcaption>The new-build premium has vanished</figcaption></figure><p>New builds sold for a median of £505,000 — fractionally below the resale median of £507,500. New builds represent just 3.4% of total transactions, so the sample is relatively thin and a single development skewing the mix can move the number. But the historical premium that used to be the default assumption for off-plan buyers has clearly compressed.</p><p>Developer incentives partly explain this: stamp duty contributions and furniture packages reduce the effective cost to the buyer without reducing the registered completion price.⁵ There is also a timing effect: many 2025 completions were contracted in 2022–2023, when developers were pricing more aggressively to shift units in a slowing market.</p><p>For buyers, the practical implication is that the traditional objection to new-build — paying over the odds — is weaker than it was three years ago. Whether that reflects genuine value or a market in distress is a question each buyer has to answer for their specific development.</p><h3>What the numbers add up to</h3><p>Four distinct findings from one year of official data:</p><ol><li><strong>Transaction volume is still depressed.</strong> The market is not frozen, but it is thin. Sellers who need to move are making concessions they would not have made in 2021.</li><li><strong>The geographic split is widening.</strong> Outer London boroughs — Bromley, Waltham Forest, Havering — are performing like a different asset class from Kensington, Westminster, and the City.</li><li><strong>Flats have underperformed houses for five consecutive years.</strong> The structural reasons show no sign of reversing quickly.</li><li><strong>New-build pricing has reset.</strong> The premium that once made off-plan buying feel expensive is gone, at least for now.</li></ol><p>None of this is visible in the headline median. That number — £507,000, fractionally below £510,000 — is accurate as a summary statistic and nearly useless as a guide to any specific decision. The London property market is not one market. It never was. But in 2025, the divergence between its parts is wider than it has been in years.</p><h3>Notes &amp; sources</h3><p>¹ <strong>Stamp duty at high values.</strong> The additional SDLT surcharge for properties above £1.5M has been in place since 2014 and was further tightened in the 2022 Autumn Statement. HMRC SDLT statistics confirm declining transaction volumes in the £1M+ band from 2022 onwards. Source: <a href="https://www.gov.uk/government/collections/stamp-duties-statistics">Stamp duties statistics — GOV.UK</a>.</p><p>² <strong>Cladding remediation.</strong> The Building Safety Act 2022 placed legal responsibility for remediation of unsafe cladding on developers and freeholders of buildings over 11 metres. Leaseholders in affected blocks face ongoing uncertainty over service charge costs and mortgage eligibility, even where the developer levy covers structural works. Source: <a href="https://www.legislation.gov.uk/ukpga/2022/30/contents">Building Safety Act 2022, HM Government</a>.</p><p>³ <strong>Leasehold reform anxiety.</strong> The Leasehold and Freehold Reform Act 2024 passed in May 2024, restricting new leasehold houses and making lease extension easier — but implementation timelines and ground rent rules remain subject to secondary legislation, leaving buyers uncertain about the future cost of their lease. Source: <a href="https://www.legislation.gov.uk/ukpga/2024/22/contents">Leasehold and Freehold Reform Act 2024, HM Government</a>.</p><p>⁴ <strong>Historical new-build premium of 20–30%.</strong> This range is widely cited in residential market research. Nationwide Building Society’s house price data and Savills’ residential development research both document a consistent new-build premium over equivalent resale properties in London from 2010 to 2021. Sources: <a href="https://www.nationwide.co.uk/house-price-index/">Nationwide House Price Index</a>; Savills UK Residential Development research (published annually).</p><p>⁵ <strong>Developer incentives and registered sale prices.</strong> RICS guidance for surveyors (RICS Valuation — Global Standards, UK national supplement) requires that developer incentives such as cashback, stamp duty paid, and furniture packages be disclosed and deducted from the assessed market value, precisely because they do not reduce the price registered at the Land Registry. This gap between registered price and true economic cost is a known limitation of the Land Registry dataset for new-build comparisons. Source: <a href="https://www.rics.org/profession-standards/rics-standards-and-guidance/sector-standards/valuation-standards/residential-valuations">RICS Residential Valuations standards</a>.</p><p><em>All figures are drawn from HM Land Registry Price Paid Data (Crown copyright, OGL v3.0), covering completed residential transactions in Greater London. Figures include both standard (PPD category A) and additional (PPD category B) transactions, consistent with the complete public record.</em></p><p>Original article was published in <a href="https://openprop.co.uk/">OpenProp</a>: <a href="https://openprop.co.uk/articles/london-property-2025-two-speed-market">London’s Two-Speed Market: What the 2025 Data Actually Shows · OpenProp Insights</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5d0268c0eb0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In 2026, How We Researched London’s 2025 Property Market — And How You Can Too]]></title>
            <link>https://entzyeung.medium.com/in-2026-how-we-researched-londons-2025-property-market-and-how-you-can-too-e04211b127ca?source=rss-fd48b1922412------2</link>
            <guid isPermaLink="false">https://medium.com/p/e04211b127ca</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[london]]></category>
            <category><![CDATA[london-rental-apartments]]></category>
            <category><![CDATA[london-property]]></category>
            <category><![CDATA[data-analyst]]></category>
            <dc:creator><![CDATA[Lorentz Yeung]]></dc:creator>
            <pubDate>Thu, 16 Apr 2026 23:04:24 GMT</pubDate>
            <atom:updated>2026-04-16T23:04:24.915Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AxnJddZEmeCTQVeI-MYeyw.jpeg" /><figcaption>In 2026, How We Researched London’s 2025 Property Market — And How You Can Too</figcaption></figure><p>In 2026 April, we published <a href="https://openprop.co.uk/articles/london-property-2025-two-speed-market.html">London’s Two-Speed Market: What the 2025 Data Actually Shows</a> — an analysis of what really happened to London property prices in 2025 full year, beneath the flat headline median.</p><p>Every number in that article came from five queries to OpenProp. No spreadsheets. No data downloads. No prior knowledge of the dataset.</p><p>This guide shows you exactly what we asked, what came back, and how we read the results — so you can replicate the analysis yourself, or run the same structure against a different borough, a different year, or a different question entirely.</p><h3>Query 1 — Set the baseline: what did the London market actually do?</h3><p><strong>WHAT WE ASKED</strong></p><p><em>What was the median property price in London in 2025, and how does it compare to the last five years?</em></p><p><strong>What came back:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*erXVu8Sqen3XVTZsrQkW4A.jpeg" /><figcaption><em>What was the median property price in London in 2025, and how does it compare to the last five years?</em></figcaption></figure><p><strong>How we read it:</strong></p><p>Two numbers stood out immediately — not just the median, but the transaction count. The 2025 volume of 87,589 is the lowest in the dataset since 2018 (excluding 2020). That context matters: a falling volume in a flat-median market means the same price is being achieved with fewer buyers. Sellers are not gaining — they are holding on.</p><p>The five-year gain of roughly 5.5% nominal, against inflation well above that, frames the rest of the analysis: London buyers have been paying more in pounds for less in real terms.</p><p><strong>TRY IT YOURSELF</strong></p><p>In the AI analyst <a href="https://openprop.co.uk/">OpenProp</a>, swap “London” for any borough — “What was the median price in Islington in 2025, and how does it compare to the last five years?” The same table structure comes back, but for one borough. Run it for two boroughs side by side to see divergence at the local level.</p><h3>Query 2 — Find the geographic split: which boroughs moved?</h3><p><strong>WHAT WE ASKED</strong></p><p><em>Which London boroughs saw the biggest price growth in 2025 compared to 2024?</em></p><p><strong>What came back:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ek_a4Iqc6F9HnDSUk15CRQ.jpeg" /><figcaption>A full ranked table of all 33 boroughs.</figcaption></figure><p><strong>How we read it:</strong></p><p>The pattern was immediate: every borough in the top five is outer London or outer-south London. Every borough in the bottom five is prime central. That is not noise — it is a structural divergence that has been building since 2022 and reached its clearest expression in 2025.</p><p>Kensington &amp; Chelsea falling £150,000 in a single year while Bromley rises £30,000 is not two boroughs having a bad or good year. It is two entirely different markets operating under different demand conditions, sitting inside the same city boundary.</p><p><strong>TRY IT YOURSELF</strong></p><p>In the AI analyst <a href="https://openprop.co.uk/">OpenProp</a>, you can ask the same question for a longer window — “Which London boroughs saw the biggest price growth over the last three years?” — to see whether the 2025 pattern is a one-year event or a sustained trend. (Spoiler: it is sustained.)</p><h3>Query 3 — Break down by property type: the flat vs house story</h3><p><strong>WHAT WE ASKED</strong></p><p><em>Compare median flat prices versus terraced house prices in London from 2020 to 2025.</em></p><p><strong>What came back:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*esuCknRM_fxmzIKBrPJ4yA.jpeg" /><figcaption><em>Compare median flat prices versus terraced house prices in London from 2020 to 2025.</em></figcaption></figure><p><strong>How we read it:</strong></p><p>This was the sharpest finding in the entire analysis. Flat prices in London have fallen 3.6% in nominal terms over five years — in a period with significant inflation, the real loss is considerably larger. Terraced houses rose 12.5% over the same period.</p><p>A 16 percentage point gap between two property types in the same city, over five years, is structural — not a blip. Service charge uncertainty, cladding remediation, and leasehold reform anxiety are all in the picture. Whatever the cause, the divergence is clear in the official transaction record.</p><p><strong>TRY IT YOURSELF</strong></p><p>In the AI analyst <a href="https://openprop.co.uk/">OpenProp</a>, Run the same query for a single borough — “Compare flat prices versus terraced house prices in Hackney from 2020 to 2025.” You may find the flat discount is larger or smaller in different boroughs. Areas with a high proportion of post-2000 new-build flats tend to show the steepest divergence.</p><h3>Query 4 — Test a common assumption: has the new-build premium survived?</h3><p>WHAT WE ASKED</p><p><em>Compare new build vs resale prices in London in 2025.</em></p><p><strong>What came back:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pvRLam89Lg6qMPX0fTjmtw.jpeg" /><figcaption><em>Compare new build vs resale prices in London in 2025</em></figcaption></figure><p><strong>How we read it:</strong></p><p>The new-build median came in fractionally <em>below</em> resale — the opposite of the historical norm, where new builds typically commanded a 20–30% premium. Two caveats are worth noting: new builds are only 3.4% of total transactions, so the sample is thin; and developer incentives (stamp duty contributions, furniture packages) reduce the effective cost to buyers without reducing the registered price.</p><p>But the direction is clear. For buyers, the traditional objection to new-build — paying a significant premium over equivalent resale — is weaker than it has been in years.</p><p><strong>TRY IT YOURSELF</strong></p><p>In the AI analyst <a href="https://openprop.co.uk/">OpenProp</a>, ask the same question for a specific borough with active development — “Compare new build vs resale prices in Tower Hamlets in 2025.” Boroughs with large new-build pipelines often show more interesting splits than the London-wide average.</p><h3>Query 5 — Cross-check the volume story for a specific borough</h3><p>One extra query we ran that did not make it into the published article — checking whether the volume decline was uniform or concentrated:</p><p><strong>WHAT WE ASKED</strong></p><p><em>How many properties sold in Kensington and Chelsea each year from 2018 to 2025?</em></p><p><strong>What came back:</strong></p><p>A year-by-year count showing that transaction volume in Kensington &amp; Chelsea fell sharply from 2022 onwards — much more steeply than the London-wide decline. A falling median in a thin market is a different signal from a falling median in an active one. In K&amp;C, the price falls are happening on lower and lower volumes, which makes them harder to reverse quickly.</p><p><strong>TRY IT YOURSELF</strong></p><p>In the AI analyst <a href="https://openprop.co.uk/">OpenProp</a>, Run this volume check for any borough before drawing conclusions from its median trend. “How many properties sold in [borough] each year from 2018 to 2025?” costs one query and changes how you read everything else.</p><h3>The pattern behind all five queries</h3><p>Look at the structure:</p><ol><li><strong>Start London-wide</strong> — establish the baseline and the volume context.</li><li><strong>Find the geographic split</strong> — where is the market diverging?</li><li><strong>Find the property type split</strong> — what does your budget actually buy, and is it holding value?</li><li><strong>Test a specific assumption</strong> — new build premium, leasehold discount, postcode variation.</li><li><strong>Check volume alongside price</strong> — a median without a transaction count is an incomplete signal.</li></ol><p>That sequence works for any research question about the London market. You do not need five queries — even two or three, in the right order, produce something more grounded than any asking price or estate agent estimate.</p><p>All of it comes from the official Land Registry record. No models. No sentiment surveys. Just what buyers actually paid.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e04211b127ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Built My First OpenClaw App — And I Haven’t Opened My Inbox Since]]></title>
            <link>https://entzyeung.medium.com/i-built-my-first-openclaw-app-and-i-havent-opened-my-inbox-since-ccad04cdc1d8?source=rss-fd48b1922412------2</link>
            <guid isPermaLink="false">https://medium.com/p/ccad04cdc1d8</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[openclaw-skills]]></category>
            <category><![CDATA[email]]></category>
            <category><![CDATA[openclaw]]></category>
            <category><![CDATA[mac]]></category>
            <dc:creator><![CDATA[Lorentz Yeung]]></dc:creator>
            <pubDate>Thu, 19 Mar 2026 21:40:07 GMT</pubDate>
            <atom:updated>2026-03-19T21:40:07.434Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>A tiny email assistant that runs while you sleep, scores your emails, and drafts replies before you even pick up your phone.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P6MzQmLFwSjDTUc0JRFdOw.jpeg" /><figcaption>My OpenClaw skill identified the email from Ollama as low priority email. It still notified me, though no draft will be provided, because it assumes we basically won’t reply with this kind of emails. Picture by the Author.</figcaption></figure><p>I have a problem with email.</p><p>Not the volume — I can handle volume. The problem is the <em>*switching*</em>. I’ll be deep in work, and a notification pulls me into my inbox. Twenty minutes later I’m replying to a GitHub notification I didn’t need to reply to, and whatever I was building is gone from my head.</p><p>I wanted something that watched my inbox <em>*for*</em> me, figured out what actually needed my attention, and had a draft reply ready to go when I got there.</p><p>I didn’t want to pay for another SaaS tool. I didn’t want to pipe my email through some company’s servers. I just wanted a small, local thing that did exactly this and nothing else.</p><p>So I built it. It’s called <strong>**Email Checker**</strong>, and it’s my first app (or skill) published to ClawHub — the OpenClaw skill registry.</p><p>— -</p><h3><strong>What It Does</strong></h3><p>Every 15 minutes (or whatever interval you set), it:</p><p>1. Checks your Mail.app inbox via AppleScript</p><p>2. Scores every unread email <strong>**HIGH / MEDIUM / LOW**</strong> based on keywords and senders you trust</p><p>3. For <strong>**HIGH priority**</strong> emails only — fetches the full thread history and generates a draft reply using your local LLM</p><p>4. Emails you a formatted report with previews and drafts</p><p>5. Marks everything as read</p><p>That’s it. No cloud. No subscriptions. Runs entirely on your Mac.</p><p>— -</p><p><strong>## The Flow</strong></p><p>Here’s what actually happens under the hood:</p><pre>Cron fires (every N minutes)<br>│<br>▼<br>AppleScript fetches unread emails from Mail.app<br>│<br>├── No emails? → send empty report → done<br>│<br>└── For each email:<br>Score by keywords (urgent, approve, feedback…)<br>+ trusted sender boost<br>│<br>├── HIGH → fetch thread history → generate AI draft<br>├── MEDIUM → preview only<br>└── LOW → preview only<br>│<br>▼<br>Format report → send to your personal email<br>Mark inbox as read</pre><p>When a HIGH priority email comes in, the app fetches up to 10 prior messages in the same thread so the LLM has full context. The draft it generates isn’t a generic “Thanks for reaching out” — it actually knows what the conversation has been about.</p><p>— -</p><h3><strong>The Report</strong></h3><p>You get an email that looks like this:</p><pre>EMAIL CHECK REPORT - 2026–03–19 14:00<br>Total unread: 4<br><br>⚠️ HIGH PRIORITY<br> - - - - - - - - -<br>From: Alice Smith &lt;alice@company.com&gt;<br>Subject: Urgent: contract approval needed<br>Keywords triggered: urgent, approve<br><br>Preview:<br>Hi, we need your sign-off on the contract by EOD…<br><br>Draft Reply:<br>Hi Alice,<br>Happy to take a look - sending you feedback by 4pm.<br>Let me know if you need anything else before then.<br>MyBot 🤖<br><br>⚠️ MEDIUM PRIORITY<br> - - - - - - - - - -<br>From: newsletter@somesite.com<br>Subject: Your weekly digest<br>Preview: Here&#39;s what happened this week…<br><br>✅ LOW PRIORITY<br> - - - - - - - - <br>From: noreply@github.com<br>Subject: [repo] New issue opened</pre><p>I read this on my phone. If I like a draft, I tell my OpenClaw agent via Telegram: <em>*”Send the draft reply to Alice.”*</em> It fires `send_reply.py` and it’s done. I never opened my inbox.</p><p>— -</p><h3><strong>Why OpenClaw?</strong></h3><p>I’d been running OpenClaw as my always-on assistant for a while — it handles Telegram messages, runs scheduled tasks, manages my agent workspace. When I built this email checker, I realised it fit naturally into that ecosystem.</p><p>The whole setup — AppleScript for Mail.app access, Python for logic, a cron wrapper for scheduling — is exactly the kind of small, focused tool OpenClaw is designed around. Publish it to ClawHub, and anyone else running OpenClaw can install it in one command.</p><p>That felt worth sharing.</p><h3><strong>Setup in 3 Steps</strong></h3><p><strong>1. Clone and run the wizard</strong></p><pre>git clone https://github.com/entzclaw/email-checker-for-mac<br>cd email-checker-for-mac<br>bash setup.sh</pre><p>The wizard auto-discovers your Mail.app accounts, lets you pick an LLM provider (LM Studio, Ollama, OpenAI, or none), and asks how often you want it to run. It writes `config/settings.json` and installs the crontab. Takes about 2 minutes.</p><p><strong>2. Grant Mail.app permission</strong></p><pre>System Settings → Privacy &amp; Security → Automation<br>→ Allow Terminal to control Mail</pre><p><strong>3. Done</strong></p><p>The next time cron fires, you’ll get your first report.</p><p>— -</p><h3><strong>LLM Options</strong></h3><p>You’re not locked into any provider:</p><pre>|  Provider  |                Notes                |<br>| ---------- | ----------------------------------- |                 <br>| LM Studio  |     Local or remote - what I use    |<br>|   Ollama   |            Fully local              |<br>|   OpenAI   |        If you want GPT-4o drafts    |<br>|    None    | J. ust scoring and previews, no AI  |</pre><p>If you don’t have a local LLM running, <strong>none </strong>mode still gives you a prioritised inbox digest. The drafts are just blanked out.</p><p>— -</p><h3>What’s Next</h3><p>A few things I’m thinking about adding:</p><ul><li><strong>Reply approval flow </strong>— queue drafts for explicit approve/reject before sending</li><li><strong>Digest mode</strong> — one daily summary instead of every N minutes</li><li><strong>More priority signals</strong> — calendar events, CC patterns, sender history</li></ul><p>If you try it and have ideas, I’d love to hear them.</p><p>— -</p><h3><strong>Try It</strong></h3><p><strong>Install via ClawHub:</strong></p><pre>clawhub install email-checker-by-entzai</pre><p><strong>Or clone directly:</strong></p><pre>git clone https://github.com/entzclaw/email-checker-for-mac</pre><p>Full docs in the `docs/` folder — setup walkthrough, workflow diagram, and config reference.</p><p>This is the first thing I’ve published to ClawHub. Building small, local tools that do one thing well and compose with the rest of your setup is something I want to keep doing. If you’re using OpenClaw and building things too, I’d love to see what you’re working on.</p><p>— -</p><p><em>*Built with OpenClaw · Published on ClawHub · macOS only*</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ccad04cdc1d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Built an AI That Knows 16 Years of London Property Data — Free for You to Use]]></title>
            <link>https://entzyeung.medium.com/i-built-an-ai-that-knows-16-years-of-london-property-data-free-for-you-to-use-58169f568b13?source=rss-fd48b1922412------2</link>
            <guid isPermaLink="false">https://medium.com/p/58169f568b13</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[london-property-market]]></category>
            <category><![CDATA[official-data]]></category>
            <category><![CDATA[ai-analyst]]></category>
            <category><![CDATA[london-property-prices]]></category>
            <dc:creator><![CDATA[Lorentz Yeung]]></dc:creator>
            <pubDate>Thu, 19 Mar 2026 07:30:33 GMT</pubDate>
            <atom:updated>2026-04-17T20:07:27.881Z</atom:updated>
            <content:encoded><![CDATA[<h3>I Built an AI That Knows 16 Years of London Property Data — Free for You to Use</h3><p>If you are going to buy, or to rent a house or flat, or even going to invest, this AI Analyst is perfect for you. <a href="https://openprop.co.uk/">London Property Market Analyst — Free AI Tool | Entz AI</a></p><figure><img alt="https://uk-property-app.entzai.com/" src="https://cdn-images-1.medium.com/max/1024/1*i_esAZvR84hZJZagCfbyag.jpeg" /><figcaption>This is the demo UI as of 19 Mar 2026. Photo by the Author.</figcaption></figure><p>The question seemed simple enough.</p><p>“Which London borough has grown the most since 2020?”</p><p>I’d been asked it a dozen times — by friends buying flats, by colleagues debating where to invest, by journalists writing about the housing market. Every time, the honest answer was: I don’t know off the top of my head, but I could probably find out in about two hours of spreadsheet work.</p><p>That felt wrong. The data exists. It’s public. The government publishes every single residential property transaction in England and Wales. What was missing was a way to actually ask questions of it.</p><p>So I started building — and the project has been evolving with me ever since I arrived in London.</p><figure><img alt="The cover of the PDF reports I used published in a HKer’s community website." src="https://cdn-images-1.medium.com/max/1024/1*cw7nu6Y1oCT7yNexl8FN0g.jpeg" /><figcaption>The cover of the PDF reports I used published in a HKer’s community website. Photo by the author.</figcaption></figure><h3>The Evolution</h3><p>It began in 2021 as a modest Python automatic analyst script I wrote for myself and a small community forum. Quickly it grew into automatic PDF report generation — monthly insights that people could download and read.</p><p>Last year I took the time to revive and modernise everything: I turned it into a fully automatic end-to-end pipeline with daily monitoring of HM Land Registry updates, intelligent scraping, ETL transformations, archiving, and automatic publishing of both concise English/Chinese mini-reports and detailed full reports straight to GitHub.</p><p>Here is the link to my HM Land Registry <a href="https://www.kaggle.com/datasets/lorentzyeung/price-paid-data-202304">dataset</a>, the <a href="https://github.com/entzyeung/uk-property-analysis">monthly automatic published reports</a>, and the still going on <a href="https://github.com/entzyeung/uk-property-analysis/tree/main/mini-reports">mini-reports</a>.</p><p>And now it has taken the next natural step — becoming a self-sustaining conversational AI analyst that anyone can talk to. Ordinary people use the friendly UI; technicians use the API. Every answer comes with a chart, powered by 1.76 million (raw 32 millions) real London transactions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NSU0C4esaSBLZRQeQRAI0w.jpeg" /><figcaption>A screen capture of the app in action, with concise analyst on the right, and the chart on the left. Photo by the author.</figcaption></figure><h3>The Data</h3><p><a href="https://www.kaggle.com/datasets/lorentzyeung/price-paid-data-202304">HM Land Registry’s Price Paid dataset </a>is one of the most comprehensive property records in the UK. For this project I focused on London transactions from January 2010 onwards: approximately 1.76 million sales across all 33 boroughs. (I can definitely expand it to other regions, periods or functions in the future.)</p><p>The raw file is about 4–5 GB. Not something you query with a chatbot.</p><h3>The Architecture Problem</h3><p>The naive approach to “AI over tabular data” is to stuff your data into the context window and ask the LLM to reason over it. This fails at scale for two reasons:</p><ol><li>It doesn’t fit. Even GPT’s massive context window can’t hold 1.76 million rows.</li><li>LLMs are bad at maths. Ask GPT to compute a median from raw numbers and it will hallucinate confidently.</li></ol><p>The right approach is to use the LLM for what it’s actually good at — understanding natural language and writing clear prose — and handle the actual analytics with deterministic code.</p><p>Here’s the pipeline I built:</p><p><strong>Step 1: Triage (GPT)</strong><br>The user’s question is classified into one of the intents (price, affordability, volume, listing, or something else) and a structured parameter set is extracted: which borough or postcode, what property type, what time window, what metric.</p><p><strong>Step 2: Analytics (Python + Pandas)</strong><br>Pre-aggregated Parquet files (generated from the raw 4–5GB CSV) are queried in under 50ms. The result is a structured JSON.</p><p><strong>Step 3: Synthesis (GPT)</strong><br>The LLM receives the structured JSON and writes a clear, accurate prose answer. Hard rules in the prompt prevent it from inventing statistics or confusing partial-year data with complete-year figures.</p><p><strong>Step 4: Chart (Matplotlib)</strong><br>Ten chart types are available — line charts for trends, horizontal bar charts for borough rankings, stacked bars for affordability breakdowns, and more. Every answer gets a chart returned as a PNG.</p><p>This architecture builds directly on the automated pipeline I already had in place, so the data stays fresh every month without any manual effort.</p><h3>What It Actually Finds</h3><p>Some interesting results aren’t the ones you’d expect.</p><p><strong>**Lambeth peaked in 2020, not 2022.**</strong></p><p>Most London boroughs saw their mean prices peak around 2022. Lambeth peaked in 2020, at £815,086 — and has declined since. The reason: the COVID stamp duty holiday drew a surge of high-end buyers who’d been waiting, temporarily shifting Lambeth’s sales mix toward expensive properties.</p><p><strong>**Only 6.9% of London homes sold under £250k in 2025.**</strong></p><p>In 2013, that figure was over 23%. The collapse of the sub-£250k London market in a decade is one of the most significant affordability stories in modern British housing — and it’s almost entirely invisible in mainstream coverage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LHdEW_loo69Tt8Q5JyrWsg.jpeg" /><figcaption>Comparing and ranking by postcodes at the same time. Photo by the author.</figcaption></figure><h3>What It Can’t Do</h3><p>Honesty matters here.</p><p>It cannot tell you about individual properties, street-level prices, or anything that isn’t in the Land Registry data. It doesn’t know about rental prices, service charges, planning decisions, or school catchment areas.</p><p>It also can’t predict the future. It’s a historical data tool, not a crystal ball.</p><h3>Looking Ahead — Making It Sustainable</h3><p>I built this because I believe in contributing to the place I now call home. But I’m also realistic. While GPT tokens currently cost only about 1–2 cents per question, they could still become a stopper for everyday laymen users who just want quick, unbiased answers.</p><p>My sincere hope is to make the tool truly sustainable and completely free for everyone in the long run. It would be wonderful if government departments (like HM Land Registry or local councils), PropTech companies, or forward-thinking private-sector partners could get involved — perhaps through sponsorship, open-data grants, or hosting support. That way we could remove the API-key step entirely and open the doors even wider.</p><p>If you work in housing policy, data publishing, or simply care about making public data accessible, I’d be delighted to hear from you. Let’s talk.</p><h3>Try It</h3><p>The chatbot is free: <a href="https://openprop.co.uk/">London Property Market Analyst — Free AI Tool | Entz AI</a></p><p>You’ll need an OpenAI API key (platform.openai.com — free to create, each question costs about 1–2 cents).</p><h3>How to get your OpenAI API key</h3><ol><li>Go to <a href="https://platform.openai.com/"><strong>platform.openai.com</strong></a> and sign in (or create a free account).</li><li>Click your profile icon (top-right) → <strong>Your profile</strong> → <a href="https://platform.openai.com/api-keys"><strong>API keys</strong></a>.</li><li>Click <strong>+ Create new secret key</strong>, give it any name, then click <strong>Create</strong>.</li><li><strong>Copy the key immediately</strong> — it is only shown once.</li><li>Paste it into the field above. You will be charged only for what you use (a typical question costs ~$0.02).</li><li><strong>Delete the key after your session</strong> — go back to <a href="https://platform.openai.com/api-keys">platform.openai.com/api-keys</a>, find the key and click <strong>Delete</strong>. This prevents any risk of unauthorised use.</li></ol><p>Ask it something you’ve always wanted to know about London property prices, trends. If it gets something wrong, I want to know.</p><h3>Prove Me Wrong.</h3><p>Every figure this tool produces is derived directly from HM Land Registry Price Paid Data — one of the most authoritative property datasets in the UK. The methodology is transparent. The data is public. The calculations are reproducible.</p><p>If you’re a data scientist or data analyst, I’ve prepared a full verification notebook on Kaggle. Query the raw dataset yourself. Run the aggregations. Check the numbers. <strong>If you find a discrepancy, I want to know. </strong><a href="https://www.kaggle.com/code/lorentzyeung/london-property-market-analyst-verify-20260406">london-property-market-analyst-verify-20260406 (kaggle.com)</a></p><p><em>Built by Lorentz Yeung, AI Lead. Data: HM Land Registry Price Paid Data (Crown copyright). For informational purposes only — not financial advice.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58169f568b13" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing pAI: Reviving the Spirit of Debate Through AI — A Tribute to Charlie Kirk’s Legacy]]></title>
            <link>https://entzyeung.medium.com/introducing-pai-reviving-the-spirit-of-debate-through-ai-a-tribute-to-charlie-kirks-legacy-e5444ce71e3c?source=rss-fd48b1922412------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5444ce71e3c</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[conservatives]]></category>
            <category><![CDATA[debate]]></category>
            <category><![CDATA[charlie-kirk]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Lorentz Yeung]]></dc:creator>
            <pubDate>Thu, 22 Jan 2026 00:36:07 GMT</pubDate>
            <atom:updated>2026-02-01T12:15:27.232Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introducing pAI: Reviving the Spirit of Debate Through AI — A Tribute to Charlie Kirk’s Legacy</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zrZGQZLabcoF-KaKO9El6w.jpeg" /></figure><p>How a passion for truth-seeking inspired an open-source AI project to preserve influential minds and encourage critical discourse among the youth.</p><p>In an era where meaningful dialogue often gets lost in the noise of social media echo chambers, what if we could bring back the sharp, principled debating style of great thinkers? That’s the vision behind pAI (Personality AI, download the model <a href="https://huggingface.co/Entz/gpt-oss-20b-pai-debator">here</a>.), an innovative open-source project I’ve been developing as a non-commercial tribute to preserve and extend the intellectual heritage of influential figures. Starting with Charlie Kirk — known for his dynamic presence in public debates, interviews, and YouTube footage — pAI aims to create interactive AI embodiments that capture the essence of their logic, mindset, and approach to discourse.</p><h4>The Inspiration: From Philosophy Class to AI Innovation</h4><p>My journey began in my undergraduate philosophy course, where I discovered the power of Socratic questioning. Attending every lecture and tutorial — the only class where I achieved 100% attendance — reinforced my belief that truth emerges through rigorous, respectful debate. This philosophy resonates deeply with Kirk’s public work, which emphasizes critical thinking, conservative values, and challenging assumptions to foster personal and communal growth.</p><p>With abundant public resources like debate videos and interviews available, Kirk became the ideal starting point for pAI. The goal? To distill his debating tactics — confident assertions, fact-based arguments, and Socratic redirects — into an AI that engages users, especially young people, in thoughtful dialogues. Imagine asking the AI about topics like freedom in education or family values, and receiving responses that challenge you to “prove it wrong,” just as Kirk might in a live exchange.</p><h4>How pAI Works: From Prototype to Community-Driven Tool</h4><p>pAI is built on ethical, offline data pipelines using publicly available materials. We process videos and audio to extract transcripts, enhance them with Kirk-style analysis, and fine-tune open-source models like GPT-OSS-20B using techniques such as QLoRA for efficiency.</p><p>The current prototype is a text-based chatbot deployed on Hugging Face Spaces (check it out <a href="https://huggingface.co/spaces/Entz/pai-kirk-debator">here</a>), where users can engage in debates on topics Kirk frequently addressed. It’s hosted on the free tier, so it’s more of a proof-of-concept right now — not fully interactive for all users due to resource limits. But the underlying model is available for download and local use via tools like LM Studio (Webpage <a href="https://entzyeung.github.io/pai/">here</a>).</p><p>Key features include:</p><ul><li><strong>Authentic Debating Style:</strong> Responses mimic Kirk’s assertive, value-driven approach, blending critique of opposing views with calls to action.</li><li><strong>Focus on Societal Good:</strong> Non-commercial and centered on promoting unity, intellectual vitality, and truth-seeking — no division, just discourse.</li><li><strong>Expandable Vision:</strong> This is just the beginning. With community input, pAI could extend to other great thinkers, using public videos, audio, and reports to capture their unique perspectives.</li></ul><p>However, the app isn’t perfect yet. Audio generation for voice cloning (using models like XTTS) is slow on standard hardware, and we’re limited to text for now. My dream is real-time speech interactions — hold-to-record questions, instant Kirk-like replies with cloned voice. That’s where you come in.</p><h4>Challenges and Call for Collaboration</h4><p>As a solo developer working on a Windows 11 Pro workstation with an RTX PRO 6000, I’ve hit roadblocks like GPU compatibility issues and slow TTS inference. The web app shines in text debates but lags in voice, making it a prototype ripe for improvement.</p><p>If you’re passionate about cultural preservation, AI, or revitalizing debate for a better society, join us! Fork the GitHub repo , contribute to faster TTS, UI enhancements, or even expansions to UK-specific contexts. Developers from Turning Point USA, Turning Point UK, or anywhere — let’s collaborate to turn this into a global tool for inspiring the next generation.</p><h4>Why pAI Matters: Preserving Pillars of Civilization</h4><p>At its core, pAI addresses a deeper concern: the erosion of shared values in places like Britain and America, two cornerstones of human progress. By keeping the flame of inquiry alive through AI, we can contribute to making these nations great again — focused on unity and intellectual growth.</p><p>Thank you for reading. Let’s keep the conversation going — drop your thoughts in the comments, or reach out via X (@lorentzyeung). Together, we can make pAI a beacon for truth-seeking.</p><p><em>Lorentz Yeung is a developer based in London, England, dedicated to AI projects that promote philosophical discourse and societal improvement.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5444ce71e3c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MCP 101 Tutorial: Build Your Own Modular AI Agent for Stock Investment Insights]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://pub.towardsai.net/mcp-101-tutorial-build-your-own-modular-ai-agent-for-stock-investment-insights-18da73286261?source=rss-fd48b1922412------2"><img src="https://cdn-images-1.medium.com/max/1536/1*8XZ5GBwVETnISgQxkjdNHQ.png" width="1536"></a></p><p class="medium-feed-snippet">Learn to build a modular AI agent for stock insights using MCP.</p><p class="medium-feed-link"><a href="https://pub.towardsai.net/mcp-101-tutorial-build-your-own-modular-ai-agent-for-stock-investment-insights-18da73286261?source=rss-fd48b1922412------2">Continue reading on Towards AI »</a></p></div>]]></description>
            <link>https://pub.towardsai.net/mcp-101-tutorial-build-your-own-modular-ai-agent-for-stock-investment-insights-18da73286261?source=rss-fd48b1922412------2</link>
            <guid isPermaLink="false">https://medium.com/p/18da73286261</guid>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[algorithmic-trading]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Lorentz Yeung]]></dc:creator>
            <pubDate>Mon, 25 Aug 2025 20:01:31 GMT</pubDate>
            <atom:updated>2025-08-25T20:01:31.293Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Teaching OpenAI’s GPT-OSS 20B Model Multilingual Reasoning Ability: A Hands-On Guide with RTX 4090]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://pub.towardsai.net/teaching-openais-gpt-oss-20b-model-multilingual-reasoning-ability-a-hands-on-guide-with-rtx-4090-0835ba121ee7?source=rss-fd48b1922412------2"><img src="https://cdn-images-1.medium.com/max/1536/1*v4-k_o34sqRIMt5XDH20gQ.jpeg" width="1536"></a></p><p class="medium-feed-snippet">Unlock multilingual CoT reasoning in OpenAI&#x2019;s GPT-OSS 20B: A step-by-step fine-tuning guide on RTX 4090 for flexible, non-English analysis!</p><p class="medium-feed-link"><a href="https://pub.towardsai.net/teaching-openais-gpt-oss-20b-model-multilingual-reasoning-ability-a-hands-on-guide-with-rtx-4090-0835ba121ee7?source=rss-fd48b1922412------2">Continue reading on Towards AI »</a></p></div>]]></description>
            <link>https://pub.towardsai.net/teaching-openais-gpt-oss-20b-model-multilingual-reasoning-ability-a-hands-on-guide-with-rtx-4090-0835ba121ee7?source=rss-fd48b1922412------2</link>
            <guid isPermaLink="false">https://medium.com/p/0835ba121ee7</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[gpt]]></category>
            <category><![CDATA[fine-tuning]]></category>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Lorentz Yeung]]></dc:creator>
            <pubDate>Thu, 21 Aug 2025 22:01:33 GMT</pubDate>
            <atom:updated>2025-08-21T22:01:33.100Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Fine-Tuning Open-Source LLMs for Text-to-SQL: Results and Key Takeaways (article 3 of 3)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://pub.towardsai.net/fine-tuning-open-source-llms-for-text-to-sql-results-and-key-takeaways-article-3-of-3-2b887951edda?source=rss-fd48b1922412------2"><img src="https://cdn-images-1.medium.com/max/2600/0*shSG_5cSWnR1gUa_" width="3840"></a></p><p class="medium-feed-snippet">Analyzing 60+ runs: Performance metrics, learned patterns, and challenges in advanced SQL generation.</p><p class="medium-feed-link"><a href="https://pub.towardsai.net/fine-tuning-open-source-llms-for-text-to-sql-results-and-key-takeaways-article-3-of-3-2b887951edda?source=rss-fd48b1922412------2">Continue reading on Towards AI »</a></p></div>]]></description>
            <link>https://pub.towardsai.net/fine-tuning-open-source-llms-for-text-to-sql-results-and-key-takeaways-article-3-of-3-2b887951edda?source=rss-fd48b1922412------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b887951edda</guid>
            <category><![CDATA[grpo]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[llama-3]]></category>
            <category><![CDATA[qwen2-5]]></category>
            <category><![CDATA[finetun-llm]]></category>
            <dc:creator><![CDATA[Lorentz Yeung]]></dc:creator>
            <pubDate>Mon, 14 Jul 2025 16:03:10 GMT</pubDate>
            <atom:updated>2025-07-15T09:10:19.902Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Fine-Tuning Open-Source LLMs for Text-to-SQL: Setting Up a Machine for Fine-Tuning LLMs on WSL2…]]></title>
            <link>https://pub.towardsai.net/fine-tuning-open-source-llms-for-text-to-sql-setting-up-a-machine-for-fine-tuning-llms-on-wsl2-923b4be00ad8?source=rss-fd48b1922412------2</link>
            <guid isPermaLink="false">https://medium.com/p/923b4be00ad8</guid>
            <category><![CDATA[wsl-2]]></category>
            <category><![CDATA[conda-environment]]></category>
            <category><![CDATA[rtx-4090]]></category>
            <category><![CDATA[cuda]]></category>
            <category><![CDATA[finetune-llm]]></category>
            <dc:creator><![CDATA[Lorentz Yeung]]></dc:creator>
            <pubDate>Mon, 14 Jul 2025 14:03:08 GMT</pubDate>
            <atom:updated>2025-07-15T09:12:36.877Z</atom:updated>
            <content:encoded><![CDATA[<h3>Fine-Tuning Open-Source LLMs for Text-to-SQL: Setting Up a Machine for Fine-Tuning LLMs on WSL2 (article 2 of 3)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9LYVBMPafkb8r0L7" /><figcaption>Meta’s LlaMa and Alibaba’s Qwen are both finetuned to reach their limit. Photo by <a href="https://unsplash.com/@gabrielistvan_fotografia?utm_source=medium&amp;utm_medium=referral">Gabriel Istvan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you want to review <strong>Part 1 (Project Overview and Motivations), please click here</strong>: <a href="https://pub.towardsai.net/fine-tuning-open-source-llms-for-text-to-sql-project-overview-and-motivations-article-1-of-3-9e8638d26708">Fine-Tuning Open-Source LLMs for Text-to-SQL: Project Overview and Motivations (article 1 of 3) | by Lorentz Yeung | Jul, 2025 | Towards AI</a>. If you want to jump directly to <strong>Part 3 (</strong>Results and Key Takeaways<strong>)</strong>, please go here: <a href="https://pub.towardsai.net/fine-tuning-open-source-llms-for-text-to-sql-results-and-key-takeaways-article-3-of-3-2b887951edda?source=friends_link&amp;sk=542b07803d0a04150922f6c36f41e25e">https://pub.towardsai.net/fine-tuning-open-source-llms-for-text-to-sql-results-and-key-takeaways-article-3-of-3-2b887951edda?source=friends_link&amp;sk=542b07803d0a04150922f6c36f41e25e</a></p><p>In this article, I’ll walk you through the process of setting up a machine for fine-tuning large language models (LLMs) like Llama 3.1 8B Instruct for a text-to-SQL task using Guided Reward Policy Optimization (GRPO). I performed this setup on a high-performance system with an NVIDIA RTX 4090 GPU, running Windows 11 with WSL2 (Ubuntu 22.04). I’ll detail my machine configuration, the steps to install and verify dependencies, the issues I encountered, and how I resolved them. This guide is intended for anyone looking to set up a similar environment for machine learning tasks, and I’ll share my experience to help you avoid common pitfalls.</p><h3>My Machine Setup</h3><p>I’m working on a powerful system designed for deep learning tasks:</p><ul><li>GPU: NVIDIA GeForce RTX 4090 (24GB VRAM)</li><li>OS: Windows 11 with WSL2 (Ubuntu 22.04)</li><li>Driver Version: NVIDIA Driver 566.24 (supports CUDA 12.7)</li><li>Initial CUDA Toolkit: None (installed during the process)</li><li>Conda: Used for environment management</li></ul><p>The RTX 4090 is a beast for deep learning, offering 24GB of VRAM, which is sufficient for fine-tuning an 8B parameter model like Llama 3.1 8B Instruct with 4-bit quantization and LoRA. WSL2 allows me to leverage Linux tools on Windows, using the Windows NVIDIA driver for GPU acceleration.</p><h3>Step 1: Verify NVIDIA Driver and CUDA Support</h3><h3>Checking the Driver</h3><p>Since WSL2 uses the Windows NVIDIA driver, I first checked the driver version and CUDA support using nvidia-smi on Windows Command Prompt:</p><pre>+-----------------------------------------------------------------------------------------+<br>| NVIDIA-SMI 565.75                 Driver Version: 566.24         CUDA Version: 12.7     |<br>|-----------------------------------------+------------------------+----------------------+<br>| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |<br>| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |<br>|                                         |                        |               MIG M. |<br>|=========================================+========================+======================|<br>|   0  NVIDIA GeForce RTX 4090        On  |   00000000:01:00.0  On |                  Off |<br>|  0%   29C    P8              6W /  450W |    1707MiB /  24564MiB |      2%      Default |<br>|                                         |                        |                  N/A |<br>+-----------------------------------------+------------------------+----------------------+</pre><ul><li>Driver Version: 566.24</li><li>CUDA Version Supported: 12.7</li><li>Memory Usage: 1707MiB / 24564MiB (plenty of VRAM available)</li></ul><p>The driver supports CUDA 12.7, meaning it can run applications compiled with CUDA 12.7 or earlier (e.g., 12.1). This gave me flexibility in choosing the CUDA toolkit version.</p><h3>Step 2: Install CUDA Toolkit on WSL2</h3><h3>Initial Attempt and Issue</h3><p>I started by trying to install CUDA 12.1.0, as it was compatible with PyTorch 2.2.0 (required for the fine-tuning task). I ran:</p><pre>wget https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_531.14_linux.run</pre><p>But I encountered an error:</p><pre>--2025-04-14 13:40:23--  https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_531.14_linux.run<br>Resolving developer.download.nvidia.com (developer.download.nvidia.com)... 23.48.165.33, 23.48.165.13<br>Connecting to developer.download.nvidia.com (developer.download.nvidia.com)|23.48.165.33|:443... connected.<br>HTTP request sent, awaiting response... 404 Not Found<br>2025-04-14 13:40:25 ERROR 404: Not Found.</pre><p>The URL was invalid, likely because NVIDIA had updated or removed the file by April 2025.</p><h3>Solution: Find a Working CUDA Version</h3><p>I resolved this by trying a different version of CUDA 12.1.0 with a slightly different driver suffix:</p><pre>wget https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_530.30.02_linux.run<br>sudo sh cuda_12.1.0_530.30.02_linux.run</pre><p>This worked, and the installation completed successfully.</p><h3>Verify CUDA Installation</h3><p>I verified the installation:</p><pre>nvcc --version</pre><p>Output:</p><pre>nvcc: NVIDIA (R) Cuda compiler driver<br>Copyright (c) 2005-2023 NVIDIA Corporation<br>Built on ...<br>Cuda compilation tools, release 12.1, V12.1.0</pre><p>I also set up environment variables:</p><pre>echo &#39;export PATH=/usr/local/cuda-12.1/bin${PATH:+:${PATH}}&#39; &gt;&gt; ~/.bashrc<br>echo &#39;export LD_LIBRARY_PATH=/usr/local/cuda-12.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}&#39; &gt;&gt; ~/.bashrc<br>source ~/.bashrc</pre><h3>Step 3: Create a Conda Environment and Install PyTorch</h3><h3>Choosing a Python Version</h3><p>I needed to install PyTorch 2.2.0 with CUDA 12.1 (cu121). PyTorch 2.2.0 (released February 2024) supports Python 3.8 to 3.11. I chose Python 3.11 for its performance improvements and longevity (supported until October 2027), but I was ready to fall back to 3.10 if dependency issues arose.</p><pre>conda create --name cu121torch220 python=3.11 -y<br>conda activate cu121torch220</pre><p>This created an environment named cu121torch220 with Python 3.11.</p><h3>Install PyTorch</h3><p>I installed PyTorch 2.2.0 with CUDA 12.1:</p><pre>pip install torch==2.2.0 --index-url https://download.pytorch.org/whl/cu121</pre><h3>Verify PyTorch</h3><p>I verified the installation:</p><pre>import torch<br>print(torch.__version__)<br>print(torch.cuda.is_available())<br>print(torch.version.cuda)<br>print(torch.cuda.get_device_name(0))</pre><p>Output:</p><pre>2.2.0<br>True<br>12.1<br>NVIDIA GeForce RTX 4090</pre><p>PyTorch was correctly installed and detected the GPU!</p><h3>Step 4: Install Remaining Dependencies</h3><p>With PyTorch set up, I installed the dependencies required for fine-tuning:</p><pre>pip install transformers==4.43.0 datasets==2.20.0 trl==0.8.6 peft==0.11.1 accelerate==0.31.0 bitsandbytes==0.43.1<br>pip install &quot;unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git&quot;<br>pip install huggingface_hub==0.23.4</pre><p>These packages include:</p><ul><li>transformers: For loading and fine-tuning the Llama model.</li><li>datasets: For loading the text-to-SQL dataset.</li><li>trl: For GRPO training.</li><li>peft and bitsandbytes: For efficient fine-tuning with LoRA and 4-bit quantization.</li><li>unsloth: For optimized fine-tuning on NVIDIA GPUs.</li><li>huggingface_hub: For model access and uploading to Hugging Face.</li></ul><h3>Potential Issue: Dependency Conflicts</h3><p>I noted that if Python 3.11 caused issues with bitsandbytes or unsloth (e.g., compilation errors), I would recreate the environment with Python 3.10:</p><pre>conda deactivate<br>conda env remove -n cu121torch220<br>conda create --name cu121torch220 python=3.10 -y<br>conda activate cu121torch220<br>pip install torch==2.2.0 --index-url https://download.pytorch.org/whl/cu121</pre><p>Then reinstall the dependencies. However, Python 3.11 worked fine in my case.</p><h3>Step 5: Log in to Hugging Face</h3><p>To access the Llama 3.1 8B Instruct model and later upload my fine-tuned model, I logged into Hugging Face:</p><pre>huggingface-cli login</pre><p>I entered my Hugging Face token (obtained from <a href="https://huggingface.co/settings/tokens">https://huggingface.co/settings/tokens</a>) and ensured I had access to meta-llama/Meta-Llama-3.1-8B-Instruct.</p><h3>Conclusion</h3><p>Setting up my machine for fine-tuning an LLM on WSL2 was a multi-step process that required careful attention to CUDA versions, driver compatibility, and Python environments. I encountered issues like an invalid CUDA download URL and a syntax error in the Conda command, but I resolved them by finding a working CUDA installer and correcting the command syntax. My final setup uses CUDA 12.1.0, PyTorch 2.2.0, and Python 3.11 in a Conda environment, with all dependencies installed and verified.</p><p>This setup is now ready for fine-tuning Llama 3.1 8B Instruct for a text-to-SQL task using GRPO. In a future article, I’ll share the fine-tuning process, evaluation results. If you’re setting up a similar system, I hope this guide helps you navigate the challenges I faced!</p><p>Here is the dependency of my virtual env for your convenience:</p><pre>accelerate==1.6.0<br>aiohappyeyeballs==2.6.1<br>aiohttp==3.11.16<br>aiosignal==1.3.2<br>annotated-types==0.7.0<br>anyio==4.9.0<br>attrs==25.3.0<br>bitsandbytes==0.45.5<br>certifi==2025.1.31<br>charset-normalizer==3.4.1<br>contourpy==1.3.2<br>cut-cross-entropy==25.1.1<br>cycler==0.12.1<br>datasets==2.21.0<br>dill==0.3.8<br>distro==1.9.0<br>docstring-parser==0.16<br>filelock==3.13.1<br>fonttools==4.57.0<br>frozenlist==1.5.0<br>fsspec==2024.5.0<br>h11==0.14.0<br>hf-transfer==0.1.9<br>httpcore==1.0.8<br>httpx==0.27.0<br>huggingface-hub==0.30.2<br>idna==3.10<br>jinja2==3.1.4<br>jiter==0.9.0<br>kiwisolver==1.4.8<br>markdown-it-py==3.0.0<br>markupsafe==2.1.5<br>matplotlib==3.10.1<br>mdurl==0.1.2<br>mpmath==1.3.0<br>multidict==6.4.3<br>multiprocess==0.70.16<br>networkx==3.3<br>numpy==2.1.2<br>openai==1.51.2<br>pandas==2.2.3<br>peft==0.13.0<br>pillow==11.2.1<br>propcache==0.3.1<br>protobuf==3.20.3<br>pyarrow==19.0.1<br>pyarrow-hotfix==0.6<br>pydantic==2.11.3<br>pydantic-core==2.33.1<br>pyparsing==3.2.3<br>python-dotenv==1.0.1<br>pytz==2025.2<br>pyyaml==6.0.2<br>regex==2024.11.6<br>requests==2.32.3<br>rich==14.0.0<br>safetensors==0.5.3<br>sentencepiece==0.2.0<br>shtab==1.7.2<br>sniffio==1.3.1<br>sqlglot==25.1.0<br>sqlparse==0.5.1<br>sympy==1.13.1<br>tokenizers==0.21.1<br>torch==2.6.0<br>tqdm==4.67.1<br>transformers==4.48.2<br>triton==3.2.0<br>trl==0.15.2<br>typeguard==4.4.2<br>typing-inspection==0.4.0<br>tyro==0.9.18<br>tzdata==2025.2<br>unsloth==2025.3.19<br>unsloth-zoo==2025.3.17<br>urllib3==2.4.0<br>xxhash==3.5.0<br>yarl==1.19.0</pre><p>And if you’ve enjoyed the article — I’d be stoked if you’d consider tossing a coin my way via <a href="https://paypal.me/entzyeung?country.x=GB&amp;locale.x=en_GB">PayPal </a>or becoming a <a href="https://github.com/sponsors/entzyeung">GitHub Sponsor</a>. Your support keeps the train running. Let’s echo James Bently’s saying, let’s keep contributing to the AI community and benefit humanity.</p><h3>Support the Author</h3><p><strong><em>If you found this article useful, please consider donating to my PayPal tip jar</em></strong><em>!</em></p><p><a href="https://paypal.me/entzyeung?country.x=GB&amp;locale.x=en_GB">Pay Pui Yeung using PayPal.Me</a></p><p><strong><em>Your support means the universe for me and allows me to stay on this lonely road of exploration — keep experimenting, writing articles, making tutorials, …</em></strong></p><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=923b4be00ad8" width="1" height="1" alt=""><hr><p><a href="https://pub.towardsai.net/fine-tuning-open-source-llms-for-text-to-sql-setting-up-a-machine-for-fine-tuning-llms-on-wsl2-923b4be00ad8">Fine-Tuning Open-Source LLMs for Text-to-SQL: Setting Up a Machine for Fine-Tuning LLMs on WSL2…</a> was originally published in <a href="https://pub.towardsai.net/">Towards AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>