SemPlan: Benchmarking Structured Semantic Planning for LLM-Based Queries over Enterprise Data
The SemPlan benchmark evaluates four architectural approaches for translating natural-language queries into executable enterprise data operations, revealing that while structured semantic planning (A3) yields the highest answer correctness, no single architecture universally optimizes all metrics, as each exhibits distinct trade-offs between accuracy, policy compliance, cost, and stability.
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 ask a super-smart robot librarian for a specific book, but you don't know the library's secret code system. You just say, "I want the book about dragons from the red shelf." The robot has to figure out exactly what you mean, check if you are allowed to see that shelf, and then find the book. This is the world of Natural Language Interfaces to Enterprise Data. It's the science of letting regular people talk to complex databases using normal sentences instead of computer code.
For a long time, scientists have worried that these robots might get the syntax right (writing a valid computer command) but the meaning wrong (finding the wrong book), or they might break the rules and let you see books you aren't allowed to touch. The big question is: How do we build the best "brain" for this robot? Should we let the robot write the computer code directly? Should we give it a set of specific tools to use? Or should we force it to write a detailed plan first before it does anything? This paper, called SemPlan, is a giant experiment to find out which of these "brain designs" actually works best when the stakes are high and the data is tricky.
The Great Robot Brain-Off
The researchers set up a massive, controlled battle royale in a fake but very realistic "Northstar Commerce" universe. They created 1,800 different questions in both English and Brazilian Portuguese, ranging from simple requests like "How much money did we make?" to tricky, multi-part puzzles that try to trick the robot. They then tested four different robot architectures (let's call them Team A, B, C, and D) using the exact same super-smart model (a specific version of an AI called gpt-5.6-luna) to make sure the comparison was fair.
Here is how the four teams played the game:
- Team A (The Direct Writer): This robot hears your question and immediately tries to write the computer code (SQL) to get the answer. It's like asking a student to solve a math problem on a whiteboard without showing their work.
- Team B (The Tool User): This robot doesn't write code. Instead, it has a toolbox. It has to pick the right tools (like "add numbers" or "sort by date") and click them in the right order. It's like a chef who can only use pre-made ingredients and specific kitchen gadgets.
- Team C (The Planner): This robot doesn't write code or pick tools. Instead, it writes a strict, structured semantic request—a very specific, organized plan that says exactly what data is needed. A separate, boring-but-perfect computer program then takes this plan and turns it into code. It's like a student who writes a perfect outline, and a different person writes the final essay based on that outline.
- Team D (The Clarifier): This is Team C's older sibling. It also writes a plan, but if the question is confusing, it is allowed to ask for clarification or remember what was said before in the conversation. It's like a detective who can go back and ask, "Wait, did you mean the red dragon or the blue one?"
The Results: No Perfect Winners
After running 4,800 total tests (1,200 questions for each of the four teams), the results were surprising. The big takeaway? There is no single "best" robot. It's a trade-off, like choosing between a sports car, a truck, and a fuel-efficient sedan. You can't have the speed of the sports car, the hauling power of the truck, and the gas mileage of the sedan all in one vehicle.
Here is what the data showed:
1. The Accuracy Race
If you just want the right answer, Team C (The Planner) was the winner, but it wasn't a landslide.
- Team C got the right answer 25.67% of the time.
- Team D (The Clarifier) came in second at 24.25%.
- Team B (Tool User) was at 22.58%.
- Team A (Direct Writer) was last at 22.25%.
While Team C was statistically better than the others, the paper notes that getting the right answer only about 1 out of 4 times is still pretty low. Even the "best" design struggled with the complexity of the questions.
2. The Safety and Rules Race
This is where the teams swapped places.
- Team A (Direct Writer) was the safest. It followed the rules (policy) the best (43.67%) and was the least likely to do something dangerous or invalid (31.00%). It was very conservative; if it wasn't sure, it often just said "I can't do that" (a "false refusal") rather than risking a mistake.
- Team D (The Clarifier) was the most polite (only refusing 0.17% of the time) but the riskiest. It had the highest rate of unsafe or invalid actions (64.08%). It tried so hard to be helpful that it sometimes broke the rules.
3. The Cost and Stability
- Team D was the cheapest to run, costing only $0.000469 per question on average.
- Team C was the most stable. When they asked the same question three times, Team C gave the same correct answer 98.67% of the time. Team B was the least stable, only repeating correctly 92.00% of the time.
4. The "Language" Surprise
The researchers also noticed that every single team did worse when the questions were in Brazilian Portuguese compared to English. For example, Team C got 31.00% right in English but only 20.33% right in Portuguese. This suggests that even with the best design, language differences still cause big problems.
What This Means for the Future
The paper explicitly rules out the idea that "more structure is always better." You might think that forcing the robot to write a detailed plan (Team C) or ask for clarification (Team D) would fix everything. The data says no. Adding structure changed how the robots failed, but it didn't magically fix the fact that they were still getting the wrong answer most of the time.
- Team A is safe but often gives up too easily.
- Team B is okay but inconsistent.
- Team C is the most accurate and stable, but it's not perfect.
- Team D is cheap and polite, but it's dangerous and less accurate.
The author concludes that we shouldn't just look for the one "winner" with the highest accuracy score. Instead, we need to look at the whole picture: Do we care more about safety (Team A)? Do we care more about getting the right answer (Team C)? Or do we care about saving money (Team D)?
The study suggests that for now, even the smartest AI designs are still struggling to perfectly understand complex business questions. The path forward isn't just about building a "better" robot; it's about understanding the specific trade-offs of each design and picking the right tool for the specific job. As the paper puts it, this isn't a "solved problem" yet; it's a map showing us where the pitfalls are so we can build better systems in the future.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.