← Latest papers
🤖 machine learning

SemPiper: Interactive Code Synthesis for Semantic Operators in Machine Learning Pipelines

This paper introduces SemPiper, an interactive system that integrates large language models into machine learning pipelines by allowing developers to define high-level natural language data operations as declarative semantic operators, which are then automatically synthesized and optimized alongside standard Python code to create controllable and efficient ML workflows.

Original authors: Olga Ovcharenko, Luciano Duarte, Sebastian Schelter

Published 2026-06-15
📖 5 min read🧠 Deep dive

Original authors: Olga Ovcharenko, Luciano Duarte, Sebastian Schelter

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are building a complex machine to sort, clean, and analyze a massive pile of mixed-up data. In the world of Machine Learning (ML), this machine is called a pipeline. Usually, building this machine is like being a master carpenter: you have to hand-craft every single joint, sand every piece of wood, and write thousands of lines of code just to get the machine to run. It's tedious, easy to mess up, and if you want to change how the machine works, you often have to rebuild it from scratch.

Recently, people started using "AI assistants" (Large Language Models, or LLMs) to write code for us. But this is like asking a chatbot to build your machine for you. You type a request, it spits out a block of code, and you hope it works. The problem? You have very little control. If the machine acts up, it's hard to tweak the AI's output, and the code it writes is often messy and hard to optimize for real-world use.

Enter SemPiper (and its engine, SemPipes).

Think of SemPipes not as a chatbot that writes code for you, but as a smart foreman who helps you build your machine. Instead of asking the AI to do the whole job, you tell the foreman specific, high-level instructions in plain English (like "clean up this messy list of countries" or "figure out if this product looks luxurious").

Here is how it works, using a few analogies:

1. The "Smart Foreman" Approach (Declarative Operators)

In a normal pipeline, you write the code yourself. In SemPipes, you add special "Semantic Operators" to your machine. These are like magic tools on your workbench.

  • You don't tell the tool how to cut the wood; you just tell it what to cut.
  • You say, "Take these product images and tell me if they look expensive," and the tool understands the instruction.
  • The system then uses the AI only at the construction phase (training time) to figure out the best way to build that specific tool for your specific pile of wood (data). Once the tool is built, it becomes a standard, fast piece of code that runs without needing the AI anymore.

2. The "Evolutionary Search" (The Trial-and-Error Coach)

Once the machine is built, how do you make it better? Usually, a human has to guess what to change. SemPipes has a built-in Evolutionary Coach.

  • Imagine the coach runs a thousand tiny simulations of your machine.
  • It takes the "magic tools" and slightly tweaks their instructions (like asking the AI to try a different way of cleaning the data).
  • It tests these tweaked versions to see which one makes the final machine predict better.
  • It keeps the best versions and throws away the bad ones, slowly "evolving" the machine into a super-efficient version. It visualizes this process like a family tree of code, showing you exactly which changes led to success.

3. The Three Real-World Scenarios

The paper demonstrates this system with three different "construction projects":

  • The Fraud Detective: Imagine a store trying to spot fake shopping baskets. The system uses a semantic tool to look at product names and descriptions to guess if a brand is "risky" or "luxury," and another tool to fill in missing manufacturer names by guessing based on context. It then combines all this info to catch the fraudsters.
  • The Museum Curator: Imagine a museum with messy records of art pieces. Some dates are written as "18th Century," others as "1750-1760." The system uses a semantic tool to turn all these messy dates into a clean, structured format. It also uses another tool to organize the chaotic names of the art pieces so a computer can understand them.
  • The Real Estate Appraiser: Imagine predicting house prices using both numbers (square footage) and photos. The system uses a tool to look at house photos and describe the exterior (e.g., "does it have a garage?"). It then uses another tool to fix weird errors in the square footage numbers. Finally, it combines all this to guess the price.

The Big Picture

The SemPiper interface is the "showroom" where you can see all this happening. It lets you:

  1. See the Blueprint: Visualize the machine's flow (the computational graph).
  2. Peek Under the Hood: Look at the actual code the AI generated for your specific instructions.
  3. Tweak and Watch: Change your English instructions and watch the AI rewrite the code instantly.
  4. Watch the Evolution: See the "Coach" running its simulations, showing you how the machine got better step-by-step.

In short: SemPipes bridges the gap between the messy, creative power of AI and the strict, reliable needs of engineering. It lets you speak to your data in plain English, but it ensures the final result is a robust, optimized, and controllable machine that doesn't rely on the AI to run every single day.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →