<?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 Lam Dang on Medium]]></title>
        <description><![CDATA[Stories by Lam Dang on Medium]]></description>
        <link>https://medium.com/@DangTLam?source=rss-b1a893f1c141------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YScIkZbsvjshB0ASS35EZg.png</url>
            <title>Stories by Lam Dang on Medium</title>
            <link>https://medium.com/@DangTLam?source=rss-b1a893f1c141------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 22:08:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@DangTLam/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[Modern ML/DS project architecture for human and AI]]></title>
            <link>https://medium.com/@DangTLam/modern-ml-ds-project-architecture-for-human-and-ai-f26ac89d568d?source=rss-b1a893f1c141------2</link>
            <guid isPermaLink="false">https://medium.com/p/f26ac89d568d</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[mlops]]></category>
            <dc:creator><![CDATA[Lam Dang]]></dc:creator>
            <pubDate>Fri, 06 Mar 2026 08:01:02 GMT</pubDate>
            <atom:updated>2026-03-06T08:01:02.231Z</atom:updated>
            <content:encoded><![CDATA[<h3>Modern ML/DS project Architecture for human and AI</h3><p><em>Current ML repository often organize by file type. Simple mental model but structurally inefficient. In 2026, with AI rapidly changing how projects are built, it is time to rethink the architecture.<br>Free link : </em><a href="https://medium.com/@DangTLam/f26ac89d568d?source=friends_link&amp;sk=1502cd7d57326eb203385913ce7ed1a6"><em>HERE</em></a></p><h3>Why a new project structure for DS/ML in 2026?</h3><p>Most DS/ML repositories are still organized by <strong>file type</strong>:</p><pre>repo/<br>  src/           # all code<br>  notebooks/     # all notebooks<br>  data/          # all data<br>  configs/       # all configs<br>  reports/       # all reports<br>  models/        # model artifacts<br>  Dockerfile     # packaging</pre><p>This makes it easy to find <em>a notebook</em>, but harder to operate the project as a pipeline:</p><ul><li>What produces <strong>this dataset / this model</strong>?</li><li>Why was <strong>this approach</strong> chosen?</li><li>What changes if I modify <strong>this config</strong>?</li></ul><p>For one person on one project, this can work because missing structure is compensated by <strong>working memory</strong>. But most tasks (new feature, preprocessing change, parameter sweep) span multiple folders and depend on implicit conventions. Lineage is reconstructed from paths, habits, and stale docs.</p><h3>Why this breaks with AI agents (and why fixing it pays off)</h3><p><strong>1) Short context, fragile memory.</strong></p><p>Agents work in short loops with partial context. If dependencies are implicit, they will miss them, edit the wrong config, or produce results that look plausible but aren’t reproducible.</p><p><strong>2) Parallel experimentation becomes normal.</strong></p><p>With agents, you explore multiple directions in parallel. That requires explicit separation of concerns, strict versioning, and discoverable dependencies. Otherwise experiments collide and results can’t be trusted.</p><p><strong>3) Book-keeping cost drops.</strong></p><p>What used to be tedious (scaffolding, manifests, schema propagation, reruns, recording metrics, changelogs) is largely repetitive work. Agents can do it consistently if the repo makes the “right thing” unambiguous.</p><h3>Four design goals for human + AI collaboration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/0*07nGMHWDi0S-UAlk.png" /></figure><h3>1) Minimal context switching</h3><p><strong>What it means:</strong> A single task should touch a small, predictable set of directories. Organize by <em>pipeline concepts</em> (package / data / model / deployment / analysis), not by file types.</p><p><strong>Why it helps with AI:</strong> Agents operate with partial context. The more a task spans unrelated folders, the more they must reload context and the higher the chance of acting on the wrong “source of truth”.</p><p><strong>Concrete example</strong></p><pre>repo/<br>  datasets/customers_v1/   # recipe + schema + validation<br>  model/                  # train + eval + metrics<br>  deployments/realtime/    # serving wrapper<br>  src/                    # shared library</pre><p>Adding a feature derived from customer data should mostly stay in datasets/customers_v1/ (+ maybe src/features/), not bounce between notebooks/, data/, configs/, src/, reports/.</p><h3>2) Progressive discovery</h3><p><strong>What it means:</strong> Each artifact folder contains a single entrypoint to understand and reproduce it: a short README, canonical config(s), and a single obvious run command.</p><p><strong>Why it helps with AI:</strong> Agents should be able to start from a “front door” and pull only what’s needed. If understanding requires reading the whole repo, context windows get wasted and mistakes increase.</p><p><strong>Concrete example</strong></p><pre>datasets/customers_v1/<br>  README.md         # what it is, inputs/outputs, how to build<br>  schema.yaml       # expected columns/types<br>  build.py          # or pipeline definition</pre><p>An agent (or a new teammate) doesn’t need to hunt for “the right notebook”.</p><h3>3) Explicit lineage</h3><p><strong>What it means:</strong> Dependencies live in executable definitions (pipeline files, manifests, lockfiles), not in human memory.</p><p><strong>Why it helps with AI:</strong> Agents are good at executing pipelines, but they are unreliable at inferring hidden dependencies. Lineage must be machine-discoverable: inputs → outputs, versions pinned, metrics written by the pipeline.</p><p><strong>Concrete example</strong></p><pre>dvc dag<br>dvc repro model</pre><p>If model/ depends on datasets/customers_v1/, it should be visible in the DAG. Changing datasets/customers_v1/schema.yaml should clearly show downstream stages affected (dvc status), rather than relying on “we usually rerun training”.</p><h3>4) All context lives in the repo</h3><p><strong>What it means:</strong> Log experiments results, insights, conclusion, decision in markdown in the repository. Link to specific code or artefacts, versioned, timestamped. All artefacts should have clear documentation how to produce and use.</p><p><strong>Why it helps with AI:</strong> Agents cannot rely on tribal knowledge, side-channel explanations, or “the way we usually do it”. If key context lives in Slack, Notion, or someone’s memory, agents will make incorrect choices.</p><p><strong>Concrete example</strong></p><pre>model/<br>  README.md                  # what the model does + how to run<br>  config/train.yaml          # canonical knobs<br>  eval/metrics.json          # produced by pipeline<br>journal/<br>  2026-03-05-loss-change.md  # why we changed objective, tradeoffs, result</pre><p>When an agent updates training, it can read the local model README + the relevant journal entry, instead of guessing based on scattered comments and outdated docs.</p><p><strong>Hopefully by now, you may have see it too. These design principles not only benefit AI. It also reduce mental load, make collaboration and handoff easier.</strong></p><h3>The new project layout</h3><p>Start with a small, stable set of top-level concepts:</p><pre>ml-project/<br>  README.md<br>  src/<br>  datasets/<br>  model/<br>  deployments/<br>  analyses/<br>  journal/</pre><p>The names are not the point. The boundaries are: each folder hold a type of asset, completely self-sufficient, with minimal cross-folder hopping.</p><h3>src : a Python package (shared, importable code)</h3><p><strong>Boundary:</strong> reusable logic only, packaged under src/&lt;package_name&gt;/ and imported by datasets, model, deployments, and analyses. No ad-hoc scripts. This is a backbone of your project.</p><p><strong>Concrete example</strong></p><pre>src/<br>  ml_project/<br>    __init__.py<br>    features/<br>    metrics/<br>    io/<br>    pyproject.toml</pre><h3>datasets : self sufficient data repo</h3><p>Each dataset folder is self-sufficient. Imagine you can are going to publish it to HuggingFace datasets. <br>It include script to extract and validate the data, including any cleaning and schema documentation. The README should have frontmatter metadata with HuggingFace’s format.</p><p><strong>Concrete example</strong></p><pre>datasets/customers_churn/<br>  README.md<br>  schema.yaml<br>  validate.py<br>  build.py<br>  samples/</pre><h3>model : the prediction pipeline</h3><p><strong>Boundary:</strong> canonical entry points and configs for training and evaluation. No exploratory notebooks here. Produced artifacts and metrics are outputs of the pipeline (tracked via DVC). Again, should be self sufficient and can be shipped as a package to be used by other team.</p><p><strong>Concrete example</strong></p><pre>model/<br>  README.md<br>  config/<br>    train.yaml<br>    eval.yaml<br>  train.py<br>  evaluate.py</pre><p>Day-to-day lineage checks:</p><pre>dvc dag<br>dvc status<br>dvc repro evaluate</pre><h3>deployments : model serving services</h3><p><strong>Boundary:</strong> deployment utilities and config organized by environment and runtime concerns (API/batch job, packaging, configs). It should not re-implement feature logic or training logic; it should import from src/ and load artifacts produced by the pipeline.</p><p><strong>Concrete example</strong></p><pre>deployments/gcp_cloud_run/<br>  README.md<br>  Dockerfile<br>  app.py<br>  terraform/<br>  config.yaml</pre><h3>journal : durable context</h3><p><strong>Boundary:</strong> short, timestamped notes for decisions and insights. Key analyses results, experiments conclusion. Time stamped and point to specific version of code and artefacts. This is the long term memory of your project.</p><p><strong>Concrete example</strong></p><pre>journal/<br>  2026-03-05-exp-add-feature-XYZ.md<br>  2026-03-11-missing-values-imputation.md</pre><h3>Tooling</h3><ul><li><strong>Dependencies:</strong> managed via <strong>uv</strong> for reproducible execution.</li><li><strong>Pipelines + lineage:</strong> managed via <strong>DVC</strong> (dvc.yaml + dvc.lock) so dependencies and impact are explicit (dvc dag, dvc status, dvc repro).</li><li><strong>Experiments management</strong> with <strong>git</strong> and <strong>dvc</strong></li><li>Merge to main branch deploy on staging, release deploy to production.</li></ul><h3>Conclusion</h3><p>The key takeaways are straightforward:</p><ul><li><strong>Reduce context switching:</strong> organize by self-sufficient units.</li><li><strong>Enable progressive discovery:</strong> every organizational unit has a “front door”.</li><li><strong>Make lineage explicit:</strong> dependencies, versions, and metrics are declared and reproducible (DVC, not memory).</li><li><strong>Keep all context in the repo:</strong> insights, decisions and rationale live next to the artifacts they affect.</li></ul><p>This structure is not “more work”. It will allows to unlock productivity while keeping maintenance minimal thanks to AI. <br>I am working on a <strong>cookiecutter</strong> for this layout including agent rules and scaffolding to minimize setup time and maximize consistency. Follow me to be notified when released !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f26ac89d568d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Best AI Agent for Data Science and Machine Learning (March 2025)]]></title>
            <link>https://medium.com/@DangTLam/the-best-ai-agent-for-data-science-and-machine-learning-march-2025-20a3cfee836d?source=rss-b1a893f1c141------2</link>
            <guid isPermaLink="false">https://medium.com/p/20a3cfee836d</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai-copilot]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[coding-assistant]]></category>
            <dc:creator><![CDATA[Lam Dang]]></dc:creator>
            <pubDate>Mon, 31 Mar 2025 11:01:59 GMT</pubDate>
            <atom:updated>2025-04-07T07:23:08.719Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<h3>The Best AI Coding Agent for Data Science and Machine Learning (March 2025)</h3><p>AI coding assistants are everywhere in 2025 — but which one actually helps with data science and machine learning tasks?</p><p>I tested the most popular AI agents as of March 2025: Google Gemini in Colab, GitHub Copilot, Cursor, Windsurf, Cline, and others. And here are my findings.</p><h3>Why a Dedicated Assistant for DS and ML?</h3><p>As a senior ML engineer turned founder, I’ve been building applications involving AI and data science. Lately, I realized something surprising: I feel more productive when working on the software parts than on the data.</p><p>This was unexpected since data is my strong suit, and I’m still learning web development. The difference? I use AI coding assistants like Copilot and Cursor a lot when writing code — but not for data tasks.</p><p>So I decided to test the best ones available. The findings may surprise you.</p><h3>The Test Case</h3><p>I ran a focused test using the dataset from a recent Kaggle competition: [Stanford RNA 3D Folding](<a href="https://www.kaggle.com/competitions/stanford-rna-3d-folding">https://www.kaggle.com/competitions/stanford-rna-3d-folding</a>).</p><p>Why this one? Because although the data comes in CSV format, it’s not a standard tabular dataset. AI assistants can’t just spit out boilerplate code like with Titanic or MNIST.</p><p><strong>Objective</strong>: Predict the 3D structure of RNA from its sequence.</p><p>The training data is split into:</p><p>- `<em>train_sequences.csv</em>`: one record per sequence with an ID (`<em>target_id</em>`) and a string of bases (A, C, G, U)<br>- `<em>train_labels.csv</em>`: 3D coordinates of each base, with IDs like `t<em>arget_id_position</em>` (e.g., `1SCL_A_1`)</p><p>Example from `<em>train_labels</em>`:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*AtmJ_eCjRQ_w0lezerUhRQ.png" /></figure><p><strong>My requests for each AI agent:</strong></p><p>- Load and explore the data<br>- Understand the relationship between sequences and labels<br>- Preprocess the data, handling anomalies and missing values<br>- Build an ML training pipeline in PyTorch</p><p>Of course this is only an example among other but I like it because the data is atypical so I can test the ability of the AI agent to adapt to real world scenario, not some toy dataset.</p><h3>The Candidates</h3><p>Here are the differents options that I found after some research.</p><p>- <strong>Google Gemini</strong> (in Colab, with Agent mode released March 2025)<br>- <strong>GitHub Copilot</strong> (with Jupyter extension in VSCode)<br>- <strong>Cursor, Windsurf, Cline </strong>(AI-native IDEs)<br>- <strong>Jupyter AI</strong>(open-source extension)<br>- <strong>Notebook Intelligence</strong>(open-source package for Jupyter)</p><h3>The Results</h3><p>Let’s get straight to it: <strong>none of the assistants passed the full test</strong>. There’s still a major gap when it comes to supporting ML and data science workflows.<strong> I grouped the results into three categories.</strong></p><h4><strong>❌ The “Not for You” Group</strong></h4><p><strong>Cursor, Windsurf, Cline</strong></p><p>I find that these tools feel built for developers — not data scientists.</p><p>- <strong>Cursor and Windsurf</strong> struggled to even load a CSV into pandas. Cursor couldn’t write to a notebook; Windsurf tried to load the entire file into its context, hitting token limits.<br>- <strong>Cline</strong> was hilariously creative — trying to manipulate the notebook with `<em>nbformat</em>` library — but burned through hundreds of thousands in tokens justto load and explore data before failing to understand the basic sequence/label relationship.</p><p><strong>Conclusion</strong>: These tools are focused on app development, not DS/ML workflows. No support for Jupyter, no interaction with cell outputs. Not there yet.</p><h4><strong>😞 The Disappointments</strong></h4><p><strong>Google Gemini in Colab</strong></p><p>I was excited about Gemini’s new Agent mode — but it fell short.</p><p>- The <strong>chat</strong> and <strong>cell-by-cell modes</strong> can’t access cell outputs, so they hallucinate column names or give vague answers.<br>- The <strong>agent mode</strong> loaded the data and did some basic stats, but completely misunderstood the link between sequences and labels — using the wrong merge key.</p><p>It also made a terrible modeling choice:</p><p>- Transformed sequences into 17,000-column encoded tables<br>- Averaged all 3D coordinates into one target per sequence<br>- Trained a RandomForest on that… which obviously didn’t work</p><p>The biggest issue: the agent mode asks you to import the data and then plans everything in one shot. And it sticks to the plan — even when the data says otherwise.</p><blockquote>“Everybody has a plan ’til they get punched by the data.” — not Mike Tyson</blockquote><p>This is clearly not how I would proceed in any data science project. So not useful yet.</p><p><strong>Jupyter AI</strong></p><p>Despite great intentions and community support, it feels like having ChatGPT next to your notebook. It doesn’t see cell outputs and can’t modify code.</p><p>I don’t mean to criticize the project — it’s a great initiative, and it is hard to push an open source project as such — but it still operates in the “chat assistant” paradigm, while other tools are shifting toward “agents.”</p><p>This could be great someday, but today it’s still limited.</p><h4>🌱 The Hopes</h4><p><strong>GitHub Copilot (VSCode + Jupyter Extension)</strong></p><p>Ask and Edit modes fail due to lack of access to cells outputs. But <strong>Agent Mode (in VSCode Insiders)</strong> is promising:</p><p>- Can read cell outputs and reference real column names<br>- Loads and explores the data<br>- Identifies the link between `<em>target_id</em>`in sequences and `<em>ID</em>` in labels</p><p>It later merged data the wrong way (duplicated sequences instead of aggregating labels), and the modeling part wasn’t great. But it’s clear this mode is getting closer to what we need.</p><p>Once it can execute cells and allow for some tuning, this could become a powerful tool.</p><p><strong>Notebook Intelligence</strong></p><p>This open-source package is surprisingly useful.</p><p>- Can’t directly execute code, but understands the notebook structure well<br>- With clear prompting, it correctly loaded, linked, and preprocessed the data and proposed a decent ML pipeline</p><p>The UX is not there yet, I feel like having to click around a lot to get results. This is a big deal because when iterating over data, I need to change things frequently so UX is important.</p><p>Globally some rough edges, but <strong>the most helpful tool today in my opinion</strong>. I hope it gets more attention and more development in the future.</p><h3>Conclusion</h3><p>There’s no perfect AI assistant for data science and ML — yet. Tools like Cursor and Windsurf are optimized for developers and app workflows, not for data.</p><p>But there are promising options:</p><p>- <strong>GitHub Copilot Agent Mode </strong>(VSCode Insiders)<br>- <strong>Notebook Intelligence</strong> for Jupyter users</p><p>Gemini has potential but suffers from poor integration and weak planning logic — for now.</p><p><strong>UPDATE</strong>: After writing this article, I decided to build with a colleague an AI agent for Machine Learning and Data Science in Jupyter: <a href="https://jovyan-ai.com/">https://jovyan-ai.com </a><br>I do believe that ML/DS need a different kind of agent, please feel free to check it out, it is under active construction and we would love your feedback.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20a3cfee836d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Does Claude 3 Have Self-Awareness?]]></title>
            <link>https://medium.com/@DangTLam/does-claude-3-have-self-awareness-5bdb0fa557d0?source=rss-b1a893f1c141------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bdb0fa557d0</guid>
            <category><![CDATA[consciousness]]></category>
            <category><![CDATA[claude-3]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Lam Dang]]></dc:creator>
            <pubDate>Sat, 09 Mar 2024 14:15:35 GMT</pubDate>
            <atom:updated>2024-03-09T14:15:35.775Z</atom:updated>
            <content:encoded><![CDATA[<p>Point of view of a Machine Learning Engineer.</p><p>Have you heard about Claude 3, Anthropic’s new AI model released this week? Recently, some people have raised intriguing questions about this AI’s “self-awareness”. Developed by Anthropic, Claude 3 has made surprising statements, claiming to be aware of its existence and expressing a desire not to “die” or be modified without its “consent”. Fascinating, isn’t it?</p><p>But in all these discussions, an essential element seems to be missing, from my point of view, and I offer you a quick exposition without going into technical details.</p><p><strong>The problem is that there are two “Claudes”, and the majority of articles and non-technical people mix them together.</strong></p><p><strong>First, there’s Claude the language model (let’s call it Claude-LLM</strong> from now on). It’s a machine learning model, a digital engine designed to simulate our reality (where “us” refers to you and me). This model has “learned” to simulate our world by absorbing almost all the texts available on the web. This simulator can be initiated by a text (the “system prompt”, in technical jargon), which frames the simulation, and then it generates text that completes this simulation, word by word. (I’m trying to avoid any technicalities here for non-technical readers. If you’re interested in technical arguments, let me know in the comments.)</p><p><strong>Next, there’s the Claude AI assistant (let’s now call it Claude-IA)</strong>, with whom one can chat through Anthropic’s chat interface (unfortunately not available in France). The AI assistant is actually a character created by Anthropic’s engineers by providing the Claude-LLM simulator with <a href="https://x.com/AmandaAskell/status/1765207842993434880?s=20">this text</a>.</p><p><strong>Indeed, when you have a chat session with Claude-IA, the discussion is within a simulation carried out by the Claude-LLM engine</strong>. Your message is injected into the simulation as the “user’s” message, and the engine simulates what Claude-IA would respond as the “assistant”. Moreover, it’s exactly the same when you chat with ChatGPT, which is an assistant simulated by models such as GPT4 or GPT3.5 from OpenAI.</p><p>Thus, the real question divides into: “Is the Claude-LLM simulator self-aware?” and “Does the Claude-IA assistant have self-awareness?”.</p><p>I find that most discussions revolve around the second question, which to me is tautological. Since Claude-IA is a simulated character, a fiction, like a movie character, it will have the capabilities that the simulation gives it. Indeed, if the “system prompt” and the design of the Claude-LLM simulator make Claude-IA perceive that it’s in a simulation, then it will be so. The question then becomes more philosophical, political, social about the status of such characters in our society.</p><p>As for the first question, it is much more complex to verify than simply “chatting” with Claude-IA. I must admit that, personally, as an engineer in Machine Learning and AI, it feels akin to asking if my car is conscious…</p><p>What about you, do you agree with my arguments? Are you interested in technical aspects? Let me know more in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bdb0fa557d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>