Language model framework checks answers against rules in context

GT-FENG: General Theory of Factual Evaluation and Normative Grounding in Language Models *Author(s)

Computation and Language

Summary

Sometimes a language model's answer can be right or wrong depending on the rules that apply, like laws or policies that change by place or time. The authors created GT-FENG, a system that looks at the rules to see if answers match and explains which rules cause mistakes. They found that knowing the right context, like a state’s own records, helps to reduce errors in answers about rules like Medicaid income limits. This framework helps check how language models perform in areas with complex rules and can guide future tools for evaluation.

What this means in practice

  • For legal technology teams: Evaluate and explain language model responses against jurisdiction-specific laws and policies to improve accuracy in legal question answering.
  • For policy compliance teams: Check automated answers about regulations by matching them against current documented rules to identify errors and their sources.

Authors

Jiayu Feng

Abstract

Whether a language model's answer is correct often depends on context: the same value can be right under one jurisdiction, date, or legal definition and wrong under another. We introduce GT-FENG (General Theory of Factual Evaluation and Normative Grounding), the first general framework to unify contextual/temporal correctness and rule-based error attribution across law, policy, and other rule-governed domains. GT-FENG checks answers against the applicable rules and identifies documented rules that match incorrect answers. It shows that when multiple rules give the same value, the answer alone cannot tell which rule the model used. In Medicaid income-limit answers from two models, documenting the asked state's own records reduces the number of wrong answers that match only other states' values by 68-78%, and more than half of stable wrong answers then match two or more documented sources. GT-FENG provides a foundation for evaluating language models in rule-governed domains and for future benchmarks and evaluation toolkits. We release GT-FENG as an open-source Python package, gtfeng.