Skip to content

Commit

Permalink
Re-add posts from migration errors
Browse files Browse the repository at this point in the history
  • Loading branch information
VVoruganti committed Nov 15, 2023
1 parent 2de48b2 commit 2f9f1e9
Show file tree
Hide file tree
Showing 5 changed files with 184 additions and 6 deletions.
81 changes: 81 additions & 0 deletions content/Open-Sourcing Tutor-GPT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
title: "Open-Sourcing Tutor-GPT"
enableToc: false
---

![[assets/human_machine_learning.jpeg]]

## TL;DR

Today we’re [open-sourcing](https://github.com/plastic-labs/tutor-gpt) Bloom, our digital [Aristotelian](https://erikhoel.substack.com/p/why-we-stopped-making-einsteins) learning companion.

What makes [Bloom](https://bloombot.ai/) compelling is its ability to _reason pedagogically_ about the learner. That is, it uses dialogue to posit the most educationally-optimal tutoring behavior. Eliciting this from the [capability overhang](https://jack-clark.net/2023/03/21/import-ai-321-open-source-gpt3-giving-away-democracy-to-agi-companies-gpt-4-is-a-political-artifact/) involves multiple chains of [metaprompting](https://arxiv.org/pdf/2102.07350.pdf) enabling Bloom to construct a nascent academic [theory of mind](https://arxiv.org/pdf/2304.11490.pdf) for each student.

We’re not seeing this in the explosion of ‘chat-over-content’ tools, most of which fail to capitalize on the enormous latent abilities of LLMs. Even the impressive out-of-the-box capabilities of contemporary models don’t achieve the necessary user intimacy. Infrastructure for that doesn’t exist yet 👀.

Our mission is to facilitate personal, [agentic](https://arxiv.org/pdf/2304.03442.pdf) AI for all. So to that end, we’re (1) releasing Bloom’s architecture into the wild and (2) embarking on a journey to supercharge the kind of empowering generative agents we want to see in the world.

## Neo-Aristotelian Tutoring

Right now, Bloom is a reading comprehension and writing workshop tutor. You can chat with it in [Discord](https://discord.gg/bloombotai). After supplying it a passage, Bloom can coach you toward understanding or revising a piece of text. It does this by treating the user as an equal, prompting and challenging socratically.

We started with reading and writing in natural language because (1) native language acumen is the symbolic system through which all other fluencies are learned, (2) critical dialogue is the ideal vehicle by which to do this, and (3) that's what LLMs are best at right now.

The problem is, most students today don't have the luxury of "talking it out" with an expert interlocutor. But we know that's what works. (Perhaps too) heavily referenced in tech and academia, [Bloom’s 2 sigma problem](https://en.wikipedia.org/wiki/Bloom%27s_2_sigma_problem) suggests that students tutored 1:1 can perform two standard deviations better than classroom taught peers.

Current compute suggests we can do high-grade 1:1 for two orders of magnitude cheaper marginal cost than your average human tutor. It may well be that industrial education ends up a blip in the history of learning—necessary for scaling edu, but eventually supplanted by a reinvention of Aristotelian models.

![[assets/2 orders magnitude reduced cost.png]]

It's clear generative AI stands a good chance of democratizing this kind of access and attention, but what's less clear are the specifics. It's tough to be an effective teacher that students actually want to learn from. Harder still to let the student guide the experience yet maintain an elevated discourse.

So how do we create successful learning agents that students will eagerly use without coercion? We think this ability lies latent in base models, but the key is eliciting it.

## Eliciting Pedagogical Reasoning

The machine learning community has long sought to uncover the full range of tasks that large language models can be prompted to accomplish on general pre-training alone (the capability overhang). We believe we have discovered one such task: pedagogical reasoning.

Bloom was built and prompted to elicit this specific type of teaching behavior. (The kind laborious for new teachers, but that adept ones learn to do unconsciously.) After each input it revises a user’s real-time academic needs, considers all the information at its disposal, and suggests to itself a framework for constructing the ideal response.

![[assets/bloombot langchain diagram.png]]

It consists of two “chain” objects from [LangChain](https://python.langchain.com/en/latest/index.html) —a *thought* and *response* chain. The _thought_ chain exists to prompt the model to generate a pedagogical thought about the student’s input—e.g. a student’s mental state, learning goals, preferences for the conversation, quality of reasoning, knowledge of the text, etc. The *response*chain takes that _thought_ and generates a response.

Each chain has a `ConversationSummaryBufferMemory` object summarizing the respective “conversations.” The _thought_ chain summarizes the thoughts into a rank-ordered academic needs list that gains specificity and gets reprioritized with each student input. The _response_ chain summarizes the dialogue in an attempt to avoid circular conversations and record learning progress.

We’re eliciting this behavior from [prompting alone](https://arxiv.org/pdf/2102.07350.pdf). Two of Plastic’s co-founders have extensive experience in education, both in private tutoring and the classroom. They employed this to craft strong example dialogues that sufficiently [demonstrated](https://github.com/plastic-labs/tutor-gpt/tree/main/data) how to respond across a range of situations.

Take for example a situation where the student asks directly for an answer. Here is Bloom’s response compared to [Khanmigo’s](https://www.khanacademy.org/khan-labs):

![[assets/khan.png]]

![[assets/bloom_v_khan.png]]
![[assets/thought.png]]

Khanmigo chides, deflects, and restates the question. Bloom levels with the student as an equal—it’s empathetic, explains _**why**_ this is a worthwhile task, then offers support starting from a different angle…much like a compassionate, effective tutor. And note the thought that also informed its response — an accurate imputation of the student’s mental state.

And Bloom is dynamic, even when given no excerpted context and asked about non-textual material, it’s able to converse naturally about student interest:

![[assets/bloom_courtland.png]]

and its accompanying thoughts:

![[assets/bloom_courtland_thoughts.png]]

Notice how Bloom reasons it should indulge the topic, validate the student, and point toward (but not supply) possible answers. Then the resultant responses are ones that do this and more, gently guiding toward a fuller comprehension and higher-fidelity understanding of the music.

Aside from these edgier cases, Bloom shines helping students understand difficult passages (from syntactic to conceptual levels) and giving writing feedback (especially competent at thesis construction). [Take it for a spin.](https://discord.gg/udtxycbh)

Ultimately, we hope [open-sourcing Bloom](https://github.com/plastic-labs/tutor-gpt#readme) will allow anyone to run with these elicitations and prompt to expand its utility to support other domains. We’ll be doing work here too.

## Bloom & Agentic AI

This constitutes the beginning of an approach far superior to just slapping a chatbot UI over a content library that's probably already in a base model's pre-training.

After all, if it were just about content delivery, MOOCs would've solved education. We need more than that to reliably grow rare minds. And we're already seeing Bloom excel at promoting synthesis and creative interpretation within its narrow utility.

But to truly give students superpowers and liberate them from the drudgery that much of formal education has become, Bloom needs to go further. Specifically, it needs to both proactively anticipate the needs of the user and execute autonomously against that reasoning.

It needs to excel at theory of mind, the kind of deep psychological modeling that makes for good teachers. In fact, we think that lots of AI tools are running up against this problem too. So what we're building next is infrastructure for multi-agent trustless data exchange. We think this will unlock a host of game-changing additional overhung capabilities across the landscape of artificial intelligence.

If we’re to realize a world where open-source, personalized, and local models are competitive with hegemonic incumbents, one where autonomous agents represent continuous branches of truly extended minds, we need a framework for securely and privately handling the intimate data required to earn this level of trust and agency.
80 changes: 80 additions & 0 deletions content/Theory-Of-Mind is All You Need.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@

---
title: "Theory-of-Mind Is All You Need"
enableToc: false
---

## TL;DR

Today we’re releasing a major upgrade to [Bloom](https://discord.gg/bloombot.ai) (& the open-source codebase, [Tutor-GPT](https://github.com/plastic-labs/tutor-gpt)).

We gave our tutor even more autonomy to reason about the psychology of the user, and—using GPT-4 to dynamically _rewrite its own_ system prompts—we’re able to dramatically expand the scope of what Bloom can do _and_ massively reduce our prompting architecture.

We leaned into theory of mind experiments and Bloom is now more than just a literacy tutor, it’s an expansive learning companion.

## Satisfying Objective Discovery

Bloom is already excellent at helping you draft and understand language. But we want it do whatever you need.

To expand functionality though, we faced a difficult technical problem: figuring out what the learner wants to do.

Sounds simple (just ask), yet any teacher will tell you, students are often the last to understand what they ought to be doing. Are you learning for its own sake, or working on an assignment? What are the expectations and parameters? What preferences do you have about how this gets done?

Explaining all this to a tutor (synthetic or biological) upfront, is laborious and tiresome. We could just add some buttons, but that’s a deterministic cop-out.

![[assets/ToM meme.jpeg]]

What a expert educators will do is gather more information throughout the completion of the task, resolving on a more precise objective along the way; keeping the flow natural, and leaving the door open to compelling tangents and pivots.

The key here is they don’t have all the information—they _don’t know_ what the objective is precisely—but being good at tutoring means turning that into an advantage, figuring it out along the way is _optimal_. The effective human tutor dynamically iterates on a set of internal models about student psychology and session objectives. So how do we recreate this in Bloom?

Well we know that (1) foundation models are [shockingly good](https://arxiv.org/abs/2304.11490) at [theory of mind](https://en.wikipedia.org/wiki/Theory_of_mind), (2) Bloom already excels at [pedagogical reasoning](https://twitter.com/courtlandleer/status/1664673210007449605?s=20), and (3) [autonomous agents](https://twitter.com/yoheinakajima/status/1642881722495954945?s=20) are [having early success](https://twitter.com/Auto_GPT/status/1649370049688354816?s=20), so what if we stopped trying to deterministically prescribe an indeterminant intelligence?

What if we treated Bloom with some intellectual respect?

## Autonomous Prompting

The solution here is scary simple. The results are scary good.

[Here’s a description](https://plasticlabs.ai/blog/Open-Sourcing-Tutor-GPT/) of the previous version’s architecture:

> Bloom was built and prompted to elicit \[pedagogical reasoning\]…After each input it revises a user’s real-time academic needs, considers all the information at its disposal, and suggests to itself a framework for constructing the ideal response.
>
> It consists of two “chain” objects from [LangChain](https://python.langchain.com/en/latest/index.html) —a _thought_ and _response_ chain. The _thought_ chain exists to prompt the model to generate a pedagogical thought about the student’s input—e.g. a student’s mental state, learning goals, preferences for the conversation, quality of reasoning, knowledge of the text, etc. The _response_ chain takes that _thought_ and generates a response.
>
> Each chain has a `ConversationSummaryBufferMemory` object summarizing the respective “conversations.” The _thought_ chain summarizes the thoughts into a rank-ordered academic needs list that gains specificity and gets reprioritized with each student input. The _response_ chain summarizes the dialogue in an attempt to avoid circular conversations and record learning progress.
Instead, we’ve now repurposed the ***thought*** chain to do two things:

- Predict the user’s unobserved mental state
- List the information needed to enhance that prediction

![[assets/ToM Flow.png]]

Then we inject that generation into the body of the response chain’s system prompt. We do this with every user input. Instead of just reasoning about the learner’s intellectual/academic needs, Bloom now proactively rewrites itself to be as in-tune as possible to the learner at every step of the journey.

## Emergent Effects

We’re seeing substantial positive behavior changes as a result of giving Bloom this kind of autonomy.

![[assets/ToM Discord 1.png]]

Bloom is more pleasant to converse with. It’s still Socratic and will still push you to learn, but it’s not nearly as restrictive. Mainly, we posit this is a result of the tutor cohering to the user. Bloom becomes more like its interlocutor, it’s in many ways a mirror. This has a positive psychological effect—think of your favorite teacher from high school or college.

![[assets/ToM Discord 2.png]]

And Bloom is game. It’ll go down a rabbit hole with you, help you strategize around an assignment, or just chat. Bloom displays impressive discernment between acting on theory of mind recommendations to gather more information from you and asking topically-related questions to keep up the momentum of the conversation. It’s no longer obsessed with conforming to the popular stereotype of a tutor or teacher.

![[assets/ToM Discord 3.png]]

While reducing the prompt material, we took to opportunity to remove basically all references to “tutor,” “student,” etc. We found that since Bloom is no longer contaminated by pointing at [certain averaged narratives in its pre-training](https://www.lesswrong.com/posts/D7PumeYTDPfBTp3i7/the-waluigi-effect-mega-post)—e.g. the (bankrupt) contemporary conception of what a tutor is ‘supposed’ to be—it is, ironically, a better one.

Instead of simulating a tutor, it simulates _you_.

## Coming Soon...

All this begs the question: what could Bloom do with even better theory of mind? And how can we facilitate that?

What could other AI applications do with a framework like this?

Stay tuned.
16 changes: 16 additions & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Plastic Labs 🥽
enableToc: false
---

We're a research and development group working at the intersection of human and machine learning.

Most recently, we built [Bloom](https://bloombot.ai) -- a reading and writing tutor.

On this journey we realized that AI tools need a framework for securely and privately handling the intimate data required to unlock deeply personalized, autonomous agents. It’s our mission to realize this future.

## Blog

[[Theory-of-Mind Is All You Need]]
[[Open-Sourcing Tutor-GPT]]

7 changes: 4 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions quartz.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import * as Plugin from "./quartz/plugins"

const config: QuartzConfig = {
configuration: {
pageTitle: "🪴 Quartz 4.0",
pageTitle: "🥽 Plastic Labs",
enableSPA: true,
enablePopovers: true,
analytics: {
provider: "plausible",
},
baseUrl: "quartz.jzhao.xyz",
ignorePatterns: ["private", "templates", ".obsidian"],
baseUrl: "blog.plasticlabs.ai",
ignorePatterns: ["assets", "private", "templates", ".obsidian"],
defaultDateType: "created",
theme: {
typography: {
Expand Down

0 comments on commit 2f9f1e9

Please sign in to comment.