MoreRSS

site iconGeoffrey LittModify

Researcher explores malleable software and AI, with a PhD from MIT and work at Ink & Switch.
Please copy the RSS to your reader, or quickly subscribe to:

Inoreader Feedly Follow Feedbin Local Reader

Rss preview of Blog of Geoffrey Litt

Is chat a good UI for AI? A Socratic dialogue

2025-06-29 22:17:00

The pupil was confused. Some people on Design Twitter said that chat isn’t a good UI for AI… but then chat seemed to be winning in many products? He climbed Mount GPT to consult a wizard…

🐣: please wizard tell me once and for all. is chat a good UI for AI?

🧙: well, aren’t we chatting now?

🐣: …?

🧙: should this conversation be a traditional GUI?

🐣: no, it could never be!

🧙: why not?

🐣: uh… you can’t click buttons and drag sliders to ask open-ended questions like this?

🧙: precisely! chat is marvelous, done.

🐣: dude seriously? i came all the way here for that?

🧙: yep. i’ll tell you the best route down the mountain. straight 1000 ft, left 50 degrees, straight 2 miles—

🐣: hold on hold on. do you have a map handy?

🧙: aha! here’s a map i had in my pocket. is this a GUI?

🐣: well, this map is just a piece of paper, so no?

🧙: ok, what is a paper map?

🐣: uh… a better way to see the world?

🧙: indeed! for certain things, a map is the way to see. for other things, a diagram, a chart, a table. this is the first precept:

Text is not the universal information visualization.

🐣: ok fine. but info viz can fit into a chat can’t it? like, if i ask Siri or ChatGPT for the weather, they’ll show me a little weather card…but it’s still basically chat

🧙: where do you live on this map?

🐣: right th–

🧙: hands in your pockets!

🐣: ?

🧙: no pointing. tell me where you live

🐣: ….well, see how there’s a little lake up by the top left? no not that lake… a bit to the right.. no no next one over–

🧙: hahaha

🐣: … ok fine i get your point! this sucks.

🧙: indeed! pointing is great. for referring to things, for precisely cropping an image in the right spot…

🐣: ok fine. but if we talk while you show me the map and i point at it, that still feels like a chat? we’re layering on information visualization and precision input, but natural language is still doing the heavy lifting?

🧙: (points at a rock, then at the ground) put that there.

🐣: huh?

🧙: put that there!

🐣: (moves the rock) ok, what was that about?

🧙: As you say, we needed our fingers and our voices both. This leads to a second precept:

Natural language and precision inputs are complementary.

btw want a compass?

🐣: yeah that’ll actually be helpful on the way down.

🧙: cool, i can give you a regular compass, or Mr. Magnetic, a magical fairy who can tell you which way you’re pointed.

🐣: i’ll take the regular compass? I did Boy Scouts so I know how to read it, it just becomes part of me in a sense. i definitely don’t need to have a whole damn conversation every time.

🧙: ah yes, you see it. the compass pairs information visualization and precision inputs with a low-latency feedback loop, becoming an extension of your mind. this is one of our great powers as humans—to shoot an arrow or swing a club.

🐣: ok that’s cool. but dude i’ve been here a while and i feel like we haven’t even really talked about GUIs!

🧙: you’re right, time for dinner. let’s order a pizza

🐣: …

🧙: can you order one?

🐣: fine. I’ll see if UberEats delivers up here.

🧙: why not call the restaurant?

🐣: are you kidding me? i’m not a boomer.

🧙: is UberEats a GUI?

🐣: yes?

🧙: does it work well?

🐣: yeah it’s fine! gets the job done.

🧙: why not chat over the phone instead?

🐣: well, ordering food is the same thing every time! even when you talk to the person you’re both just following a script, really. the app just makes it faster to follow that script.

🧙: indeed! this is our third precept:

Graphical interfaces can make repeated workflows nicer.

🐣: ok i get it. but idk man, i feel like this is all kinda obvious and we haven’t hit the heart of the matter? yes chat is better for open-ended workflows, and GUIs can be better when the task is repeated. but how do they relate?

🧙: hey i host seminars up here every week and it’s kinda tedious. could you show me the button in UberEats where I can enter the estimated attendance and then it orders the right number of pizzas?

🐣: umm that’s not a thing?

🧙: why not? i want it.

🐣: uhh, this is UberEats, not a seminar organizer app?

🧙: oh right good point! in that case let’s add a button on the calendar invite i can press which will order the pizzas.

🐣: dude what do you mean? the calendar app is just a calendar app, not a seminar organizer. you can’t just change your software like this.

🧙: hm, what are my options then?

🐣: ooh i have an idea! have you heard of MCP? if we just install the right servers then you can program a seminar planner agent in Claude to do this every week for you.

🧙: sounds fine for the first few times while i’m figuring it out. but–is planning a seminar not a repeated workflow?

🐣: … yes, i think it is?

🧙: did we not say that GUIs can speed up repeated workflows? why do i need to stay in chat for this? also btw, i want my assistant to help out with this, and an app would help them know what to do.

🐣: i mean, i’m not sure there’s a good app for seminar planning that does what you want. lemme search on the app st–

🧙: wait! a GUI that someone else made will not fit my seminar planning needs. i need my own preferred workflow to be the one that is encoded in the tool.

🐣: ohh i see! this actually might not be that much work, have you heard of vibe coding? i’ll open up Claude Artifacts and get cookin.

🧙: thanks, lemme know when you’ve added the seminar pizza feature to UberEats!

🐣: oh well, I was thinking it’s not gonna be added to uber eats exactly – i’m gonna make a new web app that does all this.

🧙: why? UberEats already has great UI for the checkout flow, I just need one little feature added.

🐣: i mean i see your point, but you can’t really add your own features to UberEats? you don’t control it.

🧙: haven’t they heard of vibe coding over there?

🐣: dude that’s not how software works. sure everyone can code now but that doesn’t mean you can just edit any app.

🧙: why not?

🐣: er… it sounds kinda messy? and i guess all of this app stuff was invented before AI came along anyway?

🧙: when you paint a wall do you need to ask permission of the company that made the wall?

🐣: … hm. when you put it that way… i see what you’re getting at. if all the GUIs you already use could be edited, then you wouldn’t need to resort to chat as much to fill in the seams. instead you could just change the GUIs to do what you want!

🧙: aha! yes, now you see. if the UI is fixed, then it cannot respond to my needs. but if it is malleable, then I can evolve it over time. This is the fourth and final precept for today:

A malleable UI pairs the ergonomics of GUIs with the open-ended flexibility of chat.

🐣: neat. this seems hard though, wouldn’t we need to rethink how the App Store works?

🧙: indeed. and that is a longer conversation for another time.


Note from the editor: to keep exploring, read this.

Stevens: a hackable AI assistant using a single SQLite table and a handful of cron jobs

2025-04-12 22:40:00

There’s a lot of hype these days around patterns for building with AI. Agents, memory, RAG, assistants—so many buzzwords! But the reality is, you don’t need fancy techniques or libraries to build useful personal tools with LLMs.

In this short post, I’ll show you how I built a useful AI assistant for my family using a dead simple architecture: a single SQLite table of memories, and a handful of cron jobs for ingesting memories and sending updates, all hosted on Val.town. The whole thing is so simple that you can easily copy and extend it yourself.

Meet Stevens

The assistant is called Stevens, named after the butler in the great Ishiguro novel Remains of the Day. Every morning it sends a brief to me and my wife via Telegram, including our calendar schedules for the day, a preview of the weather forecast, any postal mail or packages we’re expected to receive, and any reminders we’ve asked it to keep track of. All written up nice and formally, just like you’d expect from a proper butler.

Here’s an example. (I’ll use fake data throughout this post, beacuse our actual updates contain private information.)

Beyond the daily brief, we can communicate with Stevens on-demand—we can forward an email with some important info, or just leave a reminder or ask a question via Telegram chat.

That’s Stevens. It’s rudimentary, but already more useful to me than Siri!

Behind the scenes

Let’s break down the simple architecture behind Stevens. The whole thing is hosted on Val.town, a lovely platform that offers SQLite storage, HTTP request handling, scheduled cron jobs, and inbound/outbound email: a perfect set of capabilities for this project.

First, how does Stevens know what goes in the morning brief? The key is the butler’s notebook, a log of everything that Stevens knows. There’s an admin view where we can see the notebook contents—let’s peek and see what’s in there:

You can see some of the entries that fed into the morning brief above—for example, the parent-teacher conference has a log entry.

In addition to some text, entries can have a date when they are expected to be relevant. There are also entries with no date that serve as general background info, and are always included. You can see these particular background memories came from a Telegram chat, because Stevens does an intake interview via Telegram when you first get started:

With this notebook in hand, sending the morning brief is easy: just run a cron job which makes a call to the Claude API to write the update, and then sends the text to a Telegram thread. As context for the model, we include any log entries dated for the coming week, as well as the undated background entries.

Under the hood, the “notebook” is just a single SQLite table with a few columns. Here’s a more boring view of things:

But wait: how did the various log entries get there in the first place? In the admin view, we can watch Stevens buzzing around entering things into the log from various sources:

This is just some data importers populating the table:

  • An hourly data pull from the Google Calendar API
  • An hourly check of the local weather forecast using a weather API
  • I forward USPS Informed Delivery containing scans of our postal mail, and Stevens OCRs them using Claude
  • Inbound Telegram and email messages can also result in log entries
  • Every week, some “fun facts” get added into the log, as a way of adding some color to future daily updates.

This system is easily extensible with new importers. An importer is just any process that adds/edits memories in the log. The memory contents can be any arbitrary text, since they’ll just be fed back into an LLM later anyways.

Reflections

A few quick reflections on this project:

It’s very useful for personal AI tools to have access to broader context from other information sources. Awareness of things like my calendar and the weather forecast turns a dumb chatbot into a useful assistant. ChatGPT recently added memory of past conversations, but there’s lots of information not stored within that silo. I’ve written before about how the endgame for AI-driven personal software isn’t more app silos, it’s small tools operating on a shared pool of context about our lives.

“Memory” can start simple. In this case, the use cases of the assistant are limited, and its information is inherently time-bounded, so it’s fairly easy to query for the relevant context to give to the LLM. It also helps that some modern models have long context windows. As the available information grows in size, RAG and fancier approaches to memory may be needed, but you can start simple.

Vibe coding enables sillier projects. Initially, Stevens spoke with a dry tone, like you might expect from a generic Apple or Google product. But it turned out it was just more fun to have the assistant speak like a formal butler. This was trivial to do, just a couple lines in a prompt. Similarly, I decided to make the admin dashboard views feel like a video game, because why not? I generated the image assets in ChatGPT, and vibe coded the whole UI in Cursor + Claude 3.7 Sonnet; it took a tiny bit of extra effort in exchange for a lot more fun.

Try it yourself

Stevens isn’t a product you can run out of the box, it’s just a personal project I made for myself.

But if you’re curious, you can check out the code and fork the project here. You should be able to apply this basic pattern—a single memories table and an extensible constellation of cron jobs—to do lots of other useful things.

I recommend editing the code using your AI editor of choice with the Val Town CLI to sync to local filesystem.

Avoid the nightmare bicycle

2025-03-04 06:13:00

In my opinion, one of the most important ideas in product design is to avoid the “nightmare bicycle”.

Imagine a bicycle where the product manager said: “people don’t get math so we can’t have numbered gears. We need labeled buttons for gravel mode, downhill mode, …”

This is the hypothetical “nightmare bicycle” that Andrea diSessa imagines in his book Changing Minds.

As he points out: it would be terrible! We’d lose the intuitive understanding of how to use the gears to solve any situation we encounter. Which mode do you use for gravel + downhill?

It turns out, anyone can understand numbered gears totally fine after a bit of practice. People are capable!

Along the same lines: one of the worst misconceptions in product design is that a microwave needs to have a button for every thing you could possibly cook: “popcorn”, “chicken”, “potato”, “frozen vegetable”, bla bla bla.

You really don’t! You can just have a time (and power) button. People will figure out how to cook stuff.

Good designs expose systematic structure; they lean on their users’ ability to understand this structure and apply it to new situations. We were born for this.

Bad designs paper over the structure with superficial labels that hide the underlying system, inhibiting their users’ ability to actually build a clear model in their heads.

Two pages from a book describing the nightmare bicycle concept

p.s. Changing Minds is one of the best books ever written about design and computational thinking, you should go read it.

AI-generated tools can make programming more fun

2024-12-22 22:05:00

I want to tell you about a neat experience I had with AI-assisted programming this week. What’s unusual here is: the AI didn’t write a single line of my code. Instead, I used AI to build a custom debugger UI… which made it more fun for me to do the coding myself.

* * *

I was hacking on a Prolog interpreter as a learning project. Prolog is a logic language where the user defines facts and rules, and then the system helps answer queries. A basic interpreter for this language turns out to be an elegant little program with surprising power—a perfect project for a fun learning experience.

The trouble is: it’s also a bit finicky to get the details right. I encountered some bugs in my implementation of a key step called unification—solving symbolic equations�—which was leading to weird behavior downstream. I tried logging some information at each step of execution, but I was still parsing through screens of text output looking for patterns.

I needed better visibility. So, I asked Claude Artifacts to whip up a custom UI for viewing one of my execution traces. After a few iterations, here’s where it ended up:

I could step through an execution and see a clear visualization of my interpreter’s stack: how it has broken down goals to solve; which rule it’s currently evaluating; variable assignments active in the current context; when it’s come across a solution. The timeline shows an overview of the execution, letting me manually jump to any point to inspect the state. I could even leave a note annotating that point of the trace.

Oh yeah, and don’t forget the most important feature: the retro design 😎.

Using this interactive debug UI gave me far clearer visibility than a terminal of print statements. I caught a couple bugs immediately just by being able to see variable assignments more clearly. A repeating pattern of solutions in the timeline view led me to discover an infinite loop bug.

And, above all: I started having more fun! When I got stuck on bugs, it felt like I was getting stuck in interesting, essential ways, not on dumb mistakes. I was able to get an intuitive grasp of my interpreter’s operation, and then hone in on problems. As a bonus, the visual aesthetic made debugging feel more like a puzzle game than a depressing slog.

* * *

Two things that stick out to me about this experience are 1) how fast it was to get started, and 2) how fast it was to iterate.

When I first had the idea, I just copy-pasted my interpreter code and a sample execution trace into Claude, and asked it to build a React web UI with the rough functionality I wanted. I also specified “a fun hacker vibe, like the matrix”, because why not? About a minute later (after a single iteration for a UI bug which Claude fixed on its own), I had a solid first version up and running:

My prompt to Claude

That fast turnaround is absolutely critical, because it meant I didn’t need to break focus from the main task at hand. I was trying to write a Prolog interpreter here, not build a debug UI. Without AI support, I would have just muddled through with my existing tools, lacking the time or focus to build a debug UI. Simon Willison says: “AI-enhanced development makes me more ambitious with my projects”. In this case: AI-enhanced development made me more ambitious with my dev tools.

By the way: I was confident Claude 3.5-Sonnet would do well at this task, because it’s great at building straightforward web UIs. That’s all this debugger is, at the end of the day: a simple view of a JSON blob; an easy task for a competent web developer. In some sense, you can think of this workflow as a technique for turning that narrow, limited programming capability—rapidly and automatically building straightforward UIs—into an accelerant for more advanced kinds of programming.

Whether you’re an AI-programming skeptic or an enthusiast, the reality is that many programming tasks are beyond the reach of today’s models. But many decent dev tools are actually quite easy for AI to build, and can help the rest of the programming go smoother. In general, these days any time I’m spending more than a minute staring at a JSON blob, I consider whether it’s worth building a custom UI for it.

* * *

As I used the tool in my debugging, I would notice small things I wanted to visualize differently: improving the syntax display for the program, allocating screen real estate better, adding the timeline view to get a sense of the full history.

Each time, I would just switch windows, spend a few seconds asking Claude to make the change, and then switch back to my code editor and resume working. When I came back at my next breaking point, I’d have a new debugger waiting for me. Usually things would just work the first time. Sometimes a minor bug fix was necessary, but I let Claude handle it every time. I still haven’t looked at the UI code.

Eventually we landed on a fairly nice design, where each feature had been motivated by an immediate need that I had felt during use:

Claude wasn’t perfect—it did get stuck one time when I asked it to add a flamegraph view of the stack trace changing over time. Perhaps I could have prodded it into building this better, or even resorted to building it myself. But instead I just decided to abandon that idea and carry on. AI development works well when your requirements are flexible and you’re OK changing course to work within the current limits of the model.

Overall, it felt incredible that it only took seconds to go from noticing something I wanted in my debugger to having it there in the UI. The AI support let me stay in flow the whole time; I was free to think about interpreter code and not debug tool code. I had a yak-shaving intern at my disposal.

This is the dream of malleable software: editing software at the speed of thought. Starting with just the minimal thing we need for our particular use case, adding things immediately as we come across new requirements. Ending up with a tool that’s molded to our needs like a leather shoe, not some complicated generic thing designed for a million users.

Related reading

Your pie doesn't need to be original (unless you claim it so)

2024-08-25 23:39:00

Imagine you bake a delicious peach pie over the weekend, and you offer a slice to your friend. They respond:

“Wait, how is this different from every other peach pie that’s ever been baked? It seems really similar to another pie I had recently.”

This is obviously an absurd reaction!

But this exact dynamic happens all the time in creative software projects. Someone shares a project they made, and the first reaction is: how’s it different?

The problem here is a mismatch in values.

The friend has assumed that your goal is to “efficiently” reach the goal of a delicious pie, or perhaps even to create a new kind of pie. But that’s not the goal at all!

Baking a pie is a creative act. It’s personal, it’s inherently delightful, it’s an act of caring for others. It’s also a craft that one can improve at over time. Just buying the “best” pie would defeat the point.


The next day, you find out there’s a scientific conference in town: CRISP, the Conference for Research on Innovative Sweet Pastries. This is where the world’s foremost experts push forward the frontier of pie-baking technique.

You show up with your delicious peach pie, and the first question from the judging panel is:

“Wait, how is this different from every other peach pie that’s ever been baked? It seems really similar to another pie I had recently.”

You respond: “I have no idea, I just enjoyed baking it and thought it was delicious! I don’t even know what recipe I used. Why does it matter to you, huh?”

The expert says: “Well then, you’re welcome to bake pies all you want at home, but your pie is not welcome at CRISP. The community cannot understand your contribution or build on your work.”

You might be upset about this outcome, but you’d be wrong. In this context, the judge’s criticism is totally fair.

The goal of CRISP isn’t just to enjoy pies, it’s to build up a community of practice. Part of being a good citizen of that community is being able to explain how your pie is different—which in turn requires learning about all the other ways of making pie. This isn’t merely a higher bar than amateur weekend baking, it’s a totally different frame of mind.


I think mixing up these two situations is the source of a lot of unfortunate confusion.

I work on prototyping new kinds of software interfaces and programming tools, and I spend time in various communities that span across the cultures of playful exploration (sharing demos on Twitter) and academic research (writing formal papers).

Often I see creative people share personal projects and get their spirits weakened by “how’s it different?” The question can be well-meaning; it isn’t necessarily cynical! It’s just misunderstanding the goal.

On the other hand, I see people submit cool work to academic research venues and get confused by, or even chafe at, the stringent requirement of situating the work in context. I used to be pretty dismissive of Related Work sections myself, until I went through grad school and realized how valuable they are to the world.


So, as creators and feedback-givers, how can we avoid this confusion?

There’s an answer that seems obvious: clearly set the goal up front. Are you trying to do a personal project for fun, or are you trying to make a novel research contribution? Just proactively broadcast your intent, and most people will be better at asking questions that are aligned with your goals.

Unfortunately, in my experience, things don’t work out this cleanly. Many of the best new ideas start out as playful explorations, and over time snowball into a larger project that are worthy of a serious research contribution.

A strategy I’ve found helpful is to start from a place of personal creativity. If the initial goal is playful exploration for its own sake, that creates free space to explore and quells early doubts (from both myself and others). It doesn’t matter if it’s new or good (yet), I’m just having fun.

Occasionally a project grows into something more. At that point it can be appropriate to apply a critical academic lens.

Starting from the other side seems a lot tougher. If you start off saying “we’re going to make a big serious contribution no one’s ever done before,” that sets up high stakes and invites harsh critique from the start. Maybe this approach works for some projects with narrower success criteria, but it doesn’t seem to work well for most of what I do.

A final thing to keep in mind: when I’m on the side of giving feedback, I always try to first understand the creator’s goals. This can be a subtle art when they don’t even know their own goals yet. The weekend baker may just need encouragement, not critique.

Related wisdom

Richard Feynman, on spinning plates:

Physics disgusts me a little bit now, but I used to enjoy doing physics. Why did I enjoy it? I used to play with it… I’m going to play with physics, whenever I want to, without worrying about any importance whatsoever.

Patrick Dubroy, on playing like a kid:

It was another instance of unconsciously adopting a restrictive set of assumptions, telling myself that if I wasn’t done “right”, it wasn’t worth doing at all… And guess what — when I decided to let go of those assumptions, I started having fun on my side projects again.

7 books that stood the test of time in 2023

2023-12-18 01:01:00

It’s the most wonderful time of the year: when people proudly announce how many books they have read in the past 12 months. 10 books, 20 books, 57 books! Worry not—I know you don’t care, and besides, I have no idea how many books I read this year.

In lieu of that, here’s a short list of some favorite books I read before 2023 that have stuck with me this year and changed the way I think. Seven masterpieces on AI, cooking, art, houses, product design, computational media, and trees:

Six books on a floor, corresponding to the list below in this post
Six of the seven books. The seventh I only have on Kindle, sorry Ken!

The Most Human Human, by Brian Christian

A book about humanity, disguised as a book about AI. It taught me how to have deeper conversations and find more meaning in my work. Amid a sea of spilled ink on AI, Brian Christian has simply asked more interesting questions. Notably, this book was written in 2011, before the current wave—yet it’s still remarkably relevant.

See it on Goodreads

An Everlasting Meal, by Tamar Adler

This book changed the way I cook. It teaches the correct way to think about home cooking – not as a chore, an “obstacle”, or an optimized process… but as a simple, natural act of creativity. One of the wisest books I know.

See it on Goodreads

Art & Fear, by David Bayles and Ted Orland

A slim little manual about how to overcome the fear and keep creating. Subtle tips on the role of talent, managing the vision-execution gap, quantity vs quality. I might not have kept going with research if I hadn’t read this book.

See it on Goodreads

The Production of Houses, by Christopher Alexander et al.

Christopher Alexander thought people could design their own homes. His most famous books, The Timeless Way of Building and A Pattern Language, are brilliant but can be a bit abstract. The Production of Houses shows what actually happened, concretely, when he and his team helped some people do the thing and design their own homes.

The result: some great successes, some strange contradictions to ponder.

See it on Goodreads

Creative Selection, by Ken Kocienda

This book shows that most product design is a dead end. It describes, in great detail, the Apple way—hard to achieve, but worth striving towards. I’m constantly remembering stories from this book in my own work. “Pick one keyboard!”

See it on Goodreads

Changing Minds, by Andy diSessa

A foundational text for my research. I am always amazed how many people have not even heard of it. If you care about “future of computing”, Bret Victor’s work, “computational literacy”… go read this book! I promise it will change your mind. I reference diSessa’s “nightmare bicycle concept all the time.

See it on Goodreads

The Overstory, by Richard Powers

To the extent that it’s possible to see the world from the perspective of trees, this novel got me to that place. Every time I’m in a forest now, I think about the trees: how long they’ve been there, what they’re communicating to one another.

See it on Goodreads


Look, I could write so much more about any one of these books (and I’m happy to answer any questions!) but honestly, it feels hard to do them justice.

They’re all 5 stars, on both substance and prose. Well worth your time, and could be a great gift to the right person. I hope you have a great holidays!