New framework helps AI agents avoid errors

New framework helps AI agents avoid errors

This innovation separates core logic from search methods in AI systems, making it easier to fix mistakes and improve performance without major code changes.
GP
Giulio Prisco
Jan 16, 2026
2 min read

If you use consumer artificial intelligence (AI) like chatbots, you might notice "brain fog," where the AI forgets parts of the conversation. This issue also affects AI agents, which are programs that combine large language models with traditional computer code to handle complex, multistep tasks. As these agents grow more complicated, involving many decisions, the large language models often make mistakes that build up over time.

Researchers from Asari AI, Caltech, and MIT created a new tool called EnCompass to fix this. It lets programmers spot and correct errors quickly without changing the main code. Instead, they can try different search strategies - explore and evaluate different possible sequences of steps in an AI agent's execution. - to find the best results. EnCompass was presented at the Conference on Neural Information Processing Systems (NeurIPS) in San Diego last month.

How EnCompass works

With EnCompass, programmers add simple labels to their code: "branchpoints" for key decision spots and "scores" for places to check how well a path is working. This separates the agent's main rules from how it searches for solutions, making experiments easier. For example, in translating code from Java to Python using a large language model, errors might happen in different functions. Traditional methods require rewriting code with complex loops to backtrack and fix issues, which gets hard as agents become bigger.

EnCompass avoids this by letting programmers switch search strategies fast. Simple ones include "global best-of-N," running the agent many times and picking the top outcome, or "local best-of-N," trying different options for each step and choosing the best one. A more advanced strategy, beam search, explores multiple branches like a tree, branching out from promising points and pruning less useful ones. Tests showed EnCompass cuts the code needed ti implement search by 80 percent and boosts accuracy from 15 percent to 40 percent on code translation tasks. This could help build reliable AI for tough problems in health, government, and engineering. The work is detailed in a research paper presented at NeurIPS.

About the Writer

More from Mindplex

Keep reading

Three more ideas worth your time.

Browse News

Discussion

Join the discussion

Sign in to share a response with the community.

Type @ to mention someone Type / or use + to add a block Highlight text, then choose Link
Loading editor

Comments cannot be edited after posting because they become part of the reputation record. Give yours a quick review first.