My new AI friend, KhanAmigo

KhanAmigo
R
AI
Author

George Girton

Published

February 14, 2024

Instituteur

I’m reading a book on the history of French. There was a concerted effort, um, in the 18th century, to promote the language and, thus, France. Primary school teachers were called Instituteurs – and are to this day – but that is NOT where the word tutor comes from. Moving along, though …

I’ve had four or five conversations with my new buddy KhanAmigoBeta. I don’t know if KAB is the same AI that it’s gonna grow up to be as future KhanAmigo, but it has been SO HELPFUL in several areas.

  • real analysis
  • normal curve
  • gravitation equation
  • power of earthquakes
  • how to pronounce the number 3,95,38,223 and yes it is one number

KhanAmigo is a tutor currently based on GPT-4, developed by KhanAcademy.org. Sal Khan’s idea, which he sets out in this one-minute video, is that we are at the edge of using AI for the biggest POSITIVE transformation that education has ever seen. He also gave a 15-minute TED talk on the topic of AI in education

real analysis

First I asked KhanAmigoBeta about economics. In Tai Chi class, I had been talking about differential equations to a woman who happened to have a PhD in economics. I mean, these things happen, right? Anyway, she mentioned learning about topology in economics in grad school. Curious about that, I later asked KhanAmigoBeta what kind of topology was used in economics, and KAB says “Real Analysis, which is distinguished by continuity, convergence, and boundedness. Would you like to learn more about any of those?” So, sure! Now I know that a convergent function can converge to a point which is outside the bounded area. Hmm.

normal curve

So, I said, is there an equation that describes the normal curve? Sure, says KhanAmigoBeta brightly, giving me the equation. Here it is. Would you like to talk about the various components of the equation? So, you know, that turned out to be a fairly interesting discussion.

By this time, I was starting to get the sort of feeling I got in my junior-year tutorial in college. As juniors, students in my major, which was rather improbably named ‘Social Relations’ and thus included Social Anthropology (the part of Anthro without skeletons and monkeys), would take a junior-yearl tutorial with two or three people in it. I signed up with Henry Selby, a visiting professor of Anthropology from the University of Texas at Austin, whom I notice has just given up the ghost, so this will be a bit of a remembrance.

Dr. Selby, just 15 years older than us students, still remembered his anthropological fieldwork well. Interested in witchcraft, he had gone to a native village to exercise his powers of interview, and anthropological observation. Self-deprecating about his abilities, he told us that after a week in the village, he first noticed that someone was stationed outside of the hut where he was sleeping. When he asked a village elder about it, the elder said he had stationed a guard outside the door in order to protect Selby from being slain, in the not unlikely event that he should happen to ignorantly violate one or more local taboos. “And I didn’t even notice the guy for a week,” he said.

After a couple of weeks (this is back in the junior-year tutorial now), for whatever reason, the other guy in the class did not show up anymore, so it was just me and Henry. Sometime near the end of each meeting, he would typically say something like “What!? You’ve never read any Malinowski? Why not read Argonauts of the Western Pacific, and let’s talk about it next week.” That’s how it went for the rest of the semester, me reading a 500 page book every week and then talking about it with Henry Selby.

That’s kind of the feeling I started to get with KhanAmigoBeta, just being able to ask questions about any topic, letting the conversation go where your interest takes you and – and i think this was true with Dr. Henry Selby as well – being made to work out or think out the answer for yourself.

I learned a fundamental truth of Anthropology in that course, too. With a professional interest in witches (like many anthropologists?) Selby naturally had to a) find witches and b) interview them. As it turned out, he complained, “What I found out was that the witches are all at the other end of town. So, you go up to the interview them there, and you say ‘I want to talk to some witches’, and they say,”no, the witches, you see, they are all at the other end of town”. You mean, where I just came from? “Yes”“.

It may have been the best course I took at Harvard. Certainly I remember it a few years down the road.

gravitation equation

Another equation I remembered and wanted to refresh my memory, this time from high school physics, is the gravitation equation, which relates two masses, the inverse square of their distance, and the gravitational constant, to the force of gravity. This discussion was incredibly annoying at first, because I made the mistake of asking KhanAmigoBeta in the middle of some problem sets in a math course to tell me the equation. KAB would not do it!

When it looked like I was going to have to guess the inverse relationship of the product of the two masses to the square of the distance, I gave up and came back later … to the tutorial section of KhanAcademy.org instead, and got a better response. Then, I wondered how the gravitational constant G had been derived, and so came back later for a question about Cavendish’s 1798 experiment.

  • ME: It occurs to me that since Cavendish probably did not have the equipment to measure gravitational attraction on masses in a laboratory, that he must have used the motion of celestial objects – whose mass would have been estimated – to derive the G constant.
  • KhanAmigoBeta: Ah, a common thought, but actually, Cavendish did measure gravitational attraction in a laboratory! He used a very sensitive experiment involving a torsion bar and small lead spheres. The gravitational attraction between the spheres caused the bar to twist very slightly, and by measuring this twist, Cavendish could calculate G
  • KhanAmigoBeta: It was a remarkable achievement, given the technology of the time. Cavendish’s experiment is often called “the most delicate measurement ever made”.

(and a final exhortation of awe:)

  • KhanAmigoBeta: Isn’t it incredible to think about the ingenuity and precision involved in such an experiment?

I also noticed that the gravitational constant G in the equation had a ‘per second’ term in it, although there was no ‘time’ term in the equation. I asked KAB about this, and KAB pointed out that in Newton’s F = MA equation, acceleration has a time term. Oh, right!

power of earthquakes: Richter scale

There was an earthquake in early February. It was a pretty strong shake and I was on the CalTech earthquake map before the last shudder. After less than a minute the Richter number came up for the big red square in the middle of the map: 4.5.

Later, as they do with local quakes, the number was reviewed and revised to 4.6. Obviously this didn’t make the quake any stronger, but I did wonder how much stronger a 4.6 quake is than a 4.5.

I thought I would ask this question of the AI “formerly known as Google Bard”, but, even under its ‘new and improved’ marketing name, Google Gemini the improved AI still flunked. First it said 4.6 was ten times stronger than a 4.5, then it said each whole number, i.e. from 4 to 5 was ten times stronger. The magic, as one of my college classmates impishly said, of logarithms!

Knowing it can’t be both ten times from 4.5 to 4.6 and ten times from 4 to 5, I gave a couple of other AIs a shot at the question, and they just repeated variations of “5 is ten times stronger than 4”, etc. etc., ad infinitum, without being able to explain anything.

So, KhanAmigoBeta, can you help me out here? KAB wanted to know what I thought an increment of 0.1 Richter meant, given what I knew about how logarithms work. KAB I have no idea! But after gentle prodding and leading, together we got to each of the ten steps from 4 to 5 being “that number, when raised to the tenth power, equals ten”.

I pressed the crown of my Apple Watch and uttered the words “What is the tenth root of ten” and sure enough, there it pops up, even including a little nth root notation with a ten nestled in there: 1.2589

Code
library(ggplot2)
library(plotly)

xvals <- seq(1:20)
TENTHROOT = 1.2589
logcurve <- (TENTHROOT ** xvals)
  # in R, this creates an array of 1.259 to the power of the array index

# plot(xvals,logcurve). Try it out in base R.  Good result!

quakestronger <- as.data.frame(xvals)
quakestronger$times_stronger <- TENTHROOT ** xvals # this is the log curve with a more common-sense name

quakestronger$than <- paste(quakestronger$logcurve,"stronger than, e.g. ",4.6) # 4.6, for example, as we have written here

# Make a ggplot graph object 'p'
p <- quakestronger |> ggplot(aes(x=xvals, y=times_stronger, label=than)) +
  geom_vline(xintercept=0,color="red",linewidth=3)+
  geom_point() +
  ylab("times stronger by adding a tenth")+
  xlab("count of Richter increments of 0.1 from whatever baseline") +
  ggtitle("Richter logarithmic strength increase visualization\nfrom baseline (red vertical line)")


# Send the graph object 'p' to the display library plotly, so you can mouse over each point and see the magnitude multiplier
s <- ggplotly(p)

s # do that graph!

So, if you want to find out how much stronger the 6.7 1994 Northridge quake was than last week’s 4.6 quake, you can just hold down the crown of the watch and say what is 1.2589^^19, (79.4) or to get an approximate answer, what is one and a quarter to the 19th power? (69.3). Either way, that quake was a lot stronger and did in fact collapse buildings and knock down freeway interchanges and mess things up in general.

Also, how cool is it that your watch can do powers and roots?

The Crore Lakh system

I was reading a book on foreign relations between India and the United States since 1947, and part way through I noticed a funny way of writing numbers which, the first time I saw it, I thought was a misprint. I looked it up and found out about Crore and Lakh, but missed grasping how those numbers are pronounced by the billion or so people in India who group them that way. So … after recommending the book to a friend, I went back to KhanAmigoBeta to find out the answer.

All in all, my experiments with the GPT (Generative Pre-trained Transformer) world have been interesting and suggestive. And wouldn’t you know that I would pick probably the only GPT which is designed specifically to NOT give you the answer, but to make you work it out for yourself? So far so good!

ME: This is a question about how you pronounce the writing of large numbers in India. I noticed, while reading a book published in India, numbers written like this: one hundred thousand written as 1,00,000, and one million as this: 10,00,000. I know India has the concept of the Lakh (100,000) and Crore (ten million), but I don’t know how to pronounce these numbers out loud. Can you help me?

KHAN_AMIGO: Absolutely! In India, numbers are grouped differently than in many other countries. Let’s take the number 10,00,000 for example. How would you break this number down into smaller parts?

ME: Well, it looks like ten lakhs KHAN_AMIGO: Exactly! You’re on the right track. So, if you were to say this number out loud, how would you pronounce it based on your understanding of the lakh and crore system?

ME: “Ten lakhs.” But what about 10,23,000, is that Ten Lakhs 23 thousand? KHAN_AMIGO: That’s a great guess! But let’s think about it a bit more. If we break down 10,23,000 into smaller parts, where does the 23,000 fit into the lakh and crore system?

ME: It’s less than one lakh KHAN_AMIGO: Correct! So, if we have 10 lakhs and an additional 23,000, how would you combine these two amounts when saying the number out loud?

ME: Uh, like I said before, 10 Lakhs, 23 thousand? KHAN_AMIGO: Yes, you got it! The number 10,23,000 would indeed be pronounced as “Ten Lakhs, Twenty-Three Thousand”. Great job! Do you have any other questions about this, or is there something else you’d like to learn?

ME: How about 12,10,23,00, is that 12 million, 10 lakhs, 23 thousand? KHAN_AMIGO: Hmm, let’s think about this. If we break down 12,10,23,000 into smaller parts, we have crores, lakhs, and thousands. Can you try to fit these parts into the crore, lakh, and thousand system?

ME: I think so … it would be 12 crore, 10 lakhs, 23 thousand. But does that mean there is not the ‘million’ concept in that system? KHAN_AMIGO: You’re correct! In the Indian numbering system, there is no ‘million’ concept. Instead, they use the terms ‘lakh’ for hundred thousand and ‘crore’ for ten million. So, the number 12,10,23,000 would indeed be pronounced as “Twelve Crore, Ten Lakhs, Twenty-Three Thousand”. Great job! You’ve got the hang of it.


So, now you know how to pronounce the number 3,95,38,223: Three crore, 95 lakh, 38 thousand, two hundred and twenty-three. It’s the estimated 2023 population of California, in case you were wondering.

hilltop sculpture

It’s a bird, it’s a plane, it’s a neutrino!

— all photos Copyright © 2022-2024 George D Girton all rights reserved