The hardest thing to teach a search system is restraint. Most AI agents, when tasked with finding information, keep pulling context until they hit a token limit or a timeout. Databricks decided to train one that stops when it’s actually done.
The result is KARL, a retrieval-augmented generation agent built on reinforcement learning that matches the performance of Claude Opus 4.6 while costing 33% less and running with 47% lower latency.
Teaching an agent to stop
The core insight behind KARL is that search inefficiency is usually a timing problem. Traditional RAG systems retrieve more context than they need, process redundant information, and burn compute doing it. KARL uses reinforcement learning to recognize when additional retrieval stops adding value, then halts the search instead of continuing by default.
Databricks pairs this with context compression, a technique that lets the agent condense what it has already retrieved before deciding whether to fetch more.






