A new kind of literate program – Claudette

Claudette is the first ever ‘literate nbdev’ project. Its source is a rendered Notebook with callout notes and tips, HTML tables and images, detailed explanations. It explains how and why the code is written the way it is, along with how to use the libraries it depends on.
Author

Jeremy Howard

Published

June 23, 2024

This is the 2nd part in a series on Answer.AI’s language model API libraries. For the first, see Introducing Claudette, a new friend that makes Claude 3.5 Sonnet even nicer.

Claudette is the first ever “literate nbdev” project. That means that the actual source code for the library is a rendered Jupyter Notebook which includes callout notes and tips, HTML tables and images, detailed explanations, and teaches how and why the code is written the way it is. Even if you’ve never used the Anthropic Python SDK or Claude API before, you should be able to read the source code. Click Claudette’s Source to read it, or clone the git repo and execute the notebook yourself to see every step of the creation process in action.

Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do.” Donald E. Knuth, Literate Programming (1984)

The reason this project is a new kind of literal program is because I take seriously Knuth’s call to action, that we have a “moral commitment” to never write an “illiterate program” – and so we have a commitment to making literate programming an easy and pleasant experience. (For more on this, see this talk from Hamel Husain.)

To learn all about how Claudette is made, and how to use the Anthopic API on which it’s based, have a look at the video we just posted – as you’ll (hopefully!) see, you can quickly build a deep understanding of the code, and explore how it works by interacting with it directly:

This is the first video in our new “dev chats” series. We decided to regularly record discussions of new work at Answer.AI in order to help communicate progress within our team. But, as a Public Benefit Corp with a mission to help society benefit from AI, that means it makes sense for us to share them publicly too. Let us know in the YouTube comments if you find this helpful, and have any questions or requests for the team. To see all dev chats as they’re posted, you can use this playlist, which we’ll be using for all these recordings.