Artificial Intelligence: The Newest Revolution in Torah Study?
Rabbi Dovid Bashevkin recently had a conversation with Professor Moshe Koppel at OU headquarters in downtown Manhattan on how digital technology, specifically artificial intelligence, is being applied to Torah study with new and unprecedented techniques, ultimately changing the way we approach and relate to Jewish texts.
Rabbi Dovid Bashevkin: Let’s start with the basics. What exactly does the term “artificial intelligence” mean? When I think of artificial intelligence, I think about 2001: A Space Odyssey or about robots coming to life and taking over Earth. But AI also makes me think of Gmail and how it’s able to fill in missing words and predict how my sentences are going to end.
Prof. Moshe Koppel: In the early days of computers, back in the fifties, the kinds of things computers were designed to do on a regular basis were boring tasks, such as sorting, alphabetizing or searching for something in a file. That was the bread and butter of what computers did.
In 1956, there was a scientific conference at Dartmouth College that is widely regarded as the founding of artificial intelligence. The idea was to try to get computers to do the kind of things people do, such as game playing. Scientists wanted to know—can you get a computer to be a chess champion?
RB: What would make it more difficult for a computer to master a game than to alphabetize or search for a piece of information?
PK: It’s not fundamentally different. But if you think about it, there are lots of obvious methods for sequencing, classifying or searching for things. The trick is just to do it efficiently.
However, to get a computer to play chess effectively, you need to really think through the various steps to figure out what you’re trying to optimize and how to optimize it from among so many possibilities. It’s not obvious what the right technique is.
In 1959, Arthur Samuels, a pioneer in AI, published a paper demonstrating how computers can learn from past mistakes; the vehicle he used to prove it was a game of checkers. Over time scientists were able to get computers to play chess, which is a much more complicated game. In 1996, IBM’s supercomputer Deep Blue defeated world champion chess player Garry Kasparov.
There are many different areas in which AI can revolutionize Torah study and, in fact, already has.
RB: I was a kid during Deep Blue. But bring it back to the foundational question, which is: is all of this artificial intelligence?
PK: The truth of the matter is that if you ask somebody where the line is between what we call artificial intelligence and what we simply call computer programming, there’s no big red line between them. In a colloquial sense, if you can get computers to do the kind of tasks people do as well as or better than people do them, that’s called artificial intelligence.
RB: During the last few months, we’ve been hearing about Open AI’s groundbreaking ChatGPT, a program that generates amazing responses to any prompt. Some have prompted the chatbox to write a sermon for the parashah in the writing style of this or that rabbi, for example, and it actually came up with derashot that were new and innovative.
PK: Yes. You could ask ChatGPT for something on the parashah written in the form of rap and it will deliver.
RB: Exactly. So something like ChatGPT raises the following question: how do you see AI revolutionizing the world of Torah study?
PK: That’s a great question. There are many different areas in which AI can revolutionize Torah study and, in fact, already has. Looking toward the future, one can imagine all kinds of virtual reality content for learning korbanot, something I hear is already happening. But, of course, we can do much more than that.
RB: Right. But let’s focus on what we are doing presently to make Torah texts more accessible, things like very advanced text processing.
PK: At Dicta—The Israel Center for Text Analysis, a research institute devoted to developing tools for computational analysis of Jewish texts, we recently came out with a new app called Dicta Maivin (“Dictation Expert”).
Here’s how it works: Take any sefer. On your phone, go to illuminate.dicta.org.il, and take a picture of any page. Using our own version of OCR (optical character recognition), specifically adapted to the fonts typical of rabbinic works, Dicta Maivin will convert the text into digital form. We have the capability of taking a photo of a rabbinic text printed in the nineteenth century in cramped, difficult-to-read Rashi script and converting it into text that is legible and easier to understand. Dicta can also insert nikud (vowelization) into a text; it’s hard for some people to read a sefer that doesn’t have nekudot since many words are ambiguous.
When Rabbi Adin Steinsaltz added nekudot to the Talmud text, it took herculean effort, as it was done manually. Now, using artificial intelligence, you can take a new text that has never been seen by the computer, and without any manual intervention all the nekudot can be inserted.
RB: Give us an example of a sefer you did this with.
PK: We’ve done it on hundreds of sefarim, but I’ll choose one that’s particularly interesting—Avkat Rokhel, the teshuvot of the Beit Yosef. The version of Avkat Rokhel that’s available was originally printed circa 1865. The Rashi typeface is hard to read, the words are close together, and like many classic rabbinic texts, Avkat Rokhel has very long paragraphs with minimal punctuation. We scanned the sefer and converted it into digital form. The OCR was very accurate. We then inserted nekudot, and after that, we used AI methods to automatically add punctuation.
RB: In addition to nekudot and punctuation, there is the challenge of abbreviations. Acronyms are all over rabbinic literature, and some of them are very obscure.
PK: True, kaf-hei-gimmel could either be k’hai gavna (Aramaic for “in such a case”) or it could be kohen gadol. In many cases, abbreviations or even words are ambiguous. Should daled-beit-reish be vocalized as davar, dever or dabeir?
RB: Exactly. Those are great examples.
PK: You need to be able to distinguish between them. Now we have this very advanced AI system that’s able to figure out the intended meaning of the abbreviation based on context.
RB: So all of this is making the text easier, more accessible and more approachable. Torah scholars no longer have to decipher the nekudot or the punctuation, or ambiguous words and abbreviations. I wonder, however, if scholars are welcoming all of this, since I don’t think they want to be replaced.
PK: You’re making a valid point. But there’s something for scholars here too. Let’s say you are learning Chiddushei HaRamban, and Ramban quotes a Sifra or a Sifri, or a gemara or a midrash. If you’ve run the sefer through Dicta Maivin, every time the text cites an earlier source, an automatically generated footnote will provide the original source. For example, it might say: see the gemara in Pesachim on page x. The app basically recreates a scientific edition of rabbinic texts. At the swipe of an icon you can open abbreviations and see footnotes identifying sources and subsequent quotations of the text. For example, there are later commentators who quote the Ramban. If I’m learning a line in the Ramban and I want to know every single Acharon who quoted this particular Ramban, I can now easily access that information. You can also see the different ways the Ramban has been quoted. Maybe Rabbi Moshe Feinstein quoted it one way in a responsum, while the Minchat Yitzchak quoted it slightly differently. You can actually compare all the different versions with the differences highlighted. Notes and paraphrases of later sources can be systematically identified, and digitized manuscripts can be compared. All of this is surely of interest to scholars.
RB: Your description of Dicta Maivin reminds me of the Shazam app, where you play a few seconds of a song and it’ll tell you what song you’re listening to, what album it’s on, who composed it, et cetera. This is Shazam for Torah.
Do you think a time will come in our lifetime when the role of the posek, the halachic decisor, is going to be replaced? Already now, I don’t need to call the rav of my shul to find out what berachah to make on a bowl of corn flakes.
But there are halachic questions involving contingencies. For example, if I want to know if my knife is still kosher, there are a lot of follow-up questions involved in such a question. What did I slice with it? What was I washing it with? How hot was the water? et cetera. Do you think AI will be capable of being taught the guidelines of halachah so that it can pasken she’eilot?
PK: I would divide the world of she’eilot into two parts. It’s really a continuum, but let’s talk about two parts. One is straightforward questions, like what berachah do I say on a bowl of corn flakes, or can I put a teabag into a kli sheini on Shabbat.
RB: That is similar to alphabetizing. Those answers are already out there. A computer simply makes it easier to find them.
PK: Exactly. However, with the existing technology and search engines, such as Sefaria, the Bar-Ilan Responsa Project or Otzar HaHochma, you would not be able to get the answer even to the most simple halachic question. That’s because a keyword like “teabag” or “kli sheini” will generate 1,000 responses and you would have to spend hours sorting through them, which is not very helpful.
But it’s clear that not only in our lifetime but in short order, we are going to be able to find answers to these basic questions. Anyone who’s played around with ChatGPT and seen how astonishing it is knows that you could probably put in some very simple she’eilot and get a fairly reasonable answer.
We have the capability of taking a photo of a rabbinic text printed in the nineteenth century in cramped, difficult-to-read Rashi script and converting it into text that is legible and easier to understand.
I should warn you that while ChatGPT is really good at giving clear and coherent answers, it’s not very good at reliably giving accurate answers. And that’s something we should be concerned about. You would not want to trust ChatGPT with anything really important, whether it’s halachah or anything else that’s really important to your life. ChatGPT is an astonishing parlor trick, in the sense that it could explain game theory’s Nash equilibrium with a more or less reasonable Wikipedia-like answer. What’s remarkable about it is that it’s a text generator, not a text copier. The paragraphs it gives you don’t actually exist anywhere; it has actually created them.
But while it’s an amazing thing, you wouldn’t want to rely on everything it says as being absolutely true. But it’s clear that in a few years, we’ll be able to ask the kind of straightforward she’eilot about which there are no heated arguments among rabbanim. You’ll put in a question such as, “Can I pour the hot water into the cold water on Shabbat?” and it’ll provide a good answer. But the fact of the matter is that such she’eilot were never what rabbanim were for. What you really need rabbanim for are the second kind of questions, where the rav needs to see the person in front of him and understand the situation.
RB: It’s what I’d call sha’at ha’dechak issues, pressing circumstances with life situations. And there’s a difference depending on the questioner. Is the questioner a millionaire or somebody who’s broke and the response might affect his ability to send his kids to yeshivah?
PK: Right. A she’eilah could involve serious concerns such as one’s health, or even be a life-and-death issue. Less serious she’eilot also require a posek who could understand the bigger picture; sometimes it could just be a matter of “it would be very expensive for me to have to do this.” At times, marital conflict might be a factor. For example, a spouse has become less frum or more frum than the other spouse and the couple needs to resolve the issues between them. It’s a matter of shalom bayit. They need to know that maybe they could use a particular kula [halachic leniency] in order to save their marriage. You would not want ChatGPT answering that question.
RB: Do you think there’s going to be a future where AI will be able to factor in these human elements or be able to explore people’s facial expressions?
PK: Yes, for sure. But that will take time and require appropriate caution.
It’s important to add a somewhat obvious thought: it’s crucial for those who pasken she’eilot to have a very broad and deep knowledge of halachah even if the actual material is easily accessible at the click of an icon on their smartphone. A rav often needs to pasken on the basis of intuition because he’s not going to find every individualized question he’s faced with in the Shulchan Aruch or the Mishnah Berurah or the Iggerot Moshe. The only way to develop a strong intuition is through internalizing a tremendous amount of information.
RB: People have this sense—and I certainly have it—they don’t want to be replaced. I want to always feel like I am able to contribute to Torah. I think a part of Torah is the human interpretation, the human partnership with the Torat Hashem. As the gemara in Kiddushin (32b) begins, “u’veTorato yehegeh yomam va’laylah—in his (that is, each person’s) Torah I will meditate day and night,” expounding on the verse in Tehillim 1:2.
I’m wondering what advice you would give to an emerging talmid chacham who sees where things are headed and is concerned that his massive breadth of knowledge is going to be easily replaceable. What skills should he invest in that will be least likely to be replaced by a computer?
PK: The answer is, as I said, developing healthy intuition. You need to understand what’s going on behind the halachah. What are its underlying principles? What moral ideas are there?
More importantly, you need to understand people. A real talmid chacham doesn’t treat someone who’s down on his luck, doesn’t have parnassah, and has shalom bayit problems the same as a person who is wealthy and has minimal stress. A true posek understands what each person needs. He can’t make up halachot, but there’s a certain amount of leeway. He needs to know: where is there room for flexibility and where do you have to be rigid? What does this particular person sitting in front of me need to be able to flourish and live a healthy Torah life? What some other person needs might be very different.
A rav often needs to pasken on the basis of intuition because he’s not going to find every individualized question he’s faced with in the Shulchan Aruch or the Mishnah Berurah or the Iggerot Moshe.
RB: Have you had anyone reach out to you saying, “I don’t like what you’re doing here,” or push back saying, “We’ve got to draw a line”? There’s so much work being done in AI safety to make sure that we’re not literally replaced by computers. So I’m curious, have there been people in the Torah world who are, so to speak, concerned about the safety of AI Torah?
PK: Interestingly enough, that hasn’t been the case. I’m not one to shy away from controversy, but the fact of the matter is that Dicta cooperates with Orthodox Jews across the specturm. We work with with a lot of Chareidi groups, as well as with Sefaria and other organizations, and we really haven’t gotten any push back at all. So far, nobody has told us they’re frightened by what we’re doing because for the most part, we’re just providing a service to people.
RB: Give me one moment in your career where you saw a computer do something and you gasped and said, “Wow, I didn’t think I’d see this in my lifetime.”
PK: Well, that happened some months ago with ChatGPT. I put some questions into ChatGPT, and I was shocked. It’s jaw-dropping. You can literally say: tell me the halachot of bishul on Shabbat and do it in limerick. And it does it.
RB: What’s next for AI? What do you predict the world will look like in twenty-five years from now?
PK: Well, first of all, we’re going to be facing the kinds of halachic questions that we really haven’t thought about a lot. Consider the halachic area of grama, an indirect action on Shabbat. Technological inventions like those by the Zomet Institute in Israel use grama as the basis for allowing certain things that people need for medical or other reasons, such as motorized wheelchairs.
In the future, you are going to think that you would like your driverless car to pull up in front of your house and take you somewhere, and it will do that. You’ll have cars coming exactly when you want them to come and taking you anywhere.
What we’re accustomed to now is that if you want to get a certain consequence, like you want to get yourself in your car from here to there, you need to perform an action. As far as we know, what is forbidden on Shabbat are those actions. You can’t drive your car because of the combustion engine. But what happens when you can get the consequences—such as getting from here to there in your car—just through your thoughts or by preprogramming something before Shabbat?
To put that more broadly, what you’re really doing is separating actions from consequences of actions. You’ll be able to get the consequence without the action. Will that be forbidden on Shabbat as well because we’re trying to avoid those consequences? Or is it just purely a technical matter, that is, if you’re not performing the actual action, then it’s perfectly okay?
RB: Final question: on a personal level, do you like learning digitally?
PK: No. I never learn from a computer. I open up an old-fashioned Gemara and just learn straight from the Gemara.
RB: Professor Koppel, thank you so much for your time.
Rabbi Bashevkin, a member of the Jewish Action Editorial Committee, is director of education for NCSY and clinical assistant professor of Jewish values at the Sy Syms School of Business at Yeshiva University. He is the founder of 18forty, a media site discussing big Jewish ideas.
Professor Koppel is professor emeritus of computer science at Bar-Ilan University, chairman of the Kohelet Policy Forum and chief scientist of Dicta: The Israel Center for Text Analysis, a research institute devoted to developing tools for computational analysis of Jewish texts. His most recent book is Judaism Straight Up: Why Real Religion Endures.
More in this Section:
What Artificial Intelligence Teaches Us about What it Means to be Human by Rabbi Netanel Wiederblank
Halachic Smarts about Smart Technology by Rabbi Chaim Jachter
AI Meets Halachah: Jewish Action speaks with Rabbi Dr. Aaron Glatt