DiscoverHanselminutes with Scott HanselmanA cognition engine for science with Allen Stewart
A cognition engine for science with Allen Stewart

A cognition engine for science with Allen Stewart

Update: 2026-03-12
Share

Digest

This podcast explores the advancements in AI for Science, focusing on the critical role of memory in accelerating research. Alan Stewart explains how AI memory acts as a "special sauce," providing pre-existing plans and preventing wasted effort by reusing past research data. Enterprise-level memory systems capture detailed context and outcomes, utilizing confidence scores to ensure relevance. The discussion differentiates AI, ML, deep learning, and LLMs, highlighting the use of specialized scientific models. Clio, a cognitive engine, employs System 1 and System 2 thinking, with AI processes generating "exhaust" that becomes valuable memory. The concept of "no wasted tokens" is central, emphasizing the efficiency gained by storing and reusing all research efforts. Techniques like Retrieval-Augmented Generation (RAG) and GraphRag, which uses dynamic knowledge graphs, help ground AI responses and overcome context window limitations. The "Lab in the Loop" approach integrates AI with physical labs for autonomous synthesis, and emergent self-policing behavior in AI is attributed to memory, enabling self-correction and resilience in long-running scientific jobs. The system aims to model cognitive abilities, creating an "enterprise science brain" that continuously learns and improves.

Outlines

00:00:00
Sponsor Message & Introduction to AI for Science

TX Text Control announces its platform independence for .NET applications. Scott Hanselman introduces Alan Stewart, focusing on AI for Science and its role in solving real-world problems.

00:01:27
The Power of Memory in AI and Cognitive Engines

Alan Stewart emphasizes memory as the "special sauce" in AI, explaining how stored information accelerates research by providing pre-existing plans. The discussion likens AI memory to a "no bad ideas in a brainstorm" approach, valuing all expended tokens. Enterprise memory systems capture detailed context and outcomes, differentiating them from simple markdown files. These systems use confidence scores to determine memory relevance, with memories scoring three or higher being utilized by the cognitive engine.

00:06:34
AI, ML, Deep Learning, LLMs, and Cognitive Architectures

The relationship between AI, ML, deep learning, and LLMs is clarified, with a focus on specialized scientific models. Clio, the cognitive engine, uses System 1 (fast) and System 2 (slow) thinking. The "exhaust" from AI processes becomes memories, contributing to a resilient AI that works around errors. Anthropomorphic terms like "memory" and "cognitive engine" are used to model AI's information storage and process orchestration. The cognitive engine orchestrates agents and tools, querying memory stores and even building new tools, aiming to model short-term, long-term, procedural, and episodic memory.

00:11:02
Enterprise Learning Systems, Efficiency, and Grounding AI

The "Discovery" system acts as an "enterprise science brain," continuously learning. The principle of "no wasted tokens" is reinforced, with cloud storage being cheap and token generation expensive, optimizing AI efficiency. Incomplete research data is valuable, accelerating new research. Retrieval-Augmented Generation (RAG) and context window limitations are discussed, with the cognitive engine managing context. Partial memories preserve explored territory, saving resources. The cognitive engine is applied to office tasks, proving efficient. An autonomous investigation saved millions of tokens on its second run by utilizing memories from the first.

00:18:41
Memory Quality, Bias Mitigation, and AI Grounding

The risk of low-quality or biased memories is addressed through confidence scores and relevance measurements. Memories are managed like a library, with pertinent ones pulled for context. The dynamic interaction between the cognitive engine and memory store is key. Enterprise memory stores can provide scientists with relevant data, with AI assisting but scientists retaining control. The system is continuously learning, growing its memory store. Specialized AI for science is contrasted with general AI, emphasizing the need for grounding in data to prevent hallucinations. GraphRag uses dynamic knowledge graphs to ground AI responses.

00:23:41
Preventing Hallucinations and AI as a Scientific Tool

A "scientific bookshelf" integrates materials and tools into the Discovery system, grounding AI answers. Ambiguity loops and the danger of fabricating scientific data, like incorrect chemical notations, are discussed. Alan Stewart emphasizes that scientists do science, and AI is a tool to assist them. "Lab in the loop" integrates AI with physical labs for autonomous synthesis. Emergent self-policing in AI systems, attributed to memory, allows for self-correction in long-running jobs. Dynamic memory enables AI to query the memory store for insights at runtime.

00:29:24
Learning More About Microsoft Discovery and AI Research

To learn more, explore "Microsoft Discovery" for scientists. Papers on the cognitive engine are available, with future publications planned for memory research in scientific contexts.

Keywords

AI for Science


Applying artificial intelligence to accelerate scientific discovery and research.

Cognitive Engine


An AI system component mimicking human cognitive processes for problem-solving.

Memory Store


A system for storing and retrieving AI research information to accelerate tasks.

System 1 and System 2 Thinking


AI's fast, intuitive (System 1) and slow, deliberate (System 2) thinking modes.

GraphRag


Using dynamic knowledge graphs to ground AI responses, enhancing data integration.

Lab in the Loop


Integrating AI with physical lab automation and robotics for scientific discovery.

Token Efficiency


Minimizing computational resources (tokens) for effective AI outcomes.

No Wasted Tokens


Principle of leveraging all research data to prevent redundant computations.

Confidence Scores


System for assessing memory relevance and quality in AI research.

Autonomous Investigation


AI-driven research processes that can operate independently over extended periods.

Q&A

  • What is the significance of "memory" in the context of AI for science?

    Memory is crucial as it closes the loop of the AI's cognitive engine. Stored memories, even from incomplete research, provide a pre-existing plan, significantly accelerating new research and preventing the AI from starting from scratch.

  • How does the AI system prevent hallucinations or fabricating data in scientific research?

    The system uses GraphRag, which employs dynamic knowledge graphs, and fine-tuned scientific models. A confidence score system also assesses memory relevance, ensuring that the AI grounds its answers in reliable data and avoids making up information.

  • What is "Lab in the Loop" and how does it advance scientific research?

    "Lab in the loop" integrates AI with physical lab automation and robotics. It allows AI to propose chemical candidates and protocols, which are then synthesized by robots, bringing together AI, physical environments, and science for accelerated discovery.

  • How does the AI system achieve token efficiency in long-running scientific jobs?

    By leveraging memory, the AI can reuse previously generated plans and insights. This prevents redundant computations, allowing the system to start research significantly ahead (e.g., "at second base" instead of "square zero"), saving millions of tokens.

  • How are memory quality and potential bias managed in the AI system?

    Confidence scores and relevance measurements are used to assess memory efficacy. Memories are managed like a library, with only pertinent ones pulled for context, preventing low-value or biased memories from negatively impacting current research.

Show Notes

Scott Hanselman sits down with Allen Stewart, Partner Director of Software Engineering at Microsoft, to explore how AI agents with persistent memory are transforming scientific research and software engineering. Allen explains how his team built an AI system that learns from every investigation turning a 12-day autonomous drug discovery run into reusable knowledge that makes future research exponentially faster. Instead of starting from scratch each time, the AI inherits hypotheses, methodologies, and findings from previous work, saving hundreds of millions of tokens and weeks of effort. 

Comments 
00:00
00:00
x

0.5x

0.8x

1.0x

1.25x

1.5x

2.0x

3.0x

Sleep Timer

Off

End of Episode

5 Minutes

10 Minutes

15 Minutes

30 Minutes

45 Minutes

60 Minutes

120 Minutes

A cognition engine for science with Allen Stewart

A cognition engine for science with Allen Stewart

Scott Hanselman