Scott HanselmanA cognition engine for science with Allen Stewart
synopsis
Allen Stewart, a partner director of software engineering innovation at Microsoft working on AI for science, ends where he starts: memory is what makes long-running AI science work. In his account, a cognitive engine that stores everything its agents produce, scores it for relevance and grounds itself in knowledge graphs can restart work far ahead and police its own fabrication. These are claims about his own team's system, which ships as Microsoft Discovery.
The memory experiment. Stewart ran a 14-day science job spread across thought channels, packaged the memories, complete and partial, and reran the sample elsewhere. The second run started 150 million tokens ahead, the amount the first had spent planning, drew about 1,200 memories, and saw many channels converge. Hanselman calls it "second base".
Keeping everything without drowning in it. Hanselman asks whether bad memories compound. Stewart says relevance scores from 1 to 5 decide what is grounded on (3 and above) and what is only stored. Hanselman reframes it as a library and argues storage is cheap where tokens are dear; Stewart agrees.
How the engine works. It orchestrates fine-tuned scientific models rather than asking a chatbot for a drug, divides work into slow and fast thinking (Hanselman supplies the Kahneman background), routes around unavailable tools, and builds missing ones. Stewart says it also handled office tasks without warm start.
Grounding. Hanselman relays Russinovich's complaints of models gaslighting him. Stewart answers that SMILES errors forced grounding through Graph RAG and a per-discipline "scientific bookshelf", and credits memory for the system's self-correction. Hanselman adds that exploration is fine, but data must never be invented.
Scientists in the loop. Scientists told him AI is their tool. They can choose memories themselves, and lab robots may synthesise what the system proposes. Stewart points to a published cognitive-engine paper; the memory research is unpublished.
- Stored memory closes the loop for long-running AI science jobs. Stewart, a partner director of software engineering innovation at Microsoft, reports a science job that ran 14 days. Packaging its memories and rerunning the same sample on a new machine started the research 150 million tokens lighter, since that was what the first run spent building the plan; the memory store returned about 1,200 relevant memories, and the second run got much further, with many thought channels converging on outputs.
- Even partial thoughts are kept, and relevance scoring decides use. Stewart took memories from 33 incomplete channels too and says the engine judged them relevant, which he calls proof there is "no such thing as a wasted token in science research". Signals between engine and store score each memory 1 to 5; 3 and above are grounded on, lower ones stay stored for other problems. Hanselman's framing is a library where nothing is thrown away and only the pertinent books are pulled.
- The engine is modelled on a brain, with fast and slow channels. It orchestrates fine-tuned scientific models, with language models used for orchestration and summarising, splits work into slow-thinking and fast-thinking channels, and falls back to other tools when one, such as the coding agent, is unavailable. Stewart says it builds missing tools through the GitHub Copilot CLI SDK, and that tests with Microsoft's M365 research team on office tasks went well without any warm-start data.
- Grounding in knowledge graphs is what stops scientific fabrication. Stewart says early language models produced SMILES chemical notation that was flatly wrong; one character changes the drug. The answer was Graph RAG, built with Microsoft Research, whose ontology grows with the data, plus a "scientific bookshelf" of each discipline's materials and tools. He credits memory for the system repeatedly catching itself and regrounding in data.
- Scientists stay in charge, and AI remains their tool. Stewart relays scientists' insistence that "AI is a tool, scientists do science", so they can pick memories themselves as well as the engine selecting them. He describes lab-in-the-loop work sending generated protocols to lab robots for synthesis. The product is Microsoft Discovery; his memory research is not yet published.