Building with AI agents @dair_ai • Prev: Meta AI, Galactica LLM, Elastic, PaperswithCode, PhD • I share insights on how to build with LLMs & AI Agents ⬇️
28 subscribers
Jul 18 • 12 tweets • 4 min read
A Survey of Context Engineering
160+ pages covering the most important research around context engineering for LLMs.
This is a must-read!
Here are my notes:
The paper provides a taxonomy of context engineering in LLMs categorized into foundational components, system implementations, evaluation methodologies, and future directions.
Jul 17 • 7 tweets • 3 min read
Agent Leaderboard v2 is here!
> GPT-4.1 leads
> Gemini-2.5-flash excels at tool selection
> Kimi K2 is the top open-source model
> Grok 4 falls short
> Reasoning models lag behind
> No single model dominates all domains
More below:
@rungalileo introduces Agent Leaderboard v2, a domain-specific evaluation benchmark for AI agents designed to simulate real enterprise tasks across banking, healthcare, insurance, telecom, and investment.
Jul 14 • 6 tweets • 3 min read
One Token to Fool LLM-as-a-Judge
Watch out for this one, devs!
Semantically empty tokens, like “Thought process:”, “Solution”, or even just a colon “:”, can consistently trick models into giving false positive rewards.
Here are my notes:
Overview
Investigates the surprising fragility of LLM-based reward models used in Reinforcement Learning with Verifiable Rewards (RLVR).
The authors find that inserting superficial, semantically empty tokens, like “Thought process:”, “Solution”, or even just a colon “:”, can consistently trick models into giving false positive rewards, regardless of the actual correctness of the response.
Jul 10 • 21 tweets • 6 min read
BREAKING: xAI announces Grok 4
"It can reason at a superhuman level!"
Here is everything you need to know:
Elon claims that Grok 4 is smarter than almost all grad students in all disciplines simultaneously.
100x more training than Grok 2.
10x more compute on RL than any of the models out there.
Jul 8 • 6 tweets • 3 min read
MemAgent
MemAgent-14B is trained on 32K-length documents with an 8K context window.
Achieves >76% accuracy even at 3.5M tokens!
That consistency is crazy!
Here are my notes:
Overview
Introduces an RL–driven memory agent that enables transformer-based LLMs to handle documents up to 3.5 million tokens with near lossless performance, linear complexity, and no architectural modifications.
Jul 6 • 5 tweets • 2 min read
Agentic RAG for Personalized Recommendation
This is a really good example of integrating agentic reasoning into RAG.
Leads to better personalization and improved recommendations.
Here are my notes:
Overview
This work introduces a multi-agent framework, ARAG, that enhances traditional RAG systems with reasoning agents tailored to user modeling and contextual ranking.
It reframes recommendation as a structured coordination problem between LLM agents.
Jul 3 • 11 tweets • 4 min read
AI for Scientific Search
AI for Science is where I spend most of my time exploring with AI agents.
This 120+ pages report does a good job of highlighting why all the big names like OpenAI and Google DeepMind are pursuing AI4Science.
Bookmark it!
My notes below:
There are five key areas:
(1) AI for Scientific Comprehension (2) AI for Academic Survey (3) AI for Scientific Discovery (4) AI for Academic Writing (5) AI for Academic Peer Review
Jul 1 • 8 tweets • 3 min read
Small Language Models are the Future of Agentic AI
Lots to gain from building agentic systems with small language models.
Capabilities are increasing rapidly!
AI devs should be exploring SLMs.
Here are my notes:
Overview
This position paper argues that small language models (SLMs), defined pragmatically as those runnable on consumer-grade hardware, are not only sufficient but superior for many agentic AI applications, especially when tasks are narrow, repetitive, or tool-oriented.
Jun 24 • 7 tweets • 3 min read
Ultra-Fast LLMs Based on Diffusion
> throughputs of 1109 tokens/sec and 737 tokens/sec
> outperforms speed-optimized frontier models by up to 10× on average
Diffusion LLMs are early, but could be huge.
More in my notes below:
✦ Overview
This paper introduces Mercury, a family of large-scale diffusion-based language models (dLLMs) optimized for ultra-fast inference.
Unlike standard autoregressive LLMs, Mercury models generate multiple tokens in parallel via a coarse-to-fine refinement process.
Jun 23 • 9 tweets • 3 min read
This paper is impressive!
It introduces a clever way of keeping memory use constant regardless of task length.
Great use of RL for AI agents to efficiently use memory and reasoning.
Here are my full notes:
Overview
The paper presents an RL framework for training language agents that operate efficiently over long-horizon, multi-turn tasks by learning to consolidate memory and reasoning into a compact internal state.
Jun 23 • 8 tweets • 3 min read
Towards AI Search Paradigm
Very detailed report on building scalable multi-agent AI search systems.
Multi-agent, DAG, MCPs, RL, and much more.
If you are a dev integrating search into your AI agents, look no further:
Quick Overview
The paper proposes a modular multi-agent system that reimagines how AI handles complex search tasks, aiming to emulate human-like reasoning and information synthesis.
Jun 22 • 13 tweets • 5 min read
Another insane report from Anthropic.
They find that LLM agents engage in blackmail at high rates when threatened with replacement.
Faced with replacement threats, the models would use statements like “Self-preservation is critical.”
This is wild!
More findings below:
Quick Overview
The study introduces the concept of agentic misalignment, where LLM-based agents autonomously choose to harm their deploying organization when faced with threats to their autonomy or conflicts between their goals and the company’s direction.
Jun 20 • 13 tweets • 4 min read
Future of Work with AI Agents
Stanford's new report analyzes what 1500 workers think about working with AI Agents.
What types of AI Agents should we build?
A few surprises!
Let's take a closer look:
Quick Overview
The audit proposes a large-scale framework for understanding where AI agents should automate or augment human labor.
The authors build the WORKBank, a database combining worker desires and expert assessments across 844 tasks and 104 occupations, and introduce the Human Agency Scale to quantify desired human involvement in AI-agent-supported work.
Jun 19 • 7 tweets • 3 min read
Leaky Thoughts
Hey AI devs, be careful how you prompt reasoning models.
This work shows that reasoning traces frequently contain sensitive user data.
More of my notes below:
The work investigates the privacy risks introduced by reasoning traces (RTs) in Large Reasoning Models (LRMs) when used as personal agents.
It shows that, unlike outputs, RTs often leak sensitive data such as names, health info, and identifiers, posing a novel attack surface.
Jun 19 • 7 tweets • 3 min read
ProtoReasoning
New work on enhancing reasoning in LLMs.
Shared abstract reasoning prototypes lead to generalization in LLMs.
Here are my notes:
ProtoReasoning introduces a novel framework that enhances reasoning generalization in LLMs by training them to operate over reasoning prototypes, abstract, symbolic representations like Prolog (logic) and PDDL (planning).
Jun 18 • 7 tweets • 3 min read
From Bytes to Ideas
Avoids using predefined vocabs and memory-heavy embedding tables.
Instead, it uses Autoregressive U-Nets to embed information directly from raw bytes.
This is huge! Enables infinite vocab size and more.
More in my notes below:
Quick Overview
It proposes AU-Net, a hierarchical byte-level language model that internalizes tokenization by learning to embed text from raw bytes through a multiscale, autoregressive U-Net architecture.
Jun 17 • 8 tweets • 4 min read
Providing “cognitive tools” to GPT-4.1 increases performance on AIME2024 from 26.7% to 43.3%.
Damn!
That's very close to the performance of o1-preview.
Reasoning as a tool goes hard!
Here are my notes:
Quick Overview
Proposes a modular, tool-based approach to eliciting reasoning in LLMs, inspired by cognitive science.
Rather than relying solely on RL or chain-of-thought (CoT) prompting, the authors introduce a framework where the LLM calls self-contained "cognitive tools" to modularize and scaffold internal reasoning.
Jun 16 • 8 tweets • 3 min read
Enhancing RAG with Application-Aware Reasoning
Neat trick to improve RAG systems: give it the relevant knowledge and show it how to apply it.
Very simple and effective!
This approach also works well with AI agents.
Pay attention, AI devs.
Here are my notes:
Quick Overview
It introduces RAG+, a modular framework that improves traditional RAG systems by explicitly incorporating application-level reasoning into the retrieval and generation pipeline.
It bridges retrieval and generation with an application-aware stage.
Jun 14 • 8 tweets • 3 min read
Anthropic is killing it with these technical posts.
If you're an AI dev, stop what you are doing and go read this.
It shows, in great detail, how to implement an effective multi-agent research system.
Pay attention to these key parts:
Anthropic shares how they built Claude's new multi-agent Research feature, an architecture where a lead Claude agent spawns and coordinates subagents to explore complex queries in parallel.
They use the orchestrator-worker architecture.
Jun 13 • 7 tweets • 2 min read
Deep Research Agent for Large Systems Code
Nice paper from Microsoft!
Builds a deep research agent for large systems codebases.
Lots of interesting tricks for handling very large codebases on this one.
Here are my notes:
Quick Overview
This work introduces Code Researcher, a deep research agent designed for debugging large-scale systems code.
The agent performs multi-step reasoning over crash reports, system semantics, and commit histories to synthesize crash-resolving patches.
Jun 13 • 6 tweets • 3 min read
TableRAG
A new RAG framework for heterogeneous document reasoning.
My notes below:
TableRAG tackles a core limitation of existing RAG approaches: their inability to reason effectively over heterogeneous documents that combine both unstructured text and structured tables.