AI
New technique dramatically cuts AI hallucinations by injecting facts into the neural attention mechanism
Researchers demonstrate a method that boosts factual accuracy from 6% to nearly 100% by modifying how transformers process information, without requiring model retraining.
Large language models excel at mimicking human language but stumble when it comes to reliably recalling facts, often generating plausible-sounding but entirely false information. Researchers have now proposed a structural solution: embedding verifiable knowledge directly into the mathematical core of how these models process text.
The approach: grounding facts at the attention layer#
The technique, called Fact Grounded Attention (FGA), intervenes at a fundamental level in transformer architecture—the attention mechanism that determines which parts of the input influence each output token. Rather than trying to correct hallucinations after they occur or prepending retrieved facts to prompts, FGA modifies the pre-softmax attention scores themselves, effectively forcing the model to prioritize and respect factual information when it exists in the knowledge base.
This architectural change transforms what is normally a probabilistic system into one that operates deterministically for queries about verifiable facts, preventing false outputs when correct information is available.
Dramatic accuracy gains in testing#
The researchers evaluated FGA across 1,107 technical queries covering smartphones, laptops, and electric vehicles. The baseline vanilla Llama 3.2 model achieved just 6.3% accuracy on factual queries, while the same model augmented with FGA reached 99.7% accuracy—a nearly 16-fold improvement. Crucially, the knowledge base can be updated in under a second without retraining the underlying model, compared to hours required for other parameter-editing approaches.
Implications for deployment#
By eliminating hallucination for factual queries rather than merely reducing it, FGA marks a shift away from probabilistic approximation toward deterministic precision in language generation. The rapid update mechanism suggests this approach could enable practical deployment scenarios where knowledge bases need frequent refreshing, such as product specifications or technical documentation.

