Live CEOing Ep 689: Language Design in Wolfram Language [Ontologies]

Stephen Wolfram leads a design review of Wolfram Language's ontology system with Tony and Michael, working through how hierarchical entities work, how properties attach at different levels, and whether to show parent labels like "(animal)" in the UI. They aim to ship species-related features by version 13.3.
Chapters
Okay. Hi, everyone. Welcome to another Wolfram Language Design review. We are talking about ontology and hierarchical entities. So, Tony, where do we start here?
So, yeah, that's basically the agenda from last time, but updated with two new sections. One is an updated taxonomy of types with our current terminology, and then some clarification on the new syntax or what does not change. So the taxonomy of types is about the existing entity types that we have, that we now call entity source types, Below them, specializations, and optionally property source.
Okay, so hold on, let's give an example of this. So taxonomic species is an entity source type, is that correct?
Yes.
Is eukaryote also an entity source type or is that. I don't understand that. The root of the tree. Explain this tree.
Yeah. So taxonomic species is the entity source type, and below that, all of them are type specializations.
Okay. Why is it necessary to distinguish those two things? The root of the tree and the rest of the tree?
The entity source type is what appears in the first argument of entity. And only the entity source type ever.
Sorry, say that again. I got distracted by something.
Only the entity source type ever appears in the first argument of entity. That's right.
I see.
That's what we call it, entity source type. While the specialized types, they can appear in property first arguments and entity.
There has to be unification of the entity name across all entity specializations. That is this leaf down here somewhere deep down, you know, by the time you get the leaf for an individual entity, all those leaves must be distinct, independent of their paths. Does that make sense? If the. If the underlying structure is just an entity with which has first argument, entity source type, second argument, entity name. That means the names have to be unique across all branches of the entity specializations for a given entity source type.
Yes.
Okay. I mean, Michael, Alan, everybody desirable. Okay, fine, fine. I'm just checking, you know, that's an implication. Okay. All right. So one thing is these are yellow, but they didn't land yet, so to speak. I mean, they didn't go to. Down to an entity. They're still entity. What are these things?
Entity types. So it's a proposal to have a new object, an entity type.
Okay. I claim it shouldn't be quite yellow.
Yes. So that's just an idea for a typesetting.
But I like the typeset. Except I don't think it should be quite yellow. It should be some. Some slightly different color, possibly. I think so. Why not?
I think so too. So it's just way to make sure.
Yeah, but I think, you know, like that looks just like an entity here, except it doesn't have an entity type.
Yeah.
Would it have a stronger or weaker color than entities?
I would say weaker. It's kind of like not really the goods. It's really like still the infrastructure.
Yeah.
Okay, I see. This is just a naming. I mean, the fact that those are in a weird font is unfortunate but irrelevant. That's cool. Okay, so if I look at one of these, an input form, for example. Okay, so that's what we agreed before, that it's an arrow sequence, is that correct?
Yes.
If I go down to this one here, It'll be multiple arrows.
Yeah. Ideally you would see that in the tooltip. Yes.
Okay. Okay. All right. Now, I couldn't say entity here. It would be entity class always. Yes.
Because we use entity class when we want to represent a list of entities instead of an aggregate entity.
I see.
Which also think is correct.
Yeah, I think it's correct too.
I mean, the one exception that we have for this is food, because there we want to average. But typically for species, you don't want to average. You don't have an abstract mental image of a mammal with a certain size at fair weight.
That was pretty cool what just happened there. Wow. Okay, so if I wanted to go down to, let's say, bird here, can I do that? And by the way, we should have autocompletes that show you what you can do at this level.
Yep. We don't have a type below animal at the moment, as you can see from the type graph.
I see. What was. Why was this faster? What was loading previously? I mean, this wasn't going directly to the server, it wasn't going to alpha server. This was some kind of local thing. Why was it slower the first time?
Yeah, depending on your cache state, you might need some metadata first and this is going to improve. But yeah, I think even in the second call there was a server call, but just one. Well, in the first time, I had.
This operand animal doing here that seems.
Like that is a sub label which is independent of ontologies, but the domain developer can choose those sub labels if they wish to. So it's a different feature.
Okay. I mean, I think they could go a bit smaller and a bit lighter.
Yes, we already have a report for that.
Does it care that the dodo is extinct? No, I'm sorry, that was probably. What's that?
Probably more weeks than it's taken care of.
What's taking over? You mean you killed the last dodo or something? What?
No, there's this.
Dutch oh, they're bringing it back?
Yeah, they made group workers.
Okay, okay, okay, okay, okay. That's what you mean by a couple more weeks? Yeah. Okay, all right, fine. Really? Dodos were that big? Who knew? Okay, Okay, let's keep going. Now, why doesn't that say paran animal? Because it isn't an animal. It's a bird in some sense. Although that's type of animal. But.
Yeah, it could be that this needs reevaluation. It might be, but otherwise it's a data question.
I don't understand why these have parents and these ones don't. Okay, okay, no problem. Entity type list. I see. That's all the sub places where that occurs.
Yes.
Going up the trees.
Yep. What the hell is that? Sorry, that. That's both. That's rather ugly. What does that mean? What is that?
There seems to be the new auto completion.
I think this is the new project from Noah, which is the work.
Okay, all right, fine. So Ben, maybe can just take a screenshot and just comment that that's not correct. Fonts. I'm sure they know that. Yeah.
And entity type is still not officially exposed. Waiting for this review. Basically, that's why there's no auto completion.
I see. Okay. All right. What's this?
So here you can look at the tooltips of the first and the last properties and you just see that the type argument is different.
I see that. So that's a property only available in that branch. Yes, I see. And the fact that, I mean, this is the story of, you know, the astronaut who's also a painter that you could have, because there's a unique name that refers to the entity, even from the fact that it's a person. You can then have. The property has the, you know, painter, notable artworks. You know, you can have person, arrow, painter, comma notable artworks, person, arrow, astronaut, comma missions or something, but it's the same underlying entity, is that correct? Yes, because the entity is unique, ified across the source. What did you call it? The entity source.
Entity source type.
It's a good sign that I can recreate that name without remembering what it was. Suggests it's the right name. Okay, Okay, so I see. So this is. I don't quite understand this. What did this mean by entity type name? Oh, those are the things which are pure taxonomic species as opposed to specifically identified as animals. Is that right?
Yes. And it also shows that there are no special properties for eukaryote.
Right, right, I get it. There could be, but there aren't.
Correct.
Okay, what's this.
This one is showing that when you go down in the hierarchy to the specializations, you get more properties, which is the opposite of when you go down for the entity count. Yeah, you get less and less entities when you go down.
Right, because you're getting. Right. But a single entity could be in multiple places on this tree. Correct?
Yes.
Module. The phrasing of what this means, because these are properties, they are not.
Yeah, I understand.
I also thought they're just.
Yeah, okay. All right. That's very weird. Why does it do that? I mean, that's an entity type. Why is it parenthesizing anything after it? You see what I'm saying? I don't even think that animal thing is doing as much good there. Why is it there?
That would be for business developers.
Okay, do we have any of those people here? So this is basically showing all the.
Kingdom or super kingdom level tax as a sub level. So for eukaryotes, it belongs to eukaryotes super kingdom. So it's showing in the sublevel. Showing the sublevel eukaryotes added to the end.
I understand, but I think it looks kind of silly. I mean, in other words, down here. I don't really think. I mean, I don't know why we put the paren animal here for any of these. I mean, okay, for a strict sparia. I wouldn't necessarily know what it was.
I was going to say it looks silly for the few thousand one nos. It looks silly for the hundred thousand names.
Here's what I would say. Here's what I would say. If it's a common name, if it's a non, not a, you know, Linnaean, binomial ish name. I would say drop the animal and also snakes pre animal. Just doesn't make sense. Right. It would be paren animals, plural. Am I making sense? And even the Scoriidae, whatever they are, are plural animals. Do you see what I'm saying? Yeah, so I just. A little bit more curation is needed for that. I mean, but again, for all things which aren't scientific names, I say you drop the word animal.
But wait a moment. With respect to the plural, like in an output form of a normal entity, we also don't use plural, and this seems to me very similar.
Well, give me an example.
Control equal Einstein and then click into the result so it becomes output input.
Sorry, here.
Yeah.
What'S your point?
I thought you just said it should be animals and not animal.
No, no, no. I'm saying in the case of snakes, plural, it should be Animals, plural. Right. For bald eagle, it should be animals, singular. For snakes, it's many animals, many types of animals.
Or should the label be snake?
No, because it's a. No, no, that we. Super confusing. Look, we know if you're down at the level of a species, right? It's a single thing. The point of this is it's not a species. But if I take that and I don't know what it is, what is it? It's a. So it's a. I don't understand this. This is crazy. That's not a species, it's a. What is it, a family or something? I think snakes and lizards are part of squamata, which is a phylon. Right? Am I making sense? This is not a freaking. This is not a species.
But, but.
Look, in the past we've had no choice but to pretend that, you know, mammals are a species, but now we can do better. This is not a spec. I mean, to me.
But. But wait a minute. Nobody says it's a species. It is an entity under taxonomic species.
Okay, fine, but then I'm just saying in its common form, whatever it is, whatever this form is, don't use a singular if it's not a species.
I see, I see, I see. I see what you're saying. Use plural if it's higher up in dialogy.
Exactly.
Okay, I get it, I get it.
So, like, this one is presumably down at the bottom of the hierarchy. It should just be animal. If we're going to use the term animal.
Yeah, I get it.
And that should be a plural.
That makes sense. Yeah.
Okay, now what do you.
But in that case, wouldn't be better to have to be a bit more.
Specific, like animal field or something like that. Animal. What?
So animal family.
Or to be a bit more specific, it'd be nice if we. If we gave the phylum, you know, the level that it's at. Phylum, family, whatever it is.
Yeah, yeah.
I mean, even if we just said phylum there without saying animal, because I think the animal part is going to get fairly silly. Many people, you know, animal is an everyday termination. I mean, animalia is a scientific term, but by the time you say that, you know, a worm is an animal, most people would think that was weird. I don't know. What do you think? I mean, one possibility is we label the hierarchy level here. This is kind of silly because this is probably some, you know, microscopic, you know, protozoan like thing, and calling it an animal seems silly. Am I making sense?
No, no, I Think it's a big owl, actually.
Strixvaria?
Yeah, I think so.
Oh, gosh. Okay, fine.
Because it's the result of Predator, so it must be something substantially bigger than the object.
Yes, yes, yes, yes, yes, yes. Okay, I'm too late corrected there. Okay. Okay, but the question of whether we should say the level here is not obvious to me. What do other people think?
Okay, so for this one I agree that Zane Phylum would be not bad. But for other domains where there aren't technical terms for the intermediate entity levels, the name like astronaut would be the only option because we don't have like bi professional type or something like this.
We also don't have categories. I mean, I mean we might have Mercury astronauts or something.
Yeah.
But then we don't have to say Mercury astronauts. Paran astronauts. Well, I don't have a strong feeling, but clearly cannot be singular.
Yeah, agreed, agreed.
Okay, let's keep going. What were you demoing here?
So those were basically some examples of seeing the ontology features in use.
Well, how is. How do I see the ontology here.
Behind the control equal. There's an interpretation that maybe if you click into and hit Enter.
I think it's going to work because I don't think I'm connected to the. Yeah, I'm not connected to the. Right, right. Wolfram Alpha. Okay, so you can tell me what that says. I mean. Or are you going to tell me to change my preferences? What should I do?
At least in a few examples below you can see the actual query.
Where.
Under entity classes, heaviest veil, for instance.
Okay. Okay. So a maximum recorded weight could apply to anything. But if it was fin size, it would be likely to be entity, property, taxonomic, species, arrow, something that ends in fish and then fin size. Yes, this is pretty nice. It's pretty nice, I think. Okay, so plant. Yeah, good. So that applies to animals, it doesn't apply to plants. Plants don't have a maximum speed. Except for the tree I'm seeing walking across the. That's cool. How do we have this data? Do we have that data in any serious way?
Kego has collected a lot of data about species.
Good stuff. I see. Fine. So these are generic. Conservation status and biome are generic. I mean, that's probably generic as well. I would like to see some ones that aren't generic. Well, that one was not generic. This is looking nice. Except for the fact that this animal thing just seems completely unnecessary. I don't know a least chub. Do we need the paren animal there?
Maybe.
I must admit I don't know what. I would have known what it is.
No, I would not know what it is either. Well, maybe we just have to make this smaller and grayer and that'll be okay. But what's the difference between that and. When I say New York City or something and I see this city thing. What's the difference between the city lowercase. You get what I'm saying?
If you copy one of those animals and use it as input form, you will also see the type. Well, modular, a bug that it doesn't always appear, which is known.
What is the type?
If you evaluate the input form in place, then you'll see the type label.
Instead of the paren animal.
Yeah, that's a bug.
So wait a minute, what do you mean it's a bug? Should I see the animal as well as the type?
Yes, yes. In some sense the sub label is considered a part of the label.
I understand. I got it. I'm not sure that's right. I think it's going to get way too long. And in this case you're only showing, you know, I don't understand why you're not showing a sub case here if this is. Oh, I see. Because the entity itself only, you know, is only based on the.
It's an. It's a taxonomic species. We don't know more about it.
Yeah, I understand.
And we might have to enumerate many specializations if you want to show more types.
No, I understand, I understand. Well, no, yes, we might. There might be in many specializations. It might be so. And so is both an astronaut and a painter. And so we only want to show that they're a person here.
Yes.
Okay, but this business about saying paran. Animal. Okay, we just got to make this graphically lighter. Okay? Lighter and smaller. And then we should just see a couple of examples of when that is combined with this thing here to make sure it's not stupid looking. Makes sense.
Yeah.
Yes.
Okay.
In general, I think the annotation that something isn't animated I would find useful mostly for output because for input you would copy paste and you know what you had.
Yeah, I agree, I agree with that. I agree with that. So what this is doing is not really a bug. You know, this thing here that in the input. I don't know what this is, whether this is output or input or. I'm confused, but I agree with you. We don't need it in input.
Because most people don't type it up.
Well, actually. No, wait a minute. Michael, Michael, that's not right. Because in control equals. Right. What's it going to turn into? You're going to have to see. Control equals. I thought it was a movie. Oh, actually it came out as an animal.
So I think historically we introduced sub labels for cases where we have a lot.
I remember.
Yeah.
And entities of the same type whose label is the same. And we want some indication of what this entity is.
Well, that's not the case of the tricolor shark minnow. There's only one tricolor shark minnow. Well, presumably there are multiple ones. And I mean, you know, you know what I'm saying? There's only. That is not. We do not need it for disambiguation here.
Right. It's more for explanation.
Yes. Because these names are obscure and because we think. Okay, look, I just don't buy this. I think knowing that a watercress data is a taxonomic species, whether it's a fish, a bird, a protozoan, I don't care at this level. I've got some orientation here.
I mean, we don't have to have it if you don't like it. We don't.
I don't think we need it. I don't think we need it. I think, I think we don't need it. I mean, especially because, silly. I mean, you know, tilapia is an animal. Well, it's not to fish. Well, that's a part of animalia, but. Well, it's not really an animal. It's a fish type thing. See what I'm saying?
It's like there would be, say, tilapia as a food, which you couldn't. If you don't.
I know, I know, I know. But if it says taxonomic species, it isn't a food.
That's correct.
I think these are just confusing.
Okay, then we don't have them.
I mean, that's my current position. Okay. I, you know, we need to see more examples and I might. Might have to change my mind, but I, I think we should switch it off for now. Okay. This is an entity store.
Yeah. So. So that's a proposal for how users can define specialized types of their own types. No parallel to where they define entities and entity classes. They can define new entity types at the same level.
Okay, so. Okay, but to. Wait a minute. Okay, so the entities have been given canonical names above, and now we're referencing these canonically named entities within the entity type hierarchy.
Correct.
And otherwise we would just give. If it wasn't for the entity types, we would just say that Anna has property, blah, blah, blah. Well, how would we do that. Oh, they're right here. Right. That's the top level. That's the independent of sub casing of subtyping properties.
Yes.
Okay, don't we have a way of declaring the properties associated with the given entity type?
Yes, we can explicitly list the properties and even give them metadata, like a label.
Okay, so we need a mechanism for doing that. For the case of subtype that is.
Basically the same, it just nests.
Okay. All right. I'm just not seeing that right here. But yeah, yeah.
So where it says entities at the same level, you can always say properties goes to and then define what birth state is about. And you can do that at a.
Lower level, too, by saying something like person, arrow, birthdate, a person, arrow painter arrow, birthdate. Is that correct?
Well, just below entities, where the association ends, you would say properties goes to and then say birth date in an association goes to association, and one of the keys is birth date.
Okay, but how does that specify that that's a property of a sub entity type?
In this case, you specified at the level of person. Yeah, if you wanted it at the level of musician.
Yeah, that's what I want.
Into the musician association. Yeah.
Oh, I see. I got it. I got it, I got it, I got it, I got it. You're just listening for this type, Just like we listed for this type, we listed its entities, we list its properties. For this subtype, we listed sensitive listed properties.
Yes, we repeat the syntax.
Yeah, it makes sense. Okay.
And there's also. If we have subtypes, there's a proposal to show the graph in that. Yes.
What do we show in the entity.
Store otherwise the graph is just not there. If it were just a few dots unconnected, that can be improved because we have, for the databases, project a better typeset setting, and at some point we want to do that.
I think it's a good general idea. Okay. What else do we have to figure out here?
Well, we could review the entity type. Reference. Reference page, the proposed one.
Oh, boy. I'm not sure this is the time for that. We may not be able to do that here. Actually, it's not so complicated. I mean, people need to understand this. But yeah, okay. I mean, that doesn't look bad.
So the question.
This could go many, many levels. Right. So you have to do a dot here.
Yes, so. So there's a comment in the details section.
No, not good enough. Not good enough. You should just say arrow, child one, arrow, child two, arrow, dot, dot, dot.
Okay.
Yeah, it looks reasonable, actually. Just reasonable. Just fine. Child type Tree. What's the difference in child type tree and entity type tree?
Yeah. So entity type tree gives the same thing as entity graph, just a three part of it. While the child type tree was meant to have the type where you started with as root.
I'm sorry, why isn't entity type tree the thing where you. This type you started with is the root?
We couldn't do it like that.
Yes, I think it's super confusing. If you say tree, it better be a tree.
It's always a tree. The question is where the root is.
So if you say listen, listen, listen. I mean, if you say graph, it is in terms of our built in, you know, structures, it is a graph. If you say tree, it better be a tree. A green tree.
Yes, that's true in both cases. So the question is, if you say animal. Yeah. Do you want just one leaf tree or do you want the tree starting at species? So those are the two cases that we have is any type tree and child type tree.
Well, so child type tree just makes the one with. With animal.
Yes.
So you're saying given, given an entity type, do you show it starting from the overall root from its entity source type, or do you show it going down from the type that we have. Right. That we have before us right now?
Correct.
I would call that something like rooted entity type tree for the case where it goes all the way up to the top.
Okay.
Or maybe have the word source in it. Michael. Anybody else?
What about complete.
Or full?
Or full.
Yeah, that seems reasonable to me. I mean, I think entity type tree going. The default should be the one going down, I would think, even though it usually won't be terribly exciting. What about. Actually, there's an obvious thing. One of them is called entity type tree and the other is called entity source type tree.
Yes.
Yeah.
Yeah. Because we've got entity source type here and just entity source type tree, the tree that hangs below that.
Yes, I like that.
Yep. Okay, let's have a quick look at this optional topic and then we wrap. Yeah.
Shall we move entity type to the system and experimental. Okay.
Looks good to me. I'm looking. This is looking really nice. I mean, it's quite simple now, which is always good.
Great. So the optional topic is. Well, shall we embed labels into entities? The reason is you might give a notebook to someone else. They evaluate the entities and to display them they need the labels. And the other person receiving a notebook might not have the label cache.
Yeah. I think it's horrifying that we don't have the Label cache and the label cache will never be very big.
I think there was a small difference. This was not what Tony asked.
But yeah, it's another idea to on first use of any entities, get a cache of all labels of all entities. That's the other alternative.
No, no, no, no. What I'm saying is this crazy business about how fetching, you know, we've got the entity, but fetching, how to typeset it is a whole nother, you know, palava, that's bad.
We could just use the canonical name or.
No, no, no, no, no, no, no, no, no, no, no, no, no. Look, look, look. Right now. Why it is the case that when you have given you ask for entity list, you retrieve a bunch of entities. Okay. Then there is a second delay associated with typesetting those entities. What is that second delay?
Yeah, that delay should not be there because when the entities are retrieved, the labels are coming with the result.
Okay, is that new?
No, that has been like this forever. Modulum bugs. But it should work at the moment.
Then there's a bug. Okay, so what are you now proposing? What's different from the labels having come with the entities?
Yeah, I'm proposing that the labels are placed into the entity. That means entity is self contained to typeset without any external influence. It's the design of external identifiers.
You mean to have a metadata option in the entity?
Yes.
I don't like it. I don't like it because people need to be able to manipulate this stuff. They need to be able to do comparisons. I don't like it. I think having that stuff there as a hidden cache is a fine idea. Having it be something that messes up the canonical form of the entities is a really bad idea.
So regarding comparison, we already allow aliases in the second argument of entity, so you never know until normalization.
But this is exotic case. This is not the norm.
Yeah, this is a mistake. We should make this happen behind the scenes.
Okay.
You know, with a cache, maybe an SQLite cache or I don't know what kind of cache it is, but some, some, you know, some cache where you can quickly look this up, but not where it's actually visible here.
Okay. Yes.
So.
So the cache is in the works. Yes.
Okay, fine. All right. Anything else to discuss here.
That's it for my site.
Okay. This looks really nice. Really nice. I mean, I. You know. And when do we get to see Species in all its glory, so to speak?
Very soon.
Okay. Like week or so or Keigo.
Two releases.
Yeah, two more releases. Yes.
That's right, but. So we expect it in 13.3.
Yes, I think so.
I mean, it's de facto independent modulo the ref badge.
No, I understand. Okay, Good work. Thanks a lot.
Thank you.
Thanks.
Okay, bye.
More from Guy

Cheryl Strauss Einhorn | The Human Edge: Smarter Decisions in the Age of AI | Talks at Google

Rachel Glennerster | Innovation and the Center for Global Development | Talks at Google

Rebecca Winthrop | Rethinking the Purpose of Education in the Age of AI | Talks at Google

Dr. Robert Wachter | A Giant Leap: How AI Is Transforming Healthcare... | Talks at Google






