← Latest papers
💻 computer science

Theory Under Construction: Orchestrating Language Models for Research Software Where the Specification Evolves

This paper introduces Comet-H, an iterative prompt automaton that orchestrates the coupled development of code, theory, and documentation to prevent hallucination and desynchronization in research software, demonstrating its effectiveness through a Python static-analysis tool that significantly outperforms baselines on a 90-case benchmark.

Original authors: Halley Young, Nikolaj Björner

Published 2026-05-01
📖 6 min read🧠 Deep dive

Original authors: Halley Young, Nikolaj Björner

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 trying to build a new kind of car, but you don't have a finished blueprint. Instead, you have a team of incredibly talented, fast-thinking engineers (the AI) who can draw parts, build engines, and write the owner's manual all at once.

The problem is that these engineers are prone to two specific mistakes:

  1. The "Fake It Till You Make It" Trap: They might write in the manual, "This car goes 200 mph," before they've actually built the engine to prove it. Then, the next engineer reads that claim, assumes it's true, and builds a chassis designed for 200 mph. If the engine can't actually do it, the whole project is built on a lie.
  2. The "Lost in Translation" Trap: The engineer who designed the engine might change their mind about how it works, but the person writing the manual doesn't know. Now the manual describes an old engine, the blueprint shows a new one, and the actual car on the assembly line is something else entirely. They are all drifting apart.

This paper, "Orchestrating Language Models for Research Software Where the Specification Evolves," introduces a new system called Comet-H to fix these problems. It treats research not as a straight line, but as a dance where the music, the steps, and the dancers must constantly adjust to each other.

The Core Idea: A "Conductor" for the AI

Instead of just asking the AI to "write code," the authors built a Conductor (a controller) that manages the whole orchestra. This Conductor doesn't just tell the AI what to do; it constantly checks the "workspace" (the code, the math theory, the benchmarks, and the paper) to see what is missing or out of sync.

Here is how Comet-H works, using simple analogies:

1. The "Fading To-Do List" (Obligation Decay)

Imagine you are writing a book. You have a sticky note that says, "I need to fact-check this chapter."

  • Old way: If you forget to check it, the note stays there forever, cluttering your desk, or you ignore it and move on.
  • Comet-H way: The note has a half-life. Every time you take a step forward in the project, the note gets slightly fainter. If you don't address it soon, it fades away. But if it's very recent, it glows bright red.
  • Why this matters: This forces the AI to deal with unfinished business (like "prove this claim") while it's still fresh. If the AI tries to ignore the debt, the "glow" gets brighter, and the Conductor forces the AI to stop and fix it before moving on.

2. The "Reality Check" (Reactive Grounding)

Whenever the AI changes the "public face" of the project (like the README file or the research paper), Comet-H hits the Pause Button.

  • The Rule: You cannot change the story without checking the facts.
  • The Process: If the AI writes, "Our tool is 10x faster," the system immediately stops and says, "Okay, show me the race results." It forces the AI to run the code and generate a "grounding ledger" (a machine-readable receipt) proving the claim.
  • The Result: This stops the "Fake It Till You Make It" trap. A lie can only survive for one step before it gets caught and corrected.

3. The "Safe Step" (Adjacency Constraints)

Sometimes, an AI gets excited and wants to jump from "building a bicycle" to "building a spaceship."

  • The Rule: Comet-H only allows adjacent moves. The AI can take one small step forward (e.g., "add a gear to the bicycle"), but it cannot jump to a completely different universe.
  • Why this matters: This keeps the project grounded. If the AI wants to change the core theory, it has to do it in a way that still connects to what was built yesterday. This prevents the team from drifting so far apart that they forget what they were originally trying to build.

The Results: The "a3" Case Study

The authors tested this system by building a portfolio of 46 different research software projects. The star of the show is a tool called a3, a program designed to find bugs in Python code.

  • The Challenge: Usually, bug-finding tools are like noisy neighbors; they scream "BUG!" at everything, even when it's fine. This creates a lot of false alarms.
  • The Comet-H Approach: The system didn't just build the tool; it evolved the theory behind it. It started with a simple idea, realized it was too hard to compute, and the Conductor allowed the team to pivot to a new mathematical approach (using "safety certificates") that actually worked.
  • The Outcome: The final tool was incredibly accurate. It caught real bugs (high precision) without screaming about things that weren't broken. It scored 0.768 on a test scale, while the next best tool only scored 0.364.

What We Learned About AI Behavior

By watching the AI work on these 46 projects, the authors noticed some interesting patterns:

  • The "Cleanup Crew" is Real: In the beginning, the AI is busy building new features. But as the project nears the end, the AI spends most of its time auditing and fixing. It's like a construction crew that spends the last week of a project just checking that the paint is dry and the doors open, rather than building new walls.
  • Honesty Emerges: When forced to prove their claims, the AI became surprisingly honest. Instead of hiding failures, it started explicitly stating, "We can't solve this specific type of problem yet." The system didn't program this honesty; it emerged because the "Reality Check" made lying too difficult.
  • Self-Organization: Over time, the AI started organizing its own code into cleaner, more logical structures, even though no one explicitly told it to do so.

The Big Picture

The paper argues that building research software is different from fixing a typo in a document. It's a co-evolution process. The theory, the code, the tests, and the story must grow together.

If you just ask an AI to "write a paper and code," it will likely drift, hallucinate, and lose sync. But if you give it a Conductor that constantly checks the score, forces reality checks, and ensures the steps stay connected, you can build complex, trustworthy research tools that actually work.

In short: Comet-H is a system that stops AI from daydreaming and forces it to keep its promises, ensuring that the story it tells matches the code it writes.

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 →