Are We Getting Close to Robot Rabbis?
Artificial intelligence makes smart Torah-Bots possible. I know because I just built one.
You’ve probably heard a lot about recent advances in natural language processing and artificial intelligence. But while you’ve been hearing about AI engines like GPT-3 and it’s cousin ChatGPT and the wisdom they’ve dispensed, I’ve been busy playing with them.
How do those engines work? In a way, no one really knows. The precise connection between the countless trillions of words used to train GPT, and the answers it provides to your questions is a bit of a mystery. I can definitely assure you that the engine isn’t just repeating stuff it’s read. There’s some kind of “thinking” going on, where natural language sentences are intelligently parsed, intent is assessed, and sophisticated connections are established.
Great. But what about the Jews? Ah yes. The Jews. Well ChatGPT will tell you that it’s not yet completely fluent in Hebrew. But it can certainly hold fascinating and detailed conversations in English about Torah-oriented philosophical, historical, and even halachic topics. And it’s constantly improving. No two conversations with the AI will turn out quite the same. Try it yourself.
But there are still significant limits. The public version of the AI isn’t all that Jewish. However OpenAI, the company behind GPT, makes their engine available to developers through an access interface known as an API. That means it’s possible to use your own data to train a private version of the tool so it’ll be able to “think” about the things that interest you.
Predictably, I couldn’t resist the temptation.
As an experiment I downloaded around 50 articles dealing mostly with Choshen Mishpat topics from the Jewish Law website. I then used a Python programming tool called GPT Index to, as the name suggests, index all the text in those articles in a format that’s understandable to GPT. We can then query the resulting model pretty much as we would ask questions of the public ChatGPT tool.
Naturally, this was just a proof-of-concept experiment. The real goal is to train the model with far more data - ideally even Hebrew and Aramaic. And, of course, GPT-3 is not a finished product. GPT-4 is set to arrive in the next few months and things will only get better from there. But this is an excellent place to start.
Ok. So what came out the other end?
Let me share the responses to a few questions. Here’s the first:
Are there ways by which Jewish law treats property owned within corporations differently from property owned by a Jewish individual?
First of all, here’s how the public GPT-3 engine responded:
Yes, there are ways in which Jewish law treats property owned within corporations differently from property owned by a Jewish individual. For example, the laws of inheritance and loans are different when dealing with corporate property. Jewish law requires the corporate property to be divided equally among the shareholders when the head of the corporation dies, while an individual’s property may be passed down according to their wishes. Additionally, Jewish law dictates that loans taken out by a corporation must be backed by the corporation’s assets, while a loan taken out by an individual is usually backed by the individual’s personal assets.
I’m not 100% sure how useful (or even accurate) those observations are, and there are no sources included that we could check. The response of the ChatGPT tool was similarly vague. Here’s a taste:
…Additionally, in the case of a sale of property, the halakhic laws of ribit (usury) and ona'ah (overcharging) may apply differently to a corporation than to an individual. For example, the laws of ribit may not apply to a corporation in the same way they would apply to an individual borrower…It's also important to note that in recent years there have been some poskim (decisors of Jewish law) that have addressed the halakhic issues related to modern corporate structures and financial instruments, and there are some halakhic authorities who have formulated guidelines for Jewish-owned businesses and corporations. As always, it's recommended to consult with a qualified rabbi or other halakhic authority if you have any specific questions or concerns about the halakhic treatment of property owned by a corporation.
Now here’s what I got from my private model:
Yes, Jewish law may treat property owned within corporations differently from property owned by a Jewish individual. This is because Jewish law may characterize a corporation differently, which could determine whether a corporation, according to Jewish law, could be liable as a bailee (shomer) or tortfeasor (mazik) and whether portions of produce grown by a corporation must be made available to priests or to the poor. The five principal positions on the relationship between corporate ownership and Jewish law obligations are the "Jewish law (halakhic) entity" approach, the "halakhic partnership" approach, the "halakhic creditor" approach, the "purchaser of entitlements" approach, and the "relationship" approach. Each of these approaches may result in different treatment of property owned within corporations compared to property owned by a Jewish individual, such as their voting rights (some, in fact, may have no voting rights at all) and as to their economic rights. For example, holders of some stock, such as preferred stock, may be entitled to a specified annual return even if the company shows no profit in a particular year, while the holders of common stock are much more likely to be subject to discretionary decisions of the board.
This was very specific (although far from complete) and included some direct quotations from one of the articles in our index. Given the data that was available to the model, I’d say that this was a pretty good answer.
Let’s see another question:
Where can I find the opinion of Rabbi Moshe Feinstein concerning artificial insemination
Here’s what the public GPT-3 had to say:
You can find Rabbi Moshe Feinstein's opinion on artificial insemination in his book "Iggrot Moshe," which is a compilation of his responsa. The responsa on artificial insemination can be found in volume 5, Responsum 2
Yeah…no. Here’s an excellent example of GPT’s hilarious habit of making things up with a completely straight face and pretending there’s nothing wrong at all. The engineers working on the project are aware of the problem and they’re addressing it. There are also ways to prevent it. Personally, I just find it endlessly entertaining.
ChatGPT, on the other hand, was at least honest:
I am not aware of a specific source where Rabbi Moshe Feinstein's opinion on artificial insemination is recorded. However, Rabbi Moshe Feinstein was a prominent Orthodox rabbi and posek (decisor of Jewish law) in the 20th century, so one might find references to his opinion on the topic in works of halakha (Jewish law) or responsa (written answers to questions of Jewish law) from that time period.
You can check the books from Rabbi Moshe Feinstein or from other Jewish law authorities if they have written anything on this topic.
Given that there’s at least one article on the topic within our Jewish Law collection, the response of our private model included this:
…Iggerot Moshe Even Haezer 1:10, 71; Even Haezer 2:11; Even Haezer 3:11; and Iggerot Moshe Yoreh Deah 2:157…
The first three sources were a direct (and correct) quotation from one of the articles. This shows that the model understood what I meant by “find the opinion of…” and delivered exactly what I was looking for.
That fourth source, unfortunately, was another straight-up fabrication. I have no clue what the model was thinking, but it is, after all, just a computer.
Finally, I asked a more abstract question that would be much more difficult to answer. I’d say that the private model did well:
Would you characterize Jewish law as more of a 'common law' or a 'statutory law'?
Here’s what I got back:
Jewish law is more of a 'common law' system. It is based on precedent and relies on rabbinical courts to interpret and apply the law. It also incorporates secular law concepts into Jewish law, such as the principle that "the law of the land is the law" and the doctrine of limited liability, which are based on commercial custom and the understanding that people in the business world realize that corporate shareholders will not be held personally liable. However, if an individual shareholder personally committed the tort, they may not be entitled to limited liability under Jewish law.
So have we reached the age of reliable automated rabbinical services? Not just yet. But we may be at the edge of very interesting possibilities.