<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: dang phan</title>
    <description>The latest articles on DEV Community by dang phan (@dangineer_4k2).</description>
    <link>https://dev.to/dangineer_4k2</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3825502%2Fedd2d47e-799c-40da-8ca3-0e5b1ad3940a.png</url>
      <title>DEV Community: dang phan</title>
      <link>https://dev.to/dangineer_4k2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dangineer_4k2"/>
    <language>en</language>
    <item>
      <title>A 4B Model Just Beat a 397B Baseline - By Changing How Training Data Was Made</title>
      <dc:creator>dang phan</dc:creator>
      <pubDate>Sun, 28 Jun 2026 03:02:33 +0000</pubDate>
      <link>https://dev.to/dangineer_4k2/a-4b-model-just-beat-a-397b-baseline-by-changing-how-training-data-was-made-1gal</link>
      <guid>https://dev.to/dangineer_4k2/a-4b-model-just-beat-a-397b-baseline-by-changing-how-training-data-was-made-1gal</guid>
      <description>&lt;p&gt;Meta FAIR just published a result that's hard to ignore: a 4B parameter model, after being trained on data generated by &lt;strong&gt;Autodata&lt;/strong&gt;, outperformed their own 397B model on PRBench-Legal - without any architectural changes.&lt;/p&gt;

&lt;p&gt;The only variable: how the training data was created.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem With Current Synthetic Data Pipelines
&lt;/h2&gt;

&lt;p&gt;Most synthetic data workflows follow the same pattern: prompt a model, collect outputs, filter, done. The problem is that data quality is essentially uncontrolled.&lt;/p&gt;

&lt;p&gt;Two failure modes keep showing up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Too easy&lt;/strong&gt; - the model you're trying to train already solves it. No learning signal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Too hard&lt;/strong&gt; - every rollout scores near zero. GRPO has no gradient to work with.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Autodata reframes the question: instead of generating data and then evaluating it, why not let model behavior itself define what good data looks like?&lt;/p&gt;




&lt;h2&gt;
  
  
  How the Pipeline Works
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj1u0cbjhfy2rr3dkuhqv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj1u0cbjhfy2rr3dkuhqv.png" alt="The Weak-vs-Strong Agentic Self-Instruct architecture. A main LLM agent orchestrates four subagents: a Challenger that generates examples, Weak and Strong solvers that attempt them, and a Judge that evaluates outputs and feeds learnings back into the loop." width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Autodata runs an orchestrator agent that coordinates four LLM subagents:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Challenger&lt;/strong&gt; - generates questions and rubrics from source material (papers, legal docs, math problems)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weak solver&lt;/strong&gt; - a small model that should struggle if the data is good&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strong solver&lt;/strong&gt; - a large model that should succeed, validating that the question is actually answerable&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Judge&lt;/strong&gt; - scores both solvers against the rubric and sends structured feedback back to the orchestrator&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An example is only &lt;strong&gt;accepted&lt;/strong&gt; when all three conditions hold simultaneously: weak solver scores low, strong solver scores high, and the gap between them is large enough. Otherwise, the orchestrator sends specific feedback to the Challenger to generate a new question from an entirely different angle - not a rephrasing, but a new angle.&lt;/p&gt;

&lt;p&gt;It takes an average of &lt;strong&gt;6.59 iterations&lt;/strong&gt; to produce a single accepted question.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Results
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Falvzyjp9u34cwt8q506q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Falvzyjp9u34cwt8q506q.png" alt=" " width="800" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On both &lt;em&gt;PRBench-Legal&lt;/em&gt; and the harder &lt;em&gt;PRBench-Legal-Hard&lt;/em&gt; subset, graded independently by both GPT-5 and Kimi-K2.6, the 4B model trained on Autodata came out on top across every column - outperforming the CoT-trained 4B and the 397B baseline without RL.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4syw1zu4rxrlxa10ra54.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4syw1zu4rxrlxa10ra54.png" alt="Training dynamics on legal reasoning tasks. Qwen3.5-4B trained on Agentic Self-Instruct data stays ahead of the CoT baseline on every metric throughout training - on train reward, held-out CoT validation, and both PRBench-Legal splits." width="800" height="298"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The same pattern holds across CS research tasks and scientific reasoning: Agentic data leads from the start, and the gap widens through training.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What's Actually Going On Here&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The 4B &amp;gt; 397B result isn't the most interesting part. The more important question is why it happened.&lt;/p&gt;

&lt;p&gt;On legal tasks, standard CoT Self-Instruct produced questions that were too hard - weak solver scores clustered near zero across almost every rollout. When every rollout fails the same way, GRPO has nothing to learn from. Autodata didn't make the questions easier. It &lt;strong&gt;reshaped the reward distribution&lt;/strong&gt;, pushing the weak solver into a range with enough variance for gradient descent to do its job.&lt;/p&gt;

&lt;p&gt;That's the difference between hard data and useful data.&lt;/p&gt;




&lt;p&gt;The Real Takeaway&lt;/p&gt;

&lt;p&gt;If you're building an SFT or RL training pipeline, it's worth asking: what are you actually using to measure data quality?&lt;/p&gt;

&lt;p&gt;If the answer is a static rubric or a generic LLM-as-judge score, Autodata suggests the more important metric is &lt;strong&gt;target model behavior&lt;/strong&gt;: good data is data that sits in the right difficulty zone for the model you're training - not data that scores well on a judge prompt.&lt;/p&gt;

&lt;p&gt;Full paper: &lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://arxiv.org/abs/2606.25996" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Farxiv.org%2Fstatic%2Fbrowse%2F0.3.4%2Fimages%2Farxiv-logo-fb.png" height="467" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://arxiv.org/abs/2606.25996" rel="noopener noreferrer" class="c-link"&gt;
            [2606.25996] Autodata: An agentic data scientist to create high quality synthetic data
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            We introduce Autodata, a general method that enables AI agents to act as data scientists who build high quality training and evaluation data. We show how to train (meta-optimize) such a data scientist agent, so that it learns to create even stronger data. We describe the overall formulation, and a specific practical implementation, Agentic Self-Instruct. We conduct experiments on computer science research tasks, legal reasoning tasks and reasoning with mathematical objects, where we obtain improved results compared to classical synthetic dataset creation methods. Further, meta-optimizing the data scientist agent itself delivers an even larger performance uplift. Agentic data creation provides a way to convert increased inference compute into higher quality model training. Overall, we believe this direction has the potential to change the way we build AI data.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Farxiv.org%2Fstatic%2Fbrowse%2F0.3.4%2Fimages%2Ficons%2Ffavicon-32x32.png" width="32" height="32"&gt;
          arxiv.org
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>machinelearning</category>
      <category>llm</category>
      <category>datascience</category>
      <category>ai</category>
    </item>
    <item>
      <title>The 'Shipping Container' for AI: What is the Model Context Protocol (MCP) and Why It Matters?</title>
      <dc:creator>dang phan</dc:creator>
      <pubDate>Fri, 26 Jun 2026 13:48:43 +0000</pubDate>
      <link>https://dev.to/dangineer_4k2/the-shipping-container-for-ai-what-is-the-model-context-protocol-mcp-and-why-it-matters-2pi7</link>
      <guid>https://dev.to/dangineer_4k2/the-shipping-container-for-ai-what-is-the-model-context-protocol-mcp-and-why-it-matters-2pi7</guid>
      <description>&lt;p&gt;Imagine you are building a custom AI agent to manage your company's logistics. On day one, it needs to read from a PostgreSQL database. You write the integration. On day two, it needs to check a third-party weather API. You write another integration.&lt;/p&gt;

&lt;p&gt;By day ten, your agent is a tangled mess of custom code for every single data source. Every time you switch Large Language Models (LLMs), you have to rebuild those connections from scratch. This "integration tax" is the silent killer of AI productivity.&lt;/p&gt;

&lt;p&gt;We need a way to stop reinventing the wheel every time an agent needs context. We need a universal standard that allows any AI agent to talk to any data source without custom glue code.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Intuition: The Shipping Container for AI Data&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Imagine global logistics before the 1950s. Every company had custom-sized crates, and dock workers had to learn a different way to handle every single package. It was a logistical nightmare. The world only became efficient when we standardized the "shipping container." A crane operator doesn"t need to know if a container holds grain or high-end electronics—they just need to know how to move a container.&lt;/p&gt;

&lt;p&gt;The Model Context Protocol (MCP) is exactly that: a standardized shipping container for your AI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq93bhe7kmjgz004bp9tm.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq93bhe7kmjgz004bp9tm.jpeg" alt="The host uses its internal client to communicate with multiple servers over the MCP transport layer, regardless of the underlying data type." width="800" height="597"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What Is MCP?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Introduced by Anthropic in late 2024, MCP is an open standard protocol designed to provide context to LLMs. It replaces the need for custom-built Application Programming Interfaces (APIs) for every single tool or data source an agent uses.&lt;/p&gt;

&lt;p&gt;Architecturally, MCP operates on a client-server relationship using JSON RPC 2.0 sessions. There are three core components you need to know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MCP Host:&lt;/strong&gt; The main application, such as a chat app or a code assistant in your IDE.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP Client:&lt;/strong&gt; Resides within the host and maintains the connection to the servers.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP Server:&lt;/strong&gt; A small service that exposes specific capabilities like database access, file systems, or web search.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;These components communicate through the standardized MCP protocol, which defines how clients and servers exchange requests and capabilities.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmmsikn4ayy2jc3zrw1j1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmmsikn4ayy2jc3zrw1j1.png" alt="How an AI Host communicates with external systems through an MCP Client and MCP Server using a standardized protocol." width="800" height="604"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Three Primitives of MCP&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A server doesn't just "send data." It advertises its capabilities through three specific primitives:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Tools:&lt;/strong&gt; Discrete actions the AI can call, like &lt;code&gt;get_weather&lt;/code&gt; or &lt;code&gt;create_calendar_event&lt;/code&gt;. The server lists the tool name, description, and input/output schemas.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resources:&lt;/strong&gt; Read-only data items such as text files, database schemas, or specific documents that the client can fetch on demand.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt Templates:&lt;/strong&gt; Predefined templates that suggest how an agent should frame its requests to the server.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because every MCP server publishes a machine-readable catalog (e.g., &lt;code&gt;tools/list&lt;/code&gt;), an agent can discover and use new functionality at runtime without you having to redeploy your code.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why MCP Exists: Solving the Standardization Gap&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Before MCP, developers had to write copious amounts of code to specify tool metadata and enable third-party integrations for every project.&lt;/p&gt;

&lt;p&gt;Standardization matters because it brings five key benefits to the development lifecycle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Interoperability:&lt;/strong&gt; You can build applications that work across different platforms, models, and vendors (e.g., switching from OpenAI to Anthropic without changing your tool code).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reusability:&lt;/strong&gt; Build a tool once and reuse it across multiple projects.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consistency:&lt;/strong&gt; Your tools will behave the same way regardless of the model being used.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extendability:&lt;/strong&gt; It is much easier to add new functionality in the future without breaking the existing environment.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rapid Development:&lt;/strong&gt; No more reinventing the wheel for every custom integration.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;Before MCP&lt;/th&gt;
&lt;th&gt;After MCP&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Integration Method&lt;/td&gt;
&lt;td&gt;Custom API glue code&lt;/td&gt;
&lt;td&gt;Standardized protocol (JSON RPC 2.0)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data Handling&lt;/td&gt;
&lt;td&gt;Siloed, manual ingestion&lt;/td&gt;
&lt;td&gt;Normalized via "shipping containers"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Maintenance&lt;/td&gt;
&lt;td&gt;High; code-heavy updates&lt;/td&gt;
&lt;td&gt;Low; discoverable tools at runtime&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Architecture&lt;/td&gt;
&lt;td&gt;Rigid, direct connections&lt;/td&gt;
&lt;td&gt;Scalable, plug-and-play&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Flexibility&lt;/td&gt;
&lt;td&gt;Vendor/Model lock-in&lt;/td&gt;
&lt;td&gt;Interoperable across models&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Beyond developer productivity, MCP improves the AI's performance. By connecting to live, factual databases, it significantly reduces AI hallucinations.&lt;/p&gt;

&lt;p&gt;It also supports enhanced security through industry standards like OAuth 2.0 for authorization and TLS/SSL for encrypted communication traffic.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;MCP vs API: What's the Difference?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;You might be wondering: "Aren't we already doing this with APIs?" Not exactly. While APIs (especially RESTful ones) are the "web default," they function as abstraction layers.&lt;/p&gt;

&lt;p&gt;With a REST API, you must follow specific rules (GET, POST, PUT, DELETE) and formats for each individual service. A library system API might require a specific URL format just to fetch one book.&lt;/p&gt;

&lt;p&gt;MCP, on the other hand, is a protocol that sits on top of these sources. An MCP server can actually &lt;em&gt;connect&lt;/em&gt; to a REST API or a database and then present those capabilities to the AI in a uniform way.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;MCP (Model Context Protocol)&lt;/th&gt;
&lt;th&gt;REST API&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Nature&lt;/td&gt;
&lt;td&gt;Standardized communication protocol&lt;/td&gt;
&lt;td&gt;Web default architectural style&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Connection&lt;/td&gt;
&lt;td&gt;JSON-RPC 2.0 over standardized transport&lt;/td&gt;
&lt;td&gt;HTTP methods (GET, POST, PUT, DELETE)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Discovery&lt;/td&gt;
&lt;td&gt;Dynamic runtime discovery of tools/resources&lt;/td&gt;
&lt;td&gt;Manual integration/endpoint mapping&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Abstraction&lt;/td&gt;
&lt;td&gt;Standardized containers (High-level)&lt;/td&gt;
&lt;td&gt;Endpoint-specific (Low-level)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Primary Goal&lt;/td&gt;
&lt;td&gt;Context &amp;amp; Tool standardization for AI&lt;/td&gt;
&lt;td&gt;Universal web data &amp;amp; service access&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;A Real-World Scenario: The 100,000 Document Bank&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To see MCP in action, imagine you are an AI engineer building a Retrieval Augmented Generation (RAG) system for a bank with 100,000 documents.&lt;/p&gt;

&lt;p&gt;Normally, you would have to manage a complex vector database and scale an infrastructure to handle embeddings and retrieval logic yourself.&lt;/p&gt;

&lt;p&gt;With MCP, you can use a dedicated MCP server. When the LLM receives a query, it sends a prompt to the MCP server.&lt;/p&gt;

&lt;p&gt;The server performs the retrieval step, finds the most relevant document chunks, and returns only those snippets to the LLM. The server handles the "how," while the agent focuses on the "what."&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Standardization is the Core:&lt;/strong&gt; MCP acts as a universal layer, allowing developers to build tools that interact with any resource uniformly.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Architecture is Simple:&lt;/strong&gt; It uses a client-server, plug-and-play model based on JSON RPC 2.0.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Discovery at Runtime:&lt;/strong&gt; Agents can query a server’s catalog to discover tools and resources without manual coding for each update.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better AI Results:&lt;/strong&gt; By providing real-time data access, MCP reduces hallucinations and ensures information relevance.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Broad Utility:&lt;/strong&gt; It’s already being used in enterprise tasks (CRM, ticketing), agentic workflows, and specialized fields like DevOps and SecOps.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>architecture</category>
      <category>opensource</category>
    </item>
    <item>
      <title>hat Makes a Good SFT Sample (And Why Most Synthetic Datasets Get It Wrong)</title>
      <dc:creator>dang phan</dc:creator>
      <pubDate>Wed, 03 Jun 2026 02:45:48 +0000</pubDate>
      <link>https://dev.to/dangineer_4k2/hat-makes-a-good-sft-sample-and-why-most-synthetic-datasets-get-it-wrong-1dlb</link>
      <guid>https://dev.to/dangineer_4k2/hat-makes-a-good-sft-sample-and-why-most-synthetic-datasets-get-it-wrong-1dlb</guid>
      <description>&lt;p&gt;You've decided to fine-tune a language model. You generate a few hundred samples, load them into Axolotl or LLaMA-Factory, kick off training, and wait.&lt;/p&gt;

&lt;p&gt;The model comes out... worse. Or weirdly repetitive. Or it answers every question the same way regardless of context.&lt;/p&gt;

&lt;p&gt;The problem usually isn't your training setup. It's the data.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Uncomfortable Truth About Synthetic Datasets
&lt;/h2&gt;

&lt;p&gt;Generating synthetic SFT data is easy. Generating &lt;em&gt;good&lt;/em&gt; synthetic SFT data is not.&lt;/p&gt;

&lt;p&gt;Most pipelines do something like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Write a prompt: "Generate 500 customer support examples"&lt;/li&gt;
&lt;li&gt;Call an LLM&lt;/li&gt;
&lt;li&gt;Save the output&lt;/li&gt;
&lt;li&gt;Fine-tune&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The problem? There's no mechanism to catch what goes wrong. And a lot goes wrong.&lt;/p&gt;




&lt;h2&gt;
  
  
  What a Bad Sample Looks Like
&lt;/h2&gt;

&lt;p&gt;Here's a real example of what gets generated without any quality filter:&lt;/p&gt;

&lt;p&gt;Instruction: Respond to a customer asking about their refund status.&lt;/p&gt;

&lt;p&gt;Output: "Thank you for reaching out. Your refund is being processed. Please wait and we will get back to you soon."&lt;/p&gt;

&lt;p&gt;Looks fine at first glance. But think about what your model learns from this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When someone asks about their refund, say something vague&lt;/li&gt;
&lt;li&gt;Don't give a timeline&lt;/li&gt;
&lt;li&gt;Don't offer any next steps&lt;/li&gt;
&lt;li&gt;Just acknowledge and deflect&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fine-tune on enough samples like this and your model becomes an expert at saying nothing helpfully.&lt;/p&gt;

&lt;p&gt;Now here's what a good sample looks like:&lt;/p&gt;

&lt;p&gt;Instruction: Respond to a customer asking about their refund status.&lt;/p&gt;

&lt;p&gt;Output: "Your refund was approved on the 14th and has been submitted to your bank. Most banks process these within 3–5 business days, so you should see it by the 19th. If it hasn't appeared by then, reply here and I'll escalate immediately."&lt;/p&gt;

&lt;p&gt;Same instruction. Completely different training signal.&lt;/p&gt;




&lt;h2&gt;
  
  
  The 4 Things That Actually Matter
&lt;/h2&gt;

&lt;p&gt;When I evaluate an SFT sample, I look at four dimensions:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Relevance&lt;/strong&gt;&lt;br&gt;
Does the response directly address the instruction? An off-topic or partially relevant answer teaches your model to drift. Even a grammatically perfect response scores zero if it doesn't answer what was asked.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Factual Consistency&lt;/strong&gt;&lt;br&gt;
Are the claims in the response plausible and internally consistent? Hallucinated order numbers, impossible timelines, contradictory policies - these all slip through if you're not checking. Your model will learn to hallucinate the same way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Format Quality&lt;/strong&gt;&lt;br&gt;
Is the response correctly structured for the schema you're using? A broken JSON field or a response that ignores the output format contaminates your training data at the structural level.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Response Usefulness&lt;/strong&gt;&lt;br&gt;
Would this response actually help someone? This is the hardest one to catch automatically - a response can be relevant, factually consistent, and correctly formatted while still being completely useless. Vague acknowledgements without concrete next steps fail here.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why You Can't Just Prompt Your Way Out of This
&lt;/h2&gt;

&lt;p&gt;A common fix people try: write a better generation prompt. Add instructions like "be specific", "include timelines", "don't be vague".&lt;/p&gt;

&lt;p&gt;It helps. But it doesn't solve the problem.&lt;/p&gt;

&lt;p&gt;LLMs drift across long generation runs. The first 50 samples might follow your instructions carefully. By sample 300, the model is taking shortcuts, repeating patterns, and producing outputs that technically match the format but miss the intent.&lt;/p&gt;

&lt;p&gt;You need a separate evaluation pass - not more instructions in the generation prompt.&lt;/p&gt;




&lt;h2&gt;
  
  
  How a Judge Stage Works
&lt;/h2&gt;

&lt;p&gt;The idea is simple: use a second, stronger model to score every sample your generation model produces.&lt;/p&gt;

&lt;p&gt;The judge model doesn't generate. It evaluates. It reads each instruction-output pair and scores it on the four dimensions above, using a calibrated rubric with fixed anchor examples so the scoring stays consistent across the entire dataset.&lt;/p&gt;

&lt;p&gt;Samples below a quality threshold get cut. You deliberately generate more than you need so the filtering doesn't leave you short.&lt;/p&gt;

&lt;p&gt;The result: every sample that reaches your training loop has been independently evaluated, not just generated.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Full Pipeline
&lt;/h2&gt;

&lt;p&gt;In practice, the judge stage is one part of a larger quality process. Here's what a complete pipeline looks like:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stage 1 - Generation&lt;/strong&gt;&lt;br&gt;
Domain-aware generation with a domain-specific system prompt. Rolling context injection prevents semantic drift across batches.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stage 2 - Validation &amp;amp; Deduplication&lt;/strong&gt;&lt;br&gt;
Schema validation rejects malformed rows. Token length filtering removes samples outside the training-safe range. Deduplication (MinHash or semantic-based) removes similar samples that inflate dataset size without adding diversity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stage 3 - LLM-as-Judge Scoring&lt;/strong&gt;&lt;br&gt;
Every sample scored on the four dimensions above. Only samples above the threshold proceed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stage 4 - Human Review&lt;/strong&gt;&lt;br&gt;
Outputs reviewed for quality patterns before the final split. If a recurring issue is found, the threshold is adjusted and the affected stage re-runs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stage 5 - Split &amp;amp; Export&lt;/strong&gt;&lt;br&gt;
Shuffled 90/10 train/validation split. Output as production-ready JSONL in Alpaca or ShareGPT format.&lt;/p&gt;




&lt;h2&gt;
  
  
  What This Looks Like in Practice
&lt;/h2&gt;

&lt;p&gt;On a recent 500-sample run, here's what the filter funnel looked like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fewf1xr9plo6hatrxcnte.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fewf1xr9plo6hatrxcnte.png" alt="600 generated. 500 delivered. Every drop explained." width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generated: 600 samples&lt;/li&gt;
&lt;li&gt;After schema validation: 584 (-16 malformed rows)&lt;/li&gt;
&lt;li&gt;After token length filter: 572 (-12 too short / too long)&lt;/li&gt;
&lt;li&gt;After deduplication: 569 (-3 near-duplicates)&lt;/li&gt;
&lt;li&gt;After LLM judge: 500 (-69 below quality threshold)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The judge stage removed ~11% of samples. Deduplication removed less than 1%. Schema errors were caught early.&lt;/p&gt;

&lt;p&gt;The 69 samples removed by the judge are the ones that would have quietly degraded your model.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Takeaway
&lt;/h2&gt;

&lt;p&gt;A good SFT sample isn't just one that looks correct - it's one that teaches your model the right behavior.&lt;/p&gt;

&lt;p&gt;Vague responses teach vague behavior. Hallucinated details teach hallucination. Near-duplicate samples teach repetition.&lt;/p&gt;

&lt;p&gt;If you're building a domain-specific LLM, the quality of your training data matters more than almost any other variable. A better base model won't save you from bad data.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;I'm currently building a public Vietnamese legal Q&amp;amp;A dataset using this pipeline - one of the few domains with almost no public SFT data available. I'll share it on HuggingFace when it's ready.&lt;/p&gt;

&lt;p&gt;If you're working on a fine-tuning project and need a validated dataset for your domain, I build these as a service on Fiverr. Link in the comments.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If this was useful, follow for more posts on LLM fine-tuning, dataset preparation, and practical ML engineering.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>llm</category>
      <category>ai</category>
      <category>finetuning</category>
    </item>
    <item>
      <title>Building Idea2Socdia: A Multimodal AI Agent with Gemini and Vertex AI</title>
      <dc:creator>dang phan</dc:creator>
      <pubDate>Sun, 15 Mar 2026 15:26:01 +0000</pubDate>
      <link>https://dev.to/dangineer_4k2/building-idea2socdia-a-multimodal-ai-agent-with-gemini-and-vertex-ai-364c</link>
      <guid>https://dev.to/dangineer_4k2/building-idea2socdia-a-multimodal-ai-agent-with-gemini-and-vertex-ai-364c</guid>
      <description>&lt;p&gt;&lt;em&gt;I created this piece of content for the purposes of entering the Gemini Live Agent Challenge.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As a recent Computer Science graduate, transitioning from academic machine learning models to deploying a production-ready, Cloud-Native AI system is a thrilling leap. For this hackathon, I wanted to tackle a real-world problem: the "context-switching fatigue" that content creators face when juggling scriptwriting, image generation, and video rendering tools.&lt;/p&gt;

&lt;p&gt;The solution is &lt;strong&gt;Idea2Socdia&lt;/strong&gt;, a Human-In-The-Loop (HITL) multimodal AI agent. Here is a deep dive into how I built it using Google's ecosystem.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Architecture: 100% Cloud Native
&lt;/h2&gt;

&lt;p&gt;To ensure scalability and maintain a stateless architecture, the system is fully deployed on Google Cloud:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; A responsive Next.js application hosted on Google Cloud Run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; A high-performance FastAPI server, also containerized via Docker and running on Cloud Run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Media Storage:&lt;/strong&gt; Google Cloud Storage (GCS) securely holds all generated assets and serves public URLs back to the client.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Brain: Gemini 3 Flash &amp;amp; Interleaved Generation
&lt;/h2&gt;

&lt;p&gt;The core orchestration relies on &lt;strong&gt;Gemini 3 Flash&lt;/strong&gt; via the new &lt;code&gt;google-genai&lt;/code&gt; SDK. Instead of traditional multi-step prompting, Idea2Socdia leverages &lt;strong&gt;interleaved generation&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;The LLM acts as a "Content Director." As it streams the strategic outline and script back to the Next.js frontend via NDJSON, it autonomously evaluates the narrative. When it determines a visual is needed, it pauses the text stream, constructs a highly contextual prompt, and triggers a media generation tool call. &lt;/p&gt;

&lt;h2&gt;
  
  
  The Media Engine: Vertex AI
&lt;/h2&gt;

&lt;p&gt;For the visual components, the backend securely authenticates with Google Cloud via OAuth2 to access &lt;strong&gt;Vertex AI&lt;/strong&gt; endpoints. &lt;br&gt;
Depending on the target platform (e.g., a Facebook post vs. a YouTube Short), the agent dynamically decides whether to call state-of-the-art text-to-image models (like Nano Banana) or text-to-video models (like Veo). Once Vertex AI returns the media bytes, the backend streams them directly to GCS, bypassing the need for local persistent storage on Cloud Run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Building Idea2Socdia provided deep, practical experience in orchestrating complex LLM workflows and managing enterprise-grade cloud resources. By strictly grounding the model and keeping the human in the loop, the system transforms raw ideas into ready-to-publish social campaigns seamlessly.&lt;/p&gt;

&lt;p&gt;You can check out the public repository here: &lt;a href="https://github.com/PTD504/idea-to-socdia" rel="noopener noreferrer"&gt;Idea2Socdia&lt;/a&gt;&lt;/p&gt;

</description>
      <category>googlecloud</category>
      <category>gemini</category>
      <category>geminiliveagentchallenge</category>
      <category>automation</category>
    </item>
  </channel>
</rss>
