Policy-as-logic for robust reasoning over rules
This paper introduces a hybrid symbolic approach that combines language models for fact extraction with an answer set solver for logical reasoning to ensure AI responses adhere to written policies, achieving superior accuracy, interpretability, and robustness with significantly reduced token usage compared to existing methods.
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 teach a very talented, but slightly scatterbrained, robot how to follow a rulebook. This robot is a Large Language Model (LLM), a type of artificial intelligence that is amazing at understanding stories, jokes, and human conversation. It can read a thousand-page novel and tell you exactly how the characters feel. However, when you ask this robot to do strict math or follow a rigid set of "if-then" rules—like calculating taxes or deciding if a suitcase is too heavy—it sometimes gets confused. It might get distracted by a funny word, or if you change the order of the rules, it might give a completely different answer. This is a problem for real-world jobs like airlines, tax offices, or hospitals, where decisions need to be perfect, fair, and consistent, no matter how you ask the question.
To fix this, scientists are mixing two different types of thinking. One is the "creative" brain of the AI, which is great at reading messy human language. The other is a "logical" brain, a strict computer program that acts like a super-precise calculator or a judge who never gets tired or emotional. The big question researchers are asking is: Can we let the creative AI read the rules and the messy questions, but then hand the actual decision-making over to the strict logical brain? This paper explores that exact idea, testing whether splitting the job between a creative reader and a strict logic machine makes for a smarter, more reliable decision-maker.
The "Translator and the Judge" Approach
The researchers behind this paper, Rahul Nair, Bastian Lipka, and Elizabeth Daly, propose a clever new way to handle policy rules, which they call Policy-as-Logic. Think of it as a two-person team: a Translator and a Judge.
In the old way of doing things (which they call "Policy-as-Prompt"), you would just dump the entire rulebook and the user's question into the AI's brain all at once and hope it figures it out. It's like asking a brilliant but distracted student to solve a complex math problem while reading a novel at the same time. Sometimes they get it right, but if you change the wording of the question slightly, they might get confused and give a wrong answer.
The new "Policy-as-Logic" method splits the work:
- The Translator (The AI): First, the AI reads the user's messy, natural language question (like "I have one 20kg bag and I'm flying economy"). It doesn't try to solve the problem yet. Instead, it acts as a translator, turning that sentence into a neat, structured list of facts, like a JSON file. It extracts the important numbers and categories, ignoring the fluff.
- The Judge (The Logic Solver): Once the facts are extracted, they are handed over to a strict logic engine (specifically an Answer Set Solver). This engine doesn't care about feelings or wordplay; it only looks at the hard facts and the written rules. It runs a calculation to see if the rules allow the action.
- The Verdict: The logic engine spits out a clear "Yes" or "No," which is then translated back into a human-friendly answer.
What They Found: The "Robustness" Win
The team tested this method on four different real-world scenarios: Airline baggage fees, Income tax calculations, NBA player salary rules, and HR content moderation (deciding if a workplace situation is safe).
The results were a huge win for the "Translator and Judge" team, especially in the world of hard facts.
- Accuracy: On the Airline and Tax domains, where rules are based on hard numbers (like weight and money), their new method was nearly perfect, scoring between 0.94 and 1.00 accuracy. In contrast, the old "Policy-as-Prompt" method (just asking the AI directly) struggled, often scoring below 0.40. Even the smallest AI model they tested jumped from a 0.01 accuracy to 0.61 when using this new pipeline.
- Robustness (The "Stress Test"): This is the most exciting part. The researchers tried to trick the systems by changing the questions in silly ways—making them sound cheerful, frustrated, or adding distracting details. The old AI methods collapsed; their accuracy dropped to 0.00 on tax questions when the wording changed. But the "Policy-as-Logic" method stayed strong, keeping its accuracy high because the logic solver doesn't get distracted by tone. It's like a judge who ignores whether the lawyer is shouting or whispering and only looks at the evidence.
- Efficiency: The new method was also much cheaper to run. Because the AI only had to read a small "schema" (a template of what to look for) instead of the whole rulebook every time, it used about 10 times fewer tokens (the units of text the AI processes). For example, on Airline questions, the old method used over 11,000 tokens, while the new method used only 1,175.
The Catch: When Rules Get "Fuzzy"
However, the paper also found a limit to this superpower. When they tested the method on HR content moderation, where the rules are subjective (like "Is this message harmful?"), the new method didn't offer much of an advantage. In these cases, the rules rely on human belief and interpretation rather than hard math. Since the AI still has to make the initial judgment call to extract the facts, and the logic solver can't really "think" about feelings better than the AI can, the two methods performed about the same (around 0.93 to 0.96 accuracy).
The authors suggest that this proves their point: Policy-as-Logic is a fantastic tool for objective, knowledge-based rules (like math and physics), but it doesn't magically fix problems where the rules themselves are vague or rely on human opinion.
The Bottom Line
This paper suggests that for the most critical, rule-based decisions in our world, we shouldn't just rely on a single AI to do everything. Instead, we should let the AI be the translator that understands our messy language, and then hand the reins to a strict logic machine to make the final call. This combination makes decisions more accurate, much harder to trick, and significantly cheaper to run, as long as the rules being followed are clear and objective. It's a reminder that sometimes, the smartest thing an AI can do is know when to stop guessing and start calculating.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.