Let's build a linear algebra tutor with Code Interpreter
Neil Stephenson anticipated the future with his Young Lady's Illustrated Primer
Today we’re going to use ChatGPT & Code Interpreter to build a pretty sophisticated tutor for learning linear algebra. Back in December 2022 I got a primitive version of ChatGPT, without Code Interpreter, to create a rudimentary tutor to teach matrix manipulation. The tutor that follows is much more sophisticated and robust.
I’m late to the party, but I just found out that I can share a direct link to my chat with ChatGPT. That link is here. Its formatting is much better than anything that Substack can render, so I’d recommend that you take a look at it. If you want the full script which Code Interpreter wrote for me, you can access it via this Notion doc. The Notion doc similarly offers better formattting than what I can do with Substack.
I want to offer a few observations here:
The tutor that Code Interpreter created for me is more robust than the one that I created in December 2022, and it was created much more quickly than the one I created back in December.
Compare the two prompts used to create these tutors. The first is much more complicated than the second, yet the second’s yields much more sophisticated output:
December 2022 prompt: Can you write a python script for me that performs addition, subtraction, or multiplication of matrices? Let the use define the size of the matrices, and the operation to be performed (addition, subtraction, or multiplication). Output the result to a text file, and include in the output a natural language explanation of how the operation was performed.
August 2023 prompt: I want you to build me a tutor in Python which will help me learn linear algebra.
One of the more perceptive observers of real world applications of generative AI, Ethan Mollick, has predicted that the importance of prompt engineering will decline as the technology improves. The two prompts above suggest that he is directionally correct.
Once Code Interpreter completed the linear algebra tutor, I asked it for ideas for other tutors. Here’s what it came up with:
You can create similar interactive Python-based tutors for a wide range of subjects. Here are a few ideas:
Calculus Tutor: This could cover topics like limits, derivatives, integrals, and differential equations. The sympy library in Python can handle symbolic calculations, making it a good fit for this kind of tutor.
Probability and Statistics Tutor: This could include topics like probability distributions, hypothesis testing, confidence intervals, and regression analysis. Libraries like scipy and statsmodels could be useful here.
Machine Learning Tutor: This could cover various machine learning algorithms, evaluation metrics, and techniques for data preprocessing and feature selection. Scikit-learn and TensorFlow could be leveraged here.
Data Structures and Algorithms Tutor: This could teach about different data structures (like arrays, linked lists, trees, and graphs) and algorithms (like sorting, searching, graph algorithms, and dynamic programming).
Physics Tutor: This could cover topics like mechanics, thermodynamics, electromagnetism, and quantum mechanics.
Chemistry Tutor: This could cover topics such as stoichiometry, thermodynamics, kinetics, and organic chemistry.
Finance Tutor: This could include topics like time value of money, financial statement analysis, portfolio theory, and options pricing. Libraries like numpy-financial could be useful here.
It also offered this pedagogical advice, which seems accurate to me:
The key to building these tutors is to identify the core topics, break them down into manageable lessons or units, and then use Python’s capabilities to provide interactive examples and exercises. For more complex subjects, you may need to leverage specialized Python libraries, as noted in the examples above.
I will conclude this with a final thought from ChatGPT. I asked it “What does ‘young lady’s illustrated primer’ mean”, and here’s its response:
The "Young Lady's Illustrated Primer" is a term originating from Neal Stephenson's 1995 science fiction novel, "The Diamond Age: Or, A Young Lady's Illustrated Primer". In the novel, the Primer is a sophisticated piece of technology, designed as an interactive book, capable of adapting its content and teaching style based on the reader's responses, essentially personalizing the learning experience.
The Primer's purpose is to educate and enlighten, serving as a comprehensive learning guide. It combines elements of artificial intelligence with a vast knowledge database, rendering it capable of not only providing information but also fostering critical thinking skills. Its illustrated narratives adapt to the learner's environment and personal history, making the content relatable and engaging.
To summarize, the "Young Lady's Illustrated Primer" is an example of futuristic educational technology that caters to individual needs and enhances learning through interactive storytelling, much like a highly advanced adaptive learning AI. The name itself is a nod to older, Victorian-era instructional books designed for young women, though the "Primer" in the novel transcends these old guides in scope and sophistication.
This sounds amazing, but what are the limitations of using such a tutor that you are not considering? Given the limitations identified, how would you propose overcoming them?