Exploring Wolfram Language V13.3

Stephen Wolfram walks through Wolfram Language 13.3, covering new math functions like Laplace transforms and special functions, computational geometry tools, and AI integrations including image generation and LLM functions. The update adds visualization improvements, fuzzy autocompletion, and chat-enabled notebooks.
Chapters
All right. Hello everyone. Well, today we're going to be looking at version 13.3 of Wolfram language, which just came out very recently and I haven't had a chance yet to live stream, kind of walkthrough of it, but that's what I'm going to do here today. So the first version of what's now Wolfram language in the form of Mathematica 1.0 came out as of June 23rd of, of this year, came out 35 years ago. And well, since that time you can kind of see the, the change that's happened in the kinds of things that the system covers. It's. Let me show you this kind of, this is a comparison between version one, what was present in version one in terms of modern documentation and what's present in version 13.3. So we've come a long way in 35 years and we've been releasing last few years, we've been releasing two versions per year. And basically our strategy is that we have lots of projects that are going on that have different timescales. Some of them finish in six months, some of them take five years. And twice a year we're kind of taking the latest results that we have and we're releasing a new version based on those. And so just a couple weeks ago we released version 13.3. And that's what I want to show you here today. And you'll find I wrote a big long description of 13:3 that you can find here. And there's a lot of different topics we'll be going through today and I'll try and show you a little bit about each of them. All right, so kind of the, one of the biggest things that's landed in 13 three is this is the, this is the year of LLMs. And going from 13.2, which came out last December, to 13.3, which just came out, the world kind of got transformed by the arrival of LLMs. And in fact, in 13.3 we have a whole bunch of built in LLM functionality which I'd like to show you, but I think I won't start with that because that's kind of a whole kind of complicated story in its own right. I'm going to start talking about some of the non LLM things that are new in version 13.3. So here's kind of a word cloud of different things that have arrived in 13:3, and we'll be talking about a bunch of these. All right, so let's get started. Well, so one of the things that's always been important to us. And kind of from Mathematica by Its name, version 1.0 is Math kinds of things. And so let me start with a kind of a math thing that got added in version 13.3. So when you do calculus, the typical kind of question you might ask is something like find the integral of the function blank. And you can do that just with the Wolfram language function integrate. But particularly when you apply calculus, it's more common, it's quite common to want to ask more elaborate questions like what's the integral of blah over the region blah? Or what's the integral of blah over the line along the line blah. So about a decade ago in version 10, we introduced the idea of integration over regions. And so we've got things like this where we can say integrate this function over the region X, Y, Z is an element of that three dimensional ball. And we could have specified that integral in kind of. Oh, that's not what I wanted to hear at all. We could have specified that in kind of explicitly with an if statement and so on. But it's much more convenient to kind of package it and also more efficient for the language itself if we package it in this form where we're saying integrate over that region. And so again, something like integrating over a line is something that you can in principle specify explicitly using parametric formulas and so on. But in 13.3 we've wanted to make that much more convenient and efficient. So we've introduced the idea of line integrate. So this is asking for the integral of that vector function along the specified line and there we get the result. So let's say we have a region like this one here that is a more complicated region than just a line from 1:1 to AB. We have this more complicated region. Let's take a look at what it's like to to integrate over that region. Actually, we could just go ahead and evaluate that that region there. Oh, okay, well, whatever. Then I was, I could put a region in there just to make it look nice and draw that region there and then say integrate that, compute the line integral of this over that particular region here and we get the result. So line integrals are pretty common. Another thing that's really common, particularly in applying calculus to physics, are surface integrals representing things like total flux through a surface. And in version 13.3 we've introduced something we call surface integrate, which is for just computing those kinds of things. So there's integral of just the unit, a vector in the radial direction through a sphere. We can Do a more complicated thing. We could, for example, say, integrate X cubed, Y cubed, Z cubed is the vector over the boundary of a dodecahedron. And this might take a little bit more effort here, but should give us the result. And I noticed that in the plug version of this, there's two different integrals that are given here, which I don't know why there are two different versions here. That's really odd. Should only be the first one. Wow, it's taking it a while. All right, well, this is a hard thing to do. I wouldn't. I would. Oh, there we go. Finally got the answer. Slightly complicated answer, but there it is. Okay. Actually we could ask what does the actual vector field, that actual vector field look like on the. On the surface of the dodecahedron? We can use slice vector plot 3D to show what that vector field is like on the surface of the dodecahedron. That's the surface integral we just did. Okay, well, so line integral and surface, line integrate and surface integrate deal with scalar and vector functions, integrating them, including space version 13.3. We also introduced another kind of integration, contour integration in the complex plane. So let's start off with a really classic contour integral, integrating one over z around a circle. Use Cauchy's theorem. The answer is 2i PI. If we do something slightly more elaborate, let's look at for example, this function here. Tan squared z over z. Let's do an integral of that over a circular contour here. Go ahead and do that. Oops. And we get a result there. If we say do this integral not over this specific contour. Actually we can. Let's do this over around a symbolically specified contour. The result will be slightly more complicated and sort of impressive. Takes it a while to compute this because it's actually a hard thing to compute. There. There's the result. Let's. Let's make this a bit bigger. You can see this is a conditional expression that has different values depending on the range of R values. R is the radius of the circle that we got. That's basically determined by which poles of the function are enclosed in that circular contour here. And we see some diagma functions showing up here, and so on. If we take this result, we can just go ahead and plot the imaginary part of this and again we'll see these jumps as we do or don't include certain poles in the. In the integrand. Well, we can have any shape of contour. So for example, let's say we have a contour that we could have a contour like a Pac man contour that looks like this, and we could go ahead and do an integral over that Pac man contour here, and again, we'll get a conditional expression like this as the result. I could perhaps switch that to traditional form here and get that result there. All right, so that's story about some calculus enhancements. Another place where we've made some enhancements in version 13.3 is a kind of a classic mathematical area, special functions, the general idea of special functions. And by special functions, I mean things like Bessel functions, Legendre functions, elliptic integrals, things like that. These are ways of kind of modularizing mathematical results. Once you know that some problem you're solving can be expressed in terms of a Matiou function or something, that immediately pulls in a bunch of mathematical results that kind of orbit around the idea of Matieu functions. So it's a very convenient thing to have this kind of closed form answer for some mathematical problem in terms of these special functions. Well, there are lots of classic special functions which we've had since version one of Wolfram language back 35 years ago. Things like Bessel functions, genre functions, elliptical integrals, things like that. All of those are instances of a certain class of special functions that are associated with univariate hypergeometric functions. But another frontier of special functions, sort of more general special functions, are ones that correspond to bivariate hypergeometric functions. Already in version four, in 1999, we introduced one example, a Pel F1. Well, in version 13.3, we finally finished doing the math and building the algorithms to go beyond the Appel F1 bivariate hypergeometric function. And we've now got big drum roll, AppelleF2, Appel F3 and Appell F4. Each one of these, again, is a packaging of all kinds of mathematical knowledge into the structure of the special function. Now, at some level, it isn't that exciting to see. There's a function here with an awful lot of arguments, and we can now evaluate it. We're asking here for 40 decimal places of precision. We could also go ahead and ask for something symbolic here, and we get a result, and we can even plot versions of this. And again, it's not going to look that inspiring, but this is a function that is packing in a lot of mathematical knowledge that can then be deployed and used, whether you're studying things about quantum gravity or whether you're studying things in fluid dynamics shows up in those places. So you can kind of see a little Bit more detail about what the story is and why this is complicated as you start making series expansions for the APEL F2 function. But ultimately, what really is this? Well, it's a function that solves a pair of partial differential equations, that is a sort of two variable generalization of the univariate hypergeometric ordinary differential equation. Well, the thing that makes sort of all of the introduction of these special functions really difficult, but very useful in Wolfram language is the fact that none. Not only is this a function that we can get a numerical value of, make a plot of, find a series expansion of, it's also a function that's knitted into the solution of differential equations, finding of integrals, all sorts of other places in the system. So it's something where you can really use this sort of modularization of mathematical knowledge represented by a pellet 2 as something throughout the Wolfram language. All right, so another thing in the world of special functions that we've introduced in 13.3 is sort of a piece of kind of finishing and progress in the area of integral transforms and Laplace transforms and so on. Well, one of the things we've tried to do over the years is to take sort of existing mathematical knowledge that's represented in handbooks of mathematics, tables of integrals, tables of sums, differential equations and so on, and make sure that the algorithms we have at least cover essentially everything that's in all those books. Well, a holdout to that process has been integral transforms for special functions, and we've certainly covered many of those in, in past versions, in past years. But now it's fair to say in version 13.3 that we sort of finished that process and we can do things like we can compute that inversely plus transform and so on. It's the most extensive handbook of Laplace transforms that's been published from 1973, is about 400 pages long. And a few years ago we could do a little bit more than half of the Laplace transforms in that book. But now in version 13.3, we can do 100% of the ones from that book that we can verify as correct. And yes, there are definitely some mistakes that we found in that book, but it's very satisfying to get sort of to the end of this journey of taking what was a kind of special case in books kind of piece of mathematical activity and be able to say, now we've got it all in computable form. You need an inverse Laplace transform or Laplace transform of a special function. If it can be done Then we can do it. Okay, so that's a little bit in the world of calculus and mathematical functions. Turn to another area of math. This is one that has actually been kind of on my to do list for a really long time. Ever since version one, 35 years ago, we've been able to do things like factoring polynomials, modulo primes, and. But there's sort of a generalization of that idea which is handling arbitrary finite fields. And over the years, all sorts of packages have been produced for dealing with finite fields with mathematic or morphem language. But in version 13.3, we've now sort of finished the job with a complete consistent coverage of all finite fields and the operations in them. So we actually now have a symbolic representation of a finite field. So this represents the finite field Z5 or GF5. And this is sort of the representation of the finite field with its. And we can now go and start looking at the particular elements of the finite field. In this particular case, there are five of them and they're indexed starting at zero here. These are the elements of that finite field. This is our representation for an element of a finite field. It's under the hood. This is a finite field element. We could just look at what that is. If we say that the input form of that, we'll see it's a bunch of finite field elements there. Okay, but now we can take those finite field elements and. Oops, what I wanted. We can take those finite field elements. Let's see if this works. Yes, here we go. We could take the two elements of that finite field, 3 and 4. This is, remember, mod 5. We could take those two elements, we just put them in there and add them up and there's the result. So I'm sure if I edit this to put, you know, a square in there, I'll just get results. So we can treat these elements of a finite field just like other kinds of number, like things in Wolfram language. It's all well and good to do this for a prime field like. Like GF5. Things are a bit more tricky when we're dealing with prime power fields. Like let's say GF2 cubed two to the three. This is our representation now of that finite field. Here it is. And now characteristic 2°3. And now we can start taking elements of that finite field and for example, dividing them, and we get a result in that finite field. If we. Again, if we say, what is that thing? We can ask for its input form. And it is an element of that Finite field. We go down here, we can kind of find out what the finite field is. That's kind of like an opener. Whenever you see that kind of finite field number, you can see what finite field it comes from by just opening that box there. So we can do things like we can compute the, we can say, Give me the. Okay, give me, give me something like the index in the finite field of element four. Needless to say, it's four. Or I could just make a whole multiplication table here with both plus and the times for elements in this finite field. And we see here the sort of rather trivial case of addition in that field and here the less trivial case of multiplication in that field. If we go to GF7 squared, so to speak, we compute the same thing. The, we get much more, much fancier looking and we, we kind of make an array plot with coloring the elements with gray levels. We get a slightly fancier looking plot. Well, we can compute all sorts of number theoretic features of elements of finite fields. Here's a the hundredth, the index 100 element of the field GF5 to the 10. And now we could compute something like the multiplicative order function for that particular element. There it is. And we could compute, for example, for that element, we could do something like compute its minimal polynomial. There's the result. And so we can do all these operations just on elements of finite fields. The place where it really starts to get interesting is in looking at polynomials over finite fields. So here's a Polynomial over field GF3 squared and there is the factoring of that polynomial. So this polynomial X to the fourth plus y to the fourth factors very differently over that extension field, over that finite field, assuming that the X and y are elements of that finite field than it does over the integers where it doesn't factor at all. So oh, by the way, just to show up here, if I say expand line 38, I'll get the finite field version of X to the fourth plus Y to the fourth, where the coefficients here are index one objects from those finite fields. We can. So if we, if we're dealing with sort of expansion over finite fields, here's something where we, we're specifying a polynomial whose coefficients are in finite field and we're taking that to the power 100 and we can now expand it out and we'll see all the coefficients showing up in that finite field. Okay, so we can now say, you know, check mark. We now have finite fields as a built in feature of Wolfram language knitted into all the other functionality of Wolfram language, actually, there'll be yet more coming with the knitting of finite fields into things like linear algebra and so on in upcoming versions. All right, let's change topics here. Next topic I want to talk about is computational geometry. And we've had serious computational geometry in Wolfram language for more than a decade. But every version, we build more and more computational geometry functionality. So for instance, we've had, for a decade, we've had the function region distance that computes the shortest distance between two objects. So from the points that are closest on this ball at the origin in the stochahedron, centered at the point 1, 2, 3, that's the distance, the sort of closest distance between those two objects, something that we now have in version version 13.3, is the furthest distance between these two objects. A bit harder to compute, but there's the result. So that's, that's the point of closest approach between these objects. That's the point that is gets furthest away on these two objects. And Hausdorff distance gives the largest of all shortest distances between points in two regions. And in fact, in this particular case, it can be computed in closed form. Let's see what that actual value is. Okay, it's intermediate between the, the two values we just got, but we were able to actually get an enclosed form in this case. Okay, so another pair of Functions in version 13.3 are circumscribed ball and inscribed ball. So this says, let's take this object here and let's render it with a circumscribed ball with opacity 0.2. So this is now computing a ball that kind of wraps around this object. The smallest ball that wraps around this object is now computed with circumscribed ball. Inscribed ball does the same thing for the largest object which can be inscribed within that object. Okay, so another thing that's new in version 13.3, it's actually the beginning of a longer journey, is abstract spherical geometry. One of the things we'll be talking about here is something we actually introduced in a large piece of in version 13.2. There's more. Here is astronomy functionality and the ability to deal with kind of sort of the astronomical generalization or perhaps inversion in some sense of the kinds of things that we've dealt with in GEO computation. In GEO computation, you're on the surface of a sphere. In astro computation, you're looking on the sort of inside of the celestial sphere. Well, spherical geometry is something that we're Adding as kind of a general abstract piece of functionality, more from language. So, for example, spherical distance will give us the. The distance symbolically between two points on a sphere specified by lat long. We can, of course, because this is Wolfram language, we can do this in any other dimensions. So here's the. The corresponding spherical distance for spheres embedded in four dimensional space, two points on. On that sphere. Okay, so other things that are new in computational geometry. Another one is we made a number of things, really number of core things in computational geometry dramatically faster, like often ten times or more. So here's an example where we can. We're computing the symmetric difference between those two regions. And that's not an easy operation. We can do that now. We can, for example, compute the area of that combined object. And now it comes right out. So we're really very state of the art here in terms of our ability to deal with regions that have even very complicated structure and boundaries and so on. Okay, so that's a little bit on computational geometry. Let's turn to another area. Talk about visualization. So visualization has been a core part of Wolfram language and Mathematica for 35 years. And we're always trying to kind of enhance our offerings in this area. In version 13.3, we've added the notion of live highlighting. So let me show you what that means. I make a plot here, same kind of plot we've been able to make for millions of years. But now if I move my mouse onto this plot, you will see live highlighting here. We'll see kind of this as I move around here. We'll see this annotation of the XY coordinates of each of these points. Well, we're supporting this kind of live highlighting on all sorts of plots and successive versions. We'll be seeing it showing up in more and more places around the system. Here it is in a list plot showing, allowing us to highlight any point here and get sort of this annotation to it. And we can do something like show the same kind of thing for dates. So let's compute the air temperature data for. Let's hope that this comes in. I don't know how many points there are here. Okay, finally waking up. Let's compute this for. I don't know where my computer thinks I am actually today, but anyway, there's some data and now I can move around here and I see the results with showing the date and the value. Okay, well, of course, because this is Wolfram language, this whole highlighting mechanism is extremely general. Let's start Looking at some of the kinds of things you can do with it. This is specifying the plot highlighting as an option here. And we can see this is now highlighting curves by making them thick and red. There are many different kinds of highlighting you can specify. There are ones that you can kind of just call up by name. This is X slice highlighting. So we're now finding for a given X value we're seeing highlighting of the, in this case, both curves at a particular X value. And in general there is an elaborate kind of set of specifications you can give for that highlighting. Here it is with a drop line and an X axis label and so on. So here there's the drop line you see in red dropping down to the axis, then it's labeled at the axis. And this gives the label style that gives what the color of the drop line should be. Okay, so plot highlighting, which has many different kinds of options, allows you to kind of specify global highlighting in a plot, but with the highlighted wrapper you can specify a particular aspect of a plot to highlight. So here we've got plotting X and minus X and then we've highlighted the curve x sin X using a ball as the highlighting mechanism. So this is showing that highlighting these, these two bounding curves in this case don't highl. Only this curve in the middle that we explicitly wrapped with a highlighted wrapper highlights here. So this is kind of interactive highlighting. But this mechanism for highlighting is something sometimes you also want to just burn in. And so you can do that too. You simply say here, highlighted. And then you just say, instead of saying one of these things that gives you dynamic highlighting, you just say place the highlight. And so there's kind of the results placed at these X axis label points sort of burnt in rather than dynamic. So there are all sorts of different effects one can use in graphics. One of the ones that's convenient to actually use alongside highlighting is something new in version 13.3, which is the notion of haloing. So here, let's specify this with a haloing of red. And so what this is going to do is it's going to show us this curve haloed with red. So it's got kind of red wrapping around the curve. Okay. It's also interesting to combine haloing. Here's an example of combining haloing with interactive, interactive highlighting. So here we've got every single point is haloed in a different randomly selected color here. And you can make very nice looking plots using haloing. So here's an example in geographics where we're specifying and there are many options to haloing. Here we're specifying kind of an inner and outer haloing color. And now it might take a little while to download the geographic data for this, but we're going to be giving the polygon of France very nicely haloed with these particular colors. And this is specifying kind of how far inside the, inside the region we want to insert haloing. Okay, so that's a, a nice, a nice capability. The, the next, next thing to show is something, let's see, how am I going to show this? I'm just realizing it's not so easy to show. The next thing I want to talk about is another visualization capability which is augmented in virtual reality. So this is sort of a thing that is. Well, we first supported virtual reality back in the early 1990s when it didn't quite take off. But it seems like it's coming back and we want to support and help enhance the experience for virtual reality and augmented reality going forward. So we have a new function in version 13.3, which is arpublish. So let me just show you what Arpublish does. So we take a piece of geometry, there's a little piece of geometry there, and we say arpublish. And this will now take that geometry and it will represent it in an AR format, typically a USD format. And it will now give us a cloud object with a barcode which you can probably. Oh, look, it even has a cute little kind of image of the image inside the barcode. Okay, so if you take that barcode and you Point A, an iOS or Android phone at it, you will be able to see that you actually get a kind of a real time image of that. This is a kind of a version that I did before where I was just looking through my phone, so to speak, at the AR version of that object. And I was sort of having it place itself on a book. Happens to be a book that has a picture of that object in the book. But so this is something you should be able to do just right now with your phone just pointing it at that QR code there. And what's going on under the hood? Well, what's going on under the hood is we're using our cloud as the cloud object wrapper kind of indicates we're creating the appropriate geometry specification, we're putting it into the cloud and we're setting it up. It's a little bit of slightly fancy footwork because it has to give a different format in a different way depending on whether the thing that is using it is an iOS device or an Android device. But when you go retrieve that object from the cloud with the appropriate device, it will work with either of those devices. It will download the relevant geometry and let that device implement kind of AR capabilities. So this is something that makes ar, I think, very accessible to people with Wolfram language. Now, I have to say that right now there are limitations in the AR Kit technology and so on, which mean that something like this certainly has an appropriately small number of polygons. If you go to things with really huge polygon counts, it will get very slow and your poor phone will potentially grind to a halt. But I'm sure that that will steadily improve. What we've provided here is kind of the raw material to deploy all these kinds of things to mobile devices. Okay, well, sort of AR is a new kind of leading edge kind of capability. One of the things that's a continuing story in Wolfram language is just getting the details of everything right. So I'll give you a few examples of things that we've done in version 13.3 in the category of sort of getting the details right. So here's an example of some random numbers with errors. These are kind of numbers with, with uncertainties. We think about this as kind of being like a. These. We're thinking about sort of calculus of errors and so on, and where we know how to combine these numbers, how to compute things with these numbers. You know, we can take those numbers, we can square them, and all of the errors will just map appropriately and so on. Well, the, one of the things that's kind of tricky is if we take that original list and we say sort that list, there's kind of a question of how do you sort numbers with uncertainty? Because there's a central value and then there's uncertainty around that central value. And well, if we just take this particular thing and we plot the sorted version of the list, we'll see that the way we're sorting is just by, in terms of the central value. But that doesn't mean that these numbers don't overlap. This number here, we're saying it's sorted after this number here. And yes, its central value is bigger than that number here, but this number here kind of spans the, the values here. I must say, I think in a, in a future version we should probably be, be showing the, the highlighting with plus minus values as well. Right now we're just showing the central value there. Okay, let's talk about something subtle. Ask the question. Is 3 plus or minus 0.4 greater than 2 plus or minus 0.3? Well, probably we'd reasonably say it is because, you know, 3 plus or minus 0.4 is pretty far away from 2 plus or minus 0.3 within the bounds of this kind of. If we think of it as sort of a Gaussian error kind of thing, it's kind of in the tail. The to say that this was the other way round. But we have to kind of make all this consistent. And if we have something like this three plus or minus 0.8, is that really greater than two plus or minus 0.7? Not really. We can't really say that because three plus or minus 0.8 deeply extends into the region of two plus or minus 0.7. So that's an example of something that took us a bunch of effort to figure out. And we now have sort of a consistent calculus for dealing with inequalities associated with numbers with uncertainty. It's a detail, but it's a detail that you probably won't even notice it's there and. Right. But someday you'll be doing a computation and it'll be like it just worked. And when you sort of unpack it, you realize it only worked because we got right all these details about the uncertainty and so on. Okay. Another thing added in version 13:3 is kind of a generalization of this thing duration. So we can take duration and we can ask for the duration of all kinds of objects, whether it's the 100 Years War, which lasted about 100 years, or the Jurassic Period, which lasted about 60 million years. It looks like. The, you know, we've put a lot of effort into dates and times over the years. They're very complicated, very subtle. The, we introduced a few years ago the notion of date granularity, kind of the analog of precision for dates. But it kind of comes in lumps like day, week, month, and so on. Well, we've, we've now sort of added date granularity to kind of all the built in date related functions, including things like from Unix, time and so on in the system. Another thing that's important for our work in astronomy is the ability to deal with years that are specified in sort of decimal form. So this is now asking away. It has to download the ephemeris for Mars to be able to actually compute in the orbit of Mars where Mars will be at this particular decimally computed year. And part of the reason that's good to be able to handle sort of decimally specified years is that now we can just say, oops, what on earth happened there? We can just ask to plot, oh my God, what did happen there? Very odd. We can just ask to make a plot of these, of this. Let's see. I think I had a version of this plot. Maybe something went wrong with the way this is moved in here. Let's try it again. So that fails again. Oh dear. Something went wrong. Well, anyway, but the point is to be able to make a plot as a function of year where year is just a real number. Okay, so computations in, in astronomy, more and more kinds of things that we can do. We can find the sunrise for Olympus Mons on Mars. And that's of course, a complicated story where there's all kinds of issues about exactly what time is that? Because, you know, the light travel time from Mars is, you know, whatever it is, 20 minutes or something, depending on how far away Mars is from, from Earth. So you kind of have to take that into account and say exactly what kind of time you're, you're saying. And we can, we can get all of that stuff right now. We can, we can compute the position, the position of the sun at sunrise on Earth. In this case, notice altitude minus 15 minutes of arc. That's because there's a non zero size to the disk of the sun. And that is specifying how that works, that it is the little piece of the sun has risen even when the center of the sun is 15 minutes of arc below the horizon. Okay, let's, let's switch to some completely different things. We talked a little bit here about sort of the careful smoothing out of things like inequalities for uncertainty, things like specification of dates and so on. Let's talk about a different kind of smoothing out of things, which is user interface and the smoothing out of things like typing Wolfram language input. So we've had all kinds of sort of affordances for Wolfram language. Like if I type a dash greater than it'll turn into an arrow, or if I type a double bracket, it'll turn into a kind of ligatured double bracket symbol and so on. And we've kind of always wanted it to be the case that when you type things, they are, they're easy to type. So if I type something like pl, it'll autocomplete to plot there. Now there's a new thing. If I type, for example, lp, it'll now autocomplete to list plot. In other words, it can do autocompletion that isn't just pure adding letters to the end of what you already typed here. It's noticing that LP is something that appears in the fairly common function listplot. And so it's showing listplot as an autocompletion for lp. And I guess from. It's interesting from a design point of view that this new form of autocompletion, this kind of fuzzy autocompletion, further removes kind of the premium on short function names and makes it so that it's perfectly possible to use a longer function name, which is very useful when it comes to reading code you've written afterwards because the longer function name can really say what it's doing. An example, something like resource function that one might use for, to specify something from the function repository, you now just have to type RF and you'll get resource function and you kind of keep typing or whatever. You, you can kind of go to the resource, the function repository and go and get your resource function or whatever else. But this is, it's a convenience for typing. There's a lot of things where when we design Wolfram language, as soon as we get it right, nobody notices we did something really clever to get something right. Whenever we get something wrong, it's kind of like it abrades. It's kind of a frustrating thing. But sometimes there's just there are two paths and you've got to go down one path or the other. And whichever path you go down, there will be some things that are kind of awkward that you might have preferred you went down the other path. And one of the places where that happens is in precedences for functions. You know, if I type A plus B, I can type A nice times sign C. We know that following the sort of standard mathematical rules of precedence, that means A plus B times C. Okay, but there are, there are precedences that are obvious and there are precedences that are not so obvious. So if I type A arrow B ampersand, it'll be very nicely, I can multi click to see where the precedence goes. That'll very nicely make that the rule arob. That whole thing is a pure function. That's great for many purposes, many reasons to want to take a rule like thing. You know, I can say hash goes to hash plus one. That's a nice pure function. It's all good except when you have something like, you know, if I'm saying plot, you know, sine x x 0 10, color function arrow, You know, hue of hash comma 0.5, 0.6, whatever, ampersand. Okay, so what just happened? If you were watching carefully, you will have seen when I typed that ampersand, it flashed that whole. That whole option because it's telling us, oops, that whole thing is included in the pure function we're creating. So if you only want that to be color function, arrow, the pure function, you've got to put parentheses around here. So the, the thing that's new and different is that when you type the ampersand, it now, oh, now it's showing you the extent and it's being delimited by the parenthesis, which is all good, but if I hadn't had the parenthesis gone all the way back to sort of COVID the whole option. And this is now a convenient way of seeing that without kind of getting in the way of what you're typing. And really these very subtle cues are something. We're progressively adding more and more of these subtle cues to show kind of to help people type the right thing, so to speak. We'll be Talking later about LLMs and their role in typing the right thing, which is in a sense much grander. But these kinds of very definite sort of affordances are very convenient in helping to type code. Okay, so when it comes to constructing your own user interfaces, we've always had, We've had, for. For a couple of decades now, we've had a variety of. I can't believe that arrows don't place. But anyway, we've had a variety of. Of symbolic ways to represent user interface elements, whether, you know, it's something like slider or whatever else. And these are all connected through the dynamic mechanism, the. So that we're able to kind of get the state of these things elsewhere in a piece of code. This is now for the action menu mechanism. One of the things that's been long requested is hierarchical action menus. Well, in version 13.3 we now have that. OK, what other things? Well, another feature in version 13.3 is in the package editor, useful for editing Wolfram language packages. This is what it looks like. And in the package editor it's now, It's now you'll see this thing that says go to. If I had a long complicated function here, goto would allow me to just go to the appropriate. Sorry. If I had a long complicated package here, goto would allow me to go to a particular function definition in that package and be able to sort of see all of the definitions associated with that function and so on. There's an example here that can show of this. Of this in action. This should be. There we go. This is operating against our gitlink the source code of our Gitlink system. Okay, talking of code, one of the things that is really a big feature of Wolfram language, one of the sort of defining features of Wolfram language is the language. It's a computational language. It's a language that is trying to give one a computational formalization of the world. I kind of view it as being sort of the next step in a very grand tradition that kind of starts with human language as a way of kind of giving words and names for things and then logic, being able to sort of make other kinds of abstractions of what one's saying, and mathematics making another kind of abstraction, kind of the idea of computation. And specifically our computational language is a way of having kind of a notation for another kind of sort of computational formalization of things. And. Well, that's great. One feature of that is the language is something not only intended for computers to consume and execute, but also intended for humans to not only write, but also read and be able to think in terms of. And so when we see Wolfram language in documents, it can be part. It's kind of the computational essay idea. The Wolfram language can be part of carrying the narrative. And one of the things that's good about carrying the narrative is it's something where we want the language to be elegant and easy to read. So for example, in my. In. In. In a typical kind of see. In kind of a. In a typical see. What is this? It's not really what I wanted here. Okay. In sort of a typical. Notebook, we might have something where we say something like. We say something like this and there we have a nice thing with a bunch of names that we can easily read. List, line, plot of table, string, length, the Roman numeral. We kind of might read that and think we know what it is. Ok, but what if we want to make this look more elegant? Well, we have this thing we call the Elegant Code Project. And the goal of that is to have sort of experiment with new renderings for code. So if I go here and I open a notebook, I can say, actually I can, I can just. Let me, let me open. Actually, I could probably just go and do that for this notebook here, couldn't I? I could just say style sheet and. Where is it? Screen style environment. Thank you. Okay, I can set this to be Elegant Code. So was a small change here, but if I flip back, let me flip back to the previous version, The working environment. There it is. It's a little bit kind of computeristic. The idea here in the Elegant Style environment. Is that it just looks a little bit more elegant. And I'm kind of getting used to seeing things in this form and I like it. Something which kind of emphasizes the word aspect of the language and de emphasizes kind of these more sort of pure infrastructure aspects of the language. And if you try more complicated pieces of code, you'll see let's try something like this. That's again, it's a bit easier to read this than if I flip this back. Let's pick up another piece of code as well. I need to make this window narrower so we can see more of that and. This window a bit narrower so we can see this wrap a bit more. And the idea is that this is sort of a little bit easier to read with the sort of the emphasis of the true content as opposed to the sort of infrastructure. Again, if I flip back to the working style environment, it's a little bit more difficult, I think, to see what's going on here. It's a little bit more difficult to pick out the meat from kind of just the bun or something. So let me go back here to elegant style environment. Here it is. Oh, another important point is that in the elegant style environment, it's almost something one doesn't notice. But the font here is no longer a monospaced font. Sometimes for kind of large scale programming, one feels one needs a monospaced font. Certainly if one's going to make one's own kind of indents and so on, it's useful to have that. But with the automatic formatting of Wolfram language and Wolfram notebooks, you just see things more elegantly. The words are sort of more compact and more readable in this proportionally spaced font. Well, okay, let's keep going here. Other things that are sort of features of making things elegant. This is the iconization mechanism that we've had for many years. Where that list is, it's as if you had that whole list there. But in fact it is iconized so that you don't see all the detail if you don't want to. So iconize is a way of hiding details and so on. What about when you want to emphasize details? Well, we've got a variety of mechanisms for that. Things like framed and highlighted and styled and so on. In version 13.3, we've added a new one of those which is squiggled, which is kind of the type of thing that you see in spell checking and so on. One feature of these is that if I just evaluate this, I'll see this is this. These are things that survive evaluation. But there's a mechanism which is to use the strip on input option for things like framed and highlighted that. What is this doing? Oh, I see that. What I. What I need to do here is take this and use it as input and then it strips those things on input. So this is a way to insert in your code a thing where you can see it in the code with all kinds of highlighting and so on. But if you actually use that code, it doesn't get passed into the innards of the kernel. It's something that's stripped on input. Okay. Another topic, documentation is something we put a lot of effort into. Hundreds of thousands of pages. It's a thing that is a big emphasis in Wolfram language. And we can kind of see the. The plot, the number of words that have appeared in documentation over successive versions here. A little surprised. Why doesn't this go back further than this? I'm a little confused by that Would have expected this would go go much further back, but perhaps not. Perhaps this is when we first had online documentation, I think. So you can see progressive increase by large factor in the end in documentation. When we have lots of documentation, it's important to be able to find things. And one feature there is kind of. See also. So in. In the version one book where all the documentation for all these functions that we now know and which have remained compatible over these last 35 years, we see in the version one book we see sort of the precursor of a lot of our documentation in these kind of reference manual reference guide entries. One feature of those reference guide entries is See also integer, q etc. And so over the years we've got a very elaborate See also graph. This is. This is the See also network here that exists in our documentation. But in version 13.3, we've added kind of another level of documentation which is we're doing C also not only for. Not only for. Functions pointing to other functions, but also functions pointing to other kinds of capabilities. Like for example, if we look at graph, we'll find that make this a little bigger. At the bottom of the page here we will see not only pointers to other functions, but also pointer to entity types, interpreter types, formats and so on. Now we're progressively also adding pointers to Wolfram function repository entries where there are functions which are still less kind of less robust and permanent than the functions that exist in the core Wolfram language itself. But nevertheless they're often things which are useful to use in a specific case. And the way the function Repository works, you can always kind of burn in. I want that function working in that way. And that will be something that continues into the future of the language, whatever else happens. Well, another thing that is kind of a detailed feature of documentation, but very useful is if I look at documentation of something like plot, I look at its. Look here, I'll see a bunch of options to plot which are essentially the same as graphics, but with, as it says, the following additions and changes. And so one of the things we now have is down at the bottom here we have this list of all options which we can now open up to to show. The. Let's see, I wonder which one's here. I have to go look for one that is a non standard option. Okay, Mesh is a non standard option. I'm a little bit confused here. Why. Oh, this is highlight. That's right. That's what I'm doing. If I press that little button, it's not so obvious it's a button. It probably should have a little button border around it. And. The. This is now showing in this list of all options, which options are special to plot and not already present in the underlying options for graphics. Okay, well, let's keep going here. We're going to go on to some rather different topics now. Let's go on to a little piece of kind of modern AI technology. This is something new in version 13.3, image synthesize. This is now going to an external API. There will be a variety of methods available for image synthesize. There's just one of them that I just had set by default here. There's a cat in a party hat or a cat and a hat rather. And we can go in and say, you know, whatever we want. This is now. These are now images which are in the Wolfram language and we can go do whatever we want with them. So, you know, we can do things. Here's kind of a cute example where we use image synthesizer as part of a workflow. You know, image synthesizer is good for kind of adding accent types of images to material. Like if you're writing something and you want to kind of illustrate it a bit, a convenient thing to do is then is to use image synthesize to generate images related to what you had written. So here we've taken a. A randomly chosen. Well, those are funny things. We took a randomly chosen text sentence from the text of Alice in Wonderland. After a few minutes, she heard a voice outside and stopped to listen. Okay, I don't know whether I'm not totally convinced by any of those pictures. But that's kind of an AI trying to show us these things. And we could have told it, you know, do this as a cartoon or something like that. Okay, well, I'm going to show later here. I'm going to show LLM Synthesize, which is a something that synthesizes text. But it's kind of fun to take that synthesis of text in a sentence. Describe a fantasy planet. Okay, describe the planet. Let's see how we can illustrate the planet. Mythical creatures roam amidst floating islands. Let's find out what kind of mythical creatures show up here. Let's see. Okay, I don't know how mythical any of those creatures are. Let's see. That one looks kind of fun. All right. Amidst floating islands and vibrant forests. I'm not sure how. Well, let's see. Maybe that one has some forests in it. But anyway, we were able to sort of get an AI to synthesize text, which we could then illustrate with an AI here. This is set up to be able to synthesize images of different sizes. So we can do something like this. And this will now generate a higher resolution image. Okay. There's a very large image which has many pixels. It's a little bit of a strange cat there. Kind of cool, though. Now we could image process this and we could say, for example, remove background of that. And let's see how it did. Well, did something about removing the background. We should have probably given it some more options to be able to do better removing the background. But now we could say something like image synthesize with that. Let's say, for example, in a box, this thing here. So this is now taking kind of multimodal input of some text, an image. And it should be synthesizing now a modified version of that image. We'll see how it does. It may help me not produce anything sensible. That's the danger with AIs. Not much box there. Nope, very little box. We'd probably have to try some more images to get to do better there. All right. From AI to something, in a sense more traditional and engineering wise, this is about fitting system models to data. So you have a model for system. It might be a car with its suspension. It might be some other kind of model that maybe includes many different components. Our system modeler product is good for kind of authoring those sorts of complex systems with, you know, tens of thousands of components and so on, interacting whether they're electrical, mechanical, hydraulic, whatever else within Wolfram language. We can take models created by System Modeler and do Simulations compute with them and so on. But there's kind of an interesting issue which is once you have a model that has parameters in it and you, but you then know what you actually observe in the real world in a system that is supposed to be modeled by that model, how do you fill in the values of those parameters? So let's take a very simple example. We can say, take a system model that is just a, an ordinary differential equation. So here we're loading up, we're starting up the whole system modeler capability stack. And in this particular case we can. The way it loads examples when I'm doing this kind of thing, very odd. Okay, so there's our system model. And now this particular equation is simple enough that we could just outright solve it with desolve. But let's say that we've gotten some data and that data looks like, say it's a, it's data that corresponds to that solution in some way. Oh my gosh, I didn't. Okay, we could, we could for example, plot that data here. And now we say, let's say we're going to use this data to determine the parameter A in that we should use in that equation. Okay, so what we want to do is to use this function that's called system model calibrate. System model calibrate tries to calibrate a model that is fix its parameters from data that's been specified and actually system model calibration. Look at that, it's got an image here that reminds us very greatly of the kind of thing we see in machine learning. And this is no surprise because the technology is very similar. This is trying to minimize a loss function that to represent, to fit that particular parameter in this model. So we can look here. What is the parameter value? The way we set it up, this data was generated with parameter value 2. And this should show us that the parameter that was deduced by fitting the model, so to speak, this dynamic system model to the data was indeed very close to 2. And for example, we could go ahead and compare the system model to the. And actually simulate that system model. We're here using very heavyweight sort of simulation that would work for tens of thousands of components as well. But there's just one little tiny ode we use that to, to compute values here. Okay, let's take a look at something a bit more realistic. Let's take a model that comes from our documentation examples. Let's take. And this is actually a, I think if we just say system model of this, That's a little electric motor there you can see its components maybe. There we go. So that's an electric motor with a few components, each represented by an equation. Okay, well now let's try to make a model in which we calibrate this model. And. Let's see, we're going to calibrate the model. Oh yeah. From data that we put in this little iconized piece here. So there's a loss function. The loss function is hopefully going to go down. We're now trying to find the values of these resistor and spring damper elements from the. By, by minimizing loss here to appropriately calibrate the model. I don't know why it's going on so long. Let me stop it here. Okay, there we go. So there's a calibrated system model. And for example, if we say what are the actual parameter values in that calibrated system model, it's going to tell us the value of the resistance on the damper. And now but we could actually take that model and make a prediction bands plot from that model. And this shows us for the parameter inertia, it shows us the actual way in which this model successfully predicts the data that we observed that we actually had hidden inside this iconized object here. So this is the system model. Calibrate is very useful for fitting models to real world data. It's also useful for doing something which has become popular in machine learning as well, which is to fit a model to a model and for example, to take a more complicated model and fit a simpler model to it, to sort of distill that more complicated model down to something that's easier to compute with. Okay, so that was, that was another thing added in 13.3 system model calibrate. Let's talk about a different area. We're now going to get a little bit more into, for a little bit into software engineering. One of the things that we've added is a new version of our testing framework. So the idea is you can specify a symbolic test, there's a test object, and we can say there's a test that says test whether two plus two is equal to four. Okay, we can now say evaluate that test. Okay, great. That test passed, was successful. And each, any test object has all kinds of properties here about when it was evaluated and what was going on and so on. But this is useful for sort of specifying a bunch of sort of symbolic tests. So here are a bunch of symbolic tests that I equals I and J equals I plus 1. Test I plus 1 is equal to j here it is. Those are some tests. Now, we can generate a test report by running those tests, and we'll find out that, yes, all those tests actually run successfully, success rate 100% and so on. But the point is that by having these kind of symbolic tests, you can manipulate the symbolic tests and do things with them. And then only after you've sort of constructed your whole symbolic test suite do you go through and actually generate a test report and evaluate the tests. So here, for example, is a test report generated from a single test object where we have a handler function that says whenever you evaluate a test, echo what happened. So that's a convenient thing if you want to see the tests that are going on while you're running. In this particular case, again, the test succeeded. So the test report Object showed test count one success rate 100%. So this is a whole mechanism for being able to add kind of purely symbolically specified tests. You can create symbolically test suites and then explicitly run them against code that you have in Wolfram language. All right, that was about testing code, testing computers. Let's talk about another kind of testing, which is testing humans. So one of the things that we added in version 13.2 and also 13.1 is a whole mechanism for assessment functions for being able to give tests for humans and being able to kind of grade the test. Well, one of the things that's tricky about grading a test is, all right, you're computing something like this derivative, okay? It doesn't really matter whether you, you know, you'd still say it's the right answer even if the person wrote 3x squared plus 2x or even if they wrote this in factored form still be the right answer. But if you're specifically doing a factoring problem, it really isn't good enough to just say the answer is 2x plus 3x squared. The factoring. For the factoring problem, you want to be able to say the answer is only right if this algebraically equivalent form is given, that is the factored form of the expression. So algebraic equivalence kind of is no longer sufficient to say you got the right answer. In this simplified case, the real question is sort of what level of math are you assuming is kind of comes for free? And what level of math is part of what the human is supposed to be paying attention to? Okay, how do we deal with this? Well, we've introduced a new idea in assessment function. Assessment function has many different forms of assessment that it can do. This is an example with calculus result where this says, what's going on? There, that's something weird. The. Wow. Okay, it's. This. Okay, so, so this now is saying in a calculus homework, it's equivalent to, say 2x plus 3x squared is equivalent to x times 2 plus 3x. But if instead you want a polynomial result, then it's no longer true that those expressions should be treated as equal. Okay, well, you can go to even more elementary math. You can say, let's look at arithmetic. Is. Is 4 over 6 equivalent to 2 over 3? Well, not if you want an arithmetic result. So you can use this to build a whole question object. There's a question object that says what is 4 over 6 in lowest terms? Okay, I type here 2 over 3 and I say submit that. And it should say, yes, it's correct here. So this is, this is how it's very clean and nice. You can build these whole kind of questions, this whole kind of whole quiz, symbolically using Wolfram language in this kind of way. And we introduced all kinds of mechanisms for deploying that quiz in the cloud or locally in notebooks or whatever else. All right, talking of deployment, let's move on to a different topic. Let's talk about parallel computation. That's something that we've been able to do in Wolfram language for a long time and with parallel map and so on. I myself have a pretty elaborate setup. And if I do parallel this, I may regret this, but I might try this, let's say parallel evaluate dollar process id. So this is probably going to start up my awesome language on a bunch of different machines here. 44 cores so far and. Okay, it's still starting up my machines. What we're, what we've added is more sophisticated ways of managing kind of kernels and kernel objects. So let's take a look here. I wonder if we can get, probably get a kernel object. Oh boy. We're finally going to evaluate all of these and it's going to produce totally uninteresting results. Just a bunch of IDs here. OK, amazing. All right, well, this is a kernel object. That's a thing that represents one of these processes. See, I think if I say kernels, I will get a bunch of kernel objects so many that they take forever. There we go. There are a bunch of kernel objects running on my machines. These are sort of live kernel objects. And I could take one of those kernel objects and I could say, take, I'm going to delete these for various reasons, but I could take that kernel object and I could say, take this and give me information about that kernel Object. And now I should get kind of a bunch of data about this particular. What happens here? I don't know what happens here. That should have given us information. Oh, oh, I know what's wrong. It gives information about a kernel configuration, which is yet a different thing. This is a. Okay, I should have said. I should have defined a kernel configuration here. That is a collection of kernel objects. And then I could have got a information about the kernel configuration. Now there's also a GUI for setting up kernel configuration. So if I go to the desktop settings, I should find here a kernels tab. And that kernels tab now has the various kernel configurations that the. Let's see, where did I have this. Yes, kernel configurations in the kernel settings here. This is showing all the kernel configurations that I have set up here. Ok, so that's kind of a kernel configuration editor. Now I can take a kernel configuration and I could for example, say remote evaluate against that kernel configuration. Or I could say, let's see what this gives dollar default parallel kernels. I think that will give various kernel configuration objects. OK, so this is kernel configuration local 2. And now I could say, actually, let me do it on Threadripper 2 here. So nice machine of mine. Let's say remote evaluate dollar machine name on that kernel configuration and that will now compute that. That thing on that particular kernel configuration. I can and I can go and basically treat kernel configurations as symbolic objects that I can then do computations with respect to. So it's kind of like that's a whole machine, a whole configuration of kernels. That is a place I can compute against. Just like I could say, oh, I've got this particular set of variables I've set up or a particular module. Now I've got a whole machine here that I'm computing against. And there are various features like. Like one that's kind of convenient is there are new kinds of parallel evaluates, like evaluate the machine name with one kernel per machine or evaluate, let's say could do this and that's. That's convenient if you want to do initialization on a machine. Like you want to set up files on a machine. You can do that and not have the. And. And sort of not be overdoing it by having one setup of that file for every core on the machine. Only one setup of the file for every machine. All right, diving deeper into kind of the. The. Enter this world we can let's. Let's dive deeper into sort of the software engineering of things. This is about calling C functions. So one of the things that we've done is to make it even easier to call external C code from Wolfram language. So let's say you've got some big external library that was written maybe years ago, maybe recently in C, or actually in any C compatible library format, which includes many, many compiled languages. There's now a very easy way to make a foreign function interface, an FFI that calls any function in that library directly from within C. So let's say you've got a C function. Let's take this very simple C function, that's a very simple piece of C code there. And now let's say we've got that function, and now we want to do this. That's the addone function in this compiler. So we've got this function in this library called compiler demobase, the function add1 and this is its signature in terms of types. It takes a single cint as input int x and it returns a cint as output. So this will now load that foreign function. So now there's a representation of that foreign function as a symbolic representation in Wolfram language. And now I can just take this function FF that I've defined this way and can just call it just like I would call any other Wolfram language function. And now what that's doing is it's running the C code that came from this compiler demo base compiled library. It's accessing the add1 function in that C code and returning the result. Now, of course, if your C code has a bug and it crashes, well, then game over. It's going to crash the kernel of Orphan language as well. But if you have a nicely developed library that behaves well, you can absolutely just call it directly from within Wolfram language. In this way, it's a very clean way to access external C compatible libraries. Now, in practice, things are often more complicated than this kind of simple case where we're just taking a single integer as input, returning an integer. Often there's kind of lumps of memory where you're defining things that kind of lie around and have to be managed and so on. So let's take as an example the OpenSSL library, and let's take a particular function in the open SSL library. Let's take the function RAND Bytes, notice it has an unsigned char star, which is a lump of memory basically, that has to get allocated somewhere and has to get freed somewhere. So how does that work in Wolfram language? Well, it's pretty cool. Here's the open SSL library being referenced here. This is the RAND Bytes function. This is now a raw pointer with a type specifier. That's a cunsaw. This is cunsigned char, raw pointer, type specifier. That's that first argument. That's the kind of translation into Wolfram language of that C declaration. Now we can just evaluate that. There we have it. Type specifier, raw pointer, c unsigned char and so on. And that's all good. That's the specification of that function. But this, to use the function, we have to have actual memory allocated for that buffer. And so now this is kind of like we're descending into the. Kind of into the steam tunnels or something. This is, this is an actual raw memory allocation. So this says allocate this piece of raw memory for a C char 10 of them. This is now a raw pointer at this actual position, that actual hex position in memory on my computer. So now we can call this function RB the RAND bytes function and we can tell it load up that buffer. I mean, if I, if I wanted to. Let me just do this. If I want to live dangerously. Let me, let me see what happens if I do this. If I say raw memory, import that buffer, it's full of garbage. Who knows what that is? That was some piece of detritus left over by something that, that I did on my computer. And now I can. But I. If now I say RB of buf comma 10, then I have run ran bytes. It returned a 1, some kind of status code. And now I can go ahead and evaluate RAW memory input on that and I will get. It's not very useful here because I'm seeing random bytes here, so I can't really quite tell if they're right. I have a certain urge to try and do something here which may be absolutely disastrous and insane, but let's just try it. Let's allocate a buffer, a thousand length thousand buffer, and let's just go ahead and import from that length thousand buffer, see what happens here. Okay, that's funky. I don't know why there are. There are sort of bytes at the beginning but no bytes later. Don't know quite why that is for a, For a randomly allocated piece of memory that didn't yet have anything put in it. Well, anyway, we can kind of do. Back in long ago, languages like BASIC had functions like peek and poke. This is the peak like function that I just did for RAW memory import. And we can also poke at memory. Okay, well, we can write into a buffer by using RAW memory export. Okay. Notice that this has a wrapper. It says managed object. So what that means is that. We are setting things up so that Wolfram language manages that allocated memory. So if it no longer is using that allocated memory, it will get deallocated. If you really want to go super low level, you can call unmanageobject and which kind of disconnects the automatic memory management. If you do that, you have to explicitly use raw memory free, which is a super dangerous operation. But use it if you. If you want to. Now. If you. But. But normally you can have this managed object which keeps track of whether the memory that it is referencing is actually being used from Orphan language or not. So these things that return to top level and were bound to outlines are being used. So they will be kept around in the session and not freed. But if they were being used internal to a function, they might very well be freed because nothing refers to them anymore. All right, One of the things in C like languages is the notion of a function pointer. And normally a function pointer in a C program will be pointing to something like a C function. But we're living in a Wolfram language world and we want. We now in version 13.3 we can have something else be possible which is from within a C function, you can have a function pointer that points to a Wolfram language function. So little bit elaborate how this works, but let me try and show it to you. So imagine we have this C program, okay? It's just making a loop. It's calling this function. Fun. But it's calling this function, which is declared as a function pointer. Here I kind of am making a little bit the assumption that people know how to read C code. And I don't think people who are long time Wolfram language users will probably never have needed to see this before, but. Okay, this is, this is now. Okay, I'm. I'm. It's so confusing for me. This looks like C because it says create library. This is going to actually run a. What am I doing here? Oh my gosh, I've totally confused myself. Okay, here we go. This is an actual piece of Orphan language code. And here we're going to create a library that is a dylib, a library that we can call from, That we can actually load in as a foreign function. So we can make a foreign function load. What is this? This is not what I want. That is not what I want. We can make a foreign function load of an opaque raw pointer. We're not saying what this pointer is of this function. F run here. Okay, so take this function and now foreign function Load it through the ffi. And now we can do something here. We can say create foreign callback. What's this doing? This is taking a callback function. This is creating a callback function. It's a FO C function that actually calls a piece of ortholanguage code, in this case just the function echo and it calls it by giving it a. It's going to take a single C integer as input, it's going to return a C integer and it's going to take that C integer and actually pass it through a foreign function callback to the Wolfram language, function echo, do the action in Wolfram language and then return a result back to the C code. Okay, so now that we've got that, our F run function here was supposed to take an opaque raw pointer. That was this function pointer here. We can now feed it this CB fun thing, which is a function pointer, that is a function pointer for a callback function. And now if we run it, it will go ahead and call back. As we run the C code for F run, it will call back into Wolfram language to execute the echo function. So it's a very flexible thing. This really allows one to fully interoperate with C like languages. So that's a, That's, that's a little bit on kind of interoperability with C. Now also in Wolfram language, we've been working for a number of years to make a really strong compiler that compiles symbolic Wolfram language code into llvm, load all of a virtual machine code so that it really runs at full sort of machine code speed. Okay, so one of the things that we are adding in version 13.3 is the function kernel evaluate. So this is a function that we're saying we want to compile. And the function says when you do compilation, you've got to give a bunch more detail. You've got to say things like this is a machine integer type, etc, etc, etc, and this is, oh, this thing, we're giving it a hint that says this is a machine integer that's coming back here. But this piece of code here, we're not asking the compiler to compile this. We're using essentially the mechanism I just showed you with callback functions to call back from the compiled code back into top level Wolfram language. So this is now a compiled function that takes the machine integer and returns two plus three times the string length of the Roman numeral. So in this case we are running let's, let's run that function with a Particular argument, if we run that function, we'll get something which will call back into top level code from the LLVM code which was created by the compiler. Again, a very flexible thing to be able to do. All right, so I more or less come to the end here. I mean there's a whole bunch of details of things we added in version 13.3 at sort of an algorithmic level. Things like making linear model fit and other statistics functions take all sorts of kinds of inputs in the same form that our machine learning functions take. Things like tour video now lets you make a video touring a piece of geographics. You know, byte array support, zero length byte arrays, all kinds of things, you know, barcode image support, some new kinds of barcodes, solid mechanics, PDE components support new hyper elasticity models and things like import of SVG to vector graphics and so on. Things in the data structure system like sorted key stores and cuckoo filters, things like this. And also sort of really raw algorithmic kinds of things like R solve, giving cleaner and smaller results for linear difference equations. All those kinds of things. All right, so that's a lot of kind of very strong sort of meat and potatoes. Wolfram language advances now. Something that's, that's kind of new and different in version 13.3 is built in support for LLM functionality. So there are really two branches of that to talk about. One is the built in support in, in what we call chat notebooks and the other is functions in the language that support LLMs. So maybe I'll show you, let me show you built in support and functions first. So the idea is that we have the notion of an LLM function. So for example, this is using an LLM function which says rewrite an active voice. And this thing has a string template inside it. And so it's, it takes anything that I gave as the second argument. So this is just an LLM function and it just sits there as an LLM function. But now I can take that LLM function and I can apply it to this argument. The mouse was chased by the cat and it now it is using an LLM to rewrite that as the cat chased the mouse. So we're really able to write essentially LLM prompts, turn them into things that can be integrated into Wolfram language and then use them as pieces of Wolfram language capability. So you know, you can be a little bit more elaborate. You can say things like 1 is to 2 as 3 is to blank. You can do this kind of like thing like that. We can give something like this where we programmatically say, give me a one sentence. Okay. If I, If I. Let me. Let me be really ambitious here and really, really tempt fate, let me say, make a table of. Of different math problems appropriate for grades one through five. So now it's going to. It's going to run the LLM five times. It'll generate. Hopefully it will succeed in generating. There we go. Okay. Three apples. Okay. It's very keen on Sally and apples. Actually, it's. It's been. I guess it has slightly different numbers. Well, some grades. It's keen on Sally with apples. I don't really know quite why we'd have to run it again with a different seed to get it to do a different thing here. Okay, so one of the things to realize is this LLM function is really working just like any other kind of function in Morphem language. And that's a very convenient thing. It's really just like a standard, pure function, a function function in Wolfram language. But now this is calling not the Wolfram language kernel, but instead it's calling an LLM to evaluate this function. Okay, so, for example, we can say, we can do something like this. I did that with a table just now. But we can say something like, give me opposites for all three of these things. Or we can do something that. Let's do this. Let's try this. We can say, you know, the cow jumped over the moon. And let's say, make the sentence funnier and nest that four times. So we're going to get four levels of. We get a sentence and we get another sentence which is supposed to be. Okay, the cow. Let's see. Let me just put these in a. In a column to make it a little easier to read. The cow jumped over the moon. The cow, wearing a jet pack, effortlessly soared over the moon, leaving the moon in awe of its bovine acrobatics. Okay, well, let's see what it got to. After a couple more iterations. The. The cow, sporting a ridiculously stylish jetpack, flawlessly moonwalked over the moon, leaving the moon in a state of complete shock and awe, wondering if it could. It should enroll in bovine br. Break dancing classes or just stick to being a celestial body with zero coordination. Curious. Well, anyway, that's its version of sort of use functional programming to call. To nestedly call this LLM function to make something funnier. There's useful things you can do here. Like, for example, this is as an example of, let's say. Okay, so these are. Is An LLM function where we are making a grid that converts I am. You see, he runs into a collection of different cases. Past, future, future, perfect, past, conditional. So that's something that you can use to. That's. It's again, these are linguistic transformations that you're doing here. Okay. Another kind of thing you can do which is rather useful is to say, you know, describe this piece of data. Okay. Range of 20. The data is a set of numbers, 1 through 20 inclusive. How about describe this piece of data, see what it says here. Okay. Data represents a sequence starting at 1, increasing by 1. After reaching 11, the sequence starts decreasing until it reaches 1 again. So, and then we can take the same thing and we can say, make a one sentence summary for a five year old of that. I don't know quite what it's going to do. Okay. I don't know whether that's really a five year old type thing. Another time I tried it, it said the numbers come up and down like a mountain, so to speak. We can also do things like say, you know, translate that into French. Again, we're using just this LLM function to do that. We can really compose those things together just like any other kind of function. We can just nest those functions. So we're saying describe the data, make a one sentence summary, translate it into French and see what we get out. Okay. Or we could say something like this. Let's say we make a collection of random words. We can now say, let's take, let's make a. Let's ask for an LLM function that asks for a sentence using all the words. And then we'll just give the words there and let's ask for that sentence. And who knows what this is going to produce. The lowland farmer greeted his neighbor with a warm hand clasp despite the indelicacy of his exacting work. Not bad. Okay. We can also do things like ask the LM function to compute things from things that aren't directly numerical data. So let's say give us a name for each of those colors. So it's doing that. And then we could ask instead, ask for the color of a typical. Those kinds of things. Ruby, emerald, bear, elephant, stop sign, etc. Okay, we get the result there. Now you might say, well, I don't want these words for the colors. I actually want the color itself. Well, it turns out LLM function has a second argument which says. Which is uses our whole natural language understanding system to convert the results from the LLM function to an actual piece of Wolfram language expression. In this case, a color expression. And so they're giving that result. Now we can use that in different places. So we can say, for example, just give us a city on the way between thing and thing. And now convert that into a wolfram language city. So now we can be a little bit more elaborate. We can say something like a semicolon separated list of cities on the way between. Oh, I don't know, let's say. Let's try. Let's be more ambitious. Let's try New York, Bogota, see what we get. This may be disastrous, but we'll try it anyway. Ah, well, that's what can happen. So it generated a bunch of cities, but one of those cities. Oh, oh, I said. I. I should have said more explicitly. I should have prompted it. Say only the name of the city. Let's try doing that. Give only the name of the city. Prompt 10. Let's prompt. Engineer this and let's see whether we can get it to not say if traveling by boat. Okay, that looks good. And now we could say for that, we could go ahead and say make a geolisplot. And we're now taking something which kind of came from the common sense of the LLM of what cities might be reasonable to go between here. I don't know why we went over here to. Where the heck did we go there? We went to the wrong Richmond. No, wait a minute. What's that? Oh, we went to Columbia, Missouri. Because the thing didn't tell us that. It would just said Columbia. It didn't say which Columbia. Okay, so again, we'd have to do a bit more prompt engineering to tell it to give us enough information to do the right thing. So, okay, more things we can do with LLM functions. We could say, for example, you know, what's typically bigger, an elephant or a turtle. Okay, we're making that into an LLM function which is a comparator. So now we can, for example, use the sort function. A worm, an elephant, an atom, the moon, what's typically bigger. Sort them in order using that comparison function. And I would say that was very unconvincing BZ to the LLM. Again, maybe we need a bit more prompt engineering on that. Well, let's see. I see a question on the live stream. Is this LLM an API call or is it running locally? At present, this is running. This is running through an API. We'll see what the future holds in that regard. But for a. An LLM with a lot of. With knowledge built into the LLM, that's. That's the way we're doing it right now. Okay, so we can do a lot of things with extracting sort of knowledge from text. So here's a. Is a piece of text. We can say here. We're doing a little bit of prompt engineering here to say, make the get quantity function. And we can say what's the length of a zeros in the X text? And it will give us a result as a Wolfram language quantity. Here's another piece of text, just a slightly more elaborate example here. This is text about the Olympic Games. And now we're asking it, based on this text, give a semicolon delimited list of years in which the Winter Olympics have been held, and hopefully we'll actually get those results. Okay, and now. Well, that's kind of funny. It's given 20, 26 for have been held. But so it goes. It's just no Alamo. Now we say give a list of cities that have hosted the Winter Olympics and they will get the result as Wolfram language entities that we can then compute from. Okay, well, Some things that are quite useful. We might have some sort of random piece of text that is kind of, you know, where it's pretty obvious how to convert it to orphan language. Ah, well, not in that case. Huh? The. Oh, it was restricted. Because we're worrying about. Yeah, that's an interesting case. We're worrying about the fact that this is actually reading. It's getting the LLM to write an expression that will be executed on my local machine. And it's doing some sandboxing here because we probably set a value for one of those variables that it didn't like. Okay. But in any case, one of the things that's pretty useful here, another thing is the concept of an LLM example function. So let's say you're scraping data here and you say, I want everything that's bracket X, vertical bar Y to be mapped into that list. We can just do that there we have that result. And if we say, okay, we want to take this range of 10 and we want to map that by sort of grouping things into groups like this. Do that. Follow that example and do it. It does a pretty decent job. Let's say we have a bit of slightly messy data where we're sort of giving the example male goes to M, F goes to capital F, then we have this sort of somewhat messy kind of male, female data. It will go ahead and use those examples to guess how to clean that up. So let's say we produce with an LLM let's see what happens here. We say make. Get the LLM to make a table of tenses of the phrase I eat. So it's going to make something. I don't know what's going to look like. Okay, it looks a bit messy here because this is just a piece of text. But what we want to do is to use an LLM example function to say, okay, this is how I want that to be cleaned up. I want. I've got this vertical bar, I've got this phrase, I want it cleaned up. So let's use the LLM example function. Oh, what did I do here? That's very unimpressive. So this for some reason didn't pay attention to. Let's try it for line 174 again. Didn't work well. Okay, that's. I'm a little surprised. I would have expected it to have gone through all the lines here, but for some reason it didn't. We might have to do a bit of prompt engineering there, but you know, we can also do some of these analogy questions. Like we can say fish goes to school as rhinoceros goes to herd. You know, something like emerald goes to green as ruby goes to red. It's interesting that sometimes the LLM will successfully sort of follow an example that is a more computational kind of example, like N goes to N factorial. Okay, what does five go to? But if you actually have to do computation, you know it's not going to work because LLMs aren't. Don't do computation in a built in way. That's just the wrong answer there. Okay, so. We can. So this LLM example function is a really useful way, particularly for doing things like scraping data. It's a very convenient thing to be able to do. Now when you're using LLMs. One of the, one of the things that I keep on talking about prompt engineering, but it's like, well, why haven't you done the prompt engineering for me? Well, actually we are doing some of that and one of the things that we introduced recently is the Wolfram prompt repository. This is a collection of prompts. You can submit a prompt here. These are curated prompts for all sorts of things. So, you know, there might be a pirate speech prompt that's just kind of for fun here, or there might be a prompt somewhere down here that emojifies something. Or there might be a prompt that really. There are several different kinds of prompts. There are sort of function prompts that will do things that take something. So in this particular case here I'M saying emojify a sentence and that's what we're using here is not an LLM example function but an LL resource function. This is just like the resource function, the Wolfram function repository. This is now coming from the Wolfram prompt repository. LLM resource function of emojify. That will be a. There'll be a whole prompt associated with that. So it looks like, okay, that's a big prompt somewhere there. Okay, so it has, it has its prompt text there. But now I can give it. If I go ahead and give the text here, it will now run with that prompt. It will put emojis and it'll now do the emoji vacation of that text. So we can do. You know, there are lots of kinds of built in things in the prompt repository. I don't think I've looked at the what's in the prompt repository for a couple of weeks. And let's take a look. We can do. We have a new in the prompt repository, a recent prompt. Here we go. Okay. Oh, that's a good idea. Convert text to a data set. Modify an answer to establish a sense of place. Okay. Improve a prompt. SEO Optimized Standard test vocabulary quiz. Okay. Okay, let's try this one. Break grammar. So let's try that. We can say I don't know. This is a. Well, I don't know whether we can. Let's try taking this piece of text and let's try saying, oh, ok. This is actually showing kind of what an LLM resource function does. It takes an LLM prompt, which is the thing coming. Sort of weird. It's a lot of homophone failures there. But LLM prompt, this is sort of the raw material from which an LLM resource function is built. So this allows you to add multiple LLM prompts inside an LLM function to apply two things. So, you know, let's try something like this. This is a prompt that hopefully. I don't know what it's going to do here. Let's see what it does. It's okay, it's. It's generated a bunch of movies here and now these are movie entities because moviesuggest is a prompt that. That says like that color example I used above that says as the results, interpret it for Wolfram language as Wolfram language expressions. So these are now movie entities. And now we can just say entity value of the image and get movie posters for each of those movies. What an. Oh, that's ex machina. Okay, I don't know that movie. Maybe I should kind of Know your maybe some of these. I don't want to know. Okay. You know, you can have fun with with prompts that are kind of personality prompts here. Weird. Okay, so lots of kinds of things where you can use LLM function. LLM resource function. Here's an important use of a direct LLM prompt. This is kind of a modifier that. This is a prompt that just says that actually this is. That should show it isn't yet doing that. It should show in that raft. It should give you a link to the documentation for that prompt. I noticed on live stream somebody commenting Ex Machiner is an excellent movie. I have seen that one. I. I liked her better for some reason. Okay, so what this is doing is it's forcing a yes no answer rather than giving a long essay, blah blah blah. This is forcing yes or no, which you can then convert into for example, a true or false. Okay, so let me just show you how you. In the prompt repository here, you can submit a prompt and what will happen is you will get a prompt notebook here. And this is the raw material for specifying a prompt which you can then either submit to the repository or you can deploy it privately and in your cloud account. Actually also you can deploy it locally if you really want to, but it's more convenient to deploy it in your cloud account. So you can just feed to anybody a say, here's my prompt and you can pick it up from the cloud. Very convenient way to use it. In the end, the way all this is working is using the function llmsynthesize and using string templates. And there are cases in which you might want to just use the raw LLM string template. It's sorry, raw string templates and. Or go all the way to LLM synthesize, which is the low level system. So LLM synthesize gives you access to the LLM evaluator. And so for example, I could say, I don't know what the model names are here. I could probably say GPT4 here. Soon there'll be other model names that I can use. Let's see what happens. Oh wow. Okay, well, gives a slightly different result. Now if I say for example here I can, I can use. But by the way, when I authenticate for One of these APIs, it's using the whole system credential mechanism. You can also set those credentials right in the preferences for your set for your Wolfram language system. So it's, it's pretty convenient. I think you can, you can use other parameters here. This is saying use you know, tell me a cat joke. Temperature zero. Okay. Why don't cats play poker in the wild? Let's crank up the temperature. Temperature 1. Still. It's still that. Let's try temperature 1.4. Why was the cat sitting on the computer? Because it wanted to keep an eye on the mouse. Okay. Not very exciting. If I rerun this, by the way, at non zero temperature, I will get a different result. Trust atoms. Okay, fine. These are very lame jokes. Let's crank up temperature some more, see if we can get it to be a bit more creative. Let's go to temperature 1.8. Wow. Well, that got a little bit weirder. Let's try. Let's just try. I think temperature 2 is the maximum temperature right now. See what happens. Oh, come on. The. I know. I'm not taking any responsibility for the crazy stuff this produces and oh my, it's gone off here. And the reason it's gone off is because it's. Let's see, this has probably just wandered off into LLM space and it really needs to have a Max Items arrow.100, let's say, because that's telling it. Even if you never hit a stop token after 100 items, just stop. Okay. Wow. This went. This went bonkers. You know, one of the things about LLMs, they seem to kind of have a phase transition at temperatures maybe around 1.4 or so for, for GPT4, I guess. But you can do all sorts of experiments here. You can start doing LLM science with this and exploring these kinds of things. For example, you could take the results from this, feed them into something like text structure and see what. I don't know, let's see what the text structure thinks, that there are actually valid sentences here or whether it just goes kind of bonkers doing dealing with this. That will be a way to sense whether this has. Okay, this is. You know, we could look at the, the graphs that we get from these sentences to see whether they actually seem to make sense or not. That would be a way of kind of doing LLM science. Well, let's see other things that are related to LLMs here. We've got a lot of stuff here. I'm not going to go on too much longer, but let's say you want to make a chat. We have a symbolic notion of a chat and we would say, let's do a chat here. And this is kind of. You can kind of build up your own chat mechanism because you're saying chat, evaluate that chat. There's the thing you're giving it. So you go kind of back and forth. You, you run chat Evaluate, which is running the LLM synthesize function on the chat that you have so far and returning a result. So you can keep going here if you want to. You could take, you know, Chat three and you can just say, show me the, the messages from that chat. And of course, it's a full symbolic association which you can go and use to do kind of LLM science with it. And you know, you can do that as well with, with things like you can put into the LLM. Okay, so there's a notion of an LLM evaluator, just as there's a notion of running on a different machine. We talked about a little bit earlier, kernel configurations. This is an LLM that we are saying run on this LLM evaluator, do a computation on that LLM evaluator and compute from that with the LLM evaluator being specified a prompt. In this case, it's an LLM prompt from the prompt repository. It's the Yoda prompt. And this is the actual Yoda prompt. It says, are you a frog? A frog? Am I? No. Et cetera, et cetera, et cetera. Okay, so that's a little bit on kind of functions. LLM functions in the, in Wolfram language. Another big new thing. Gosh, there are a couple of things I could tell you about. One is the LLM tool functionality. From within LLM functions, you can also use LLM tool. LLM tool is something which allows you to call an LLM to call back into Wolfram language. So for example, let's see, this is. Let me just use this here with. Let's, let's use this. Let's define this tool. So this is now a tool that will say, you know, run this code. Now if I give it. If I say LLM synthesize here and I say, which is closer to San Francisco or London? Use the tool as you write your response. Okay, so this is now going to actually call back into. Okay, that's interesting. It's going to call back into Wolfram language. And this dialog that it did with the choice dialog here is saying, here's a geodist. This is what it's actually calling Wolfram language to find out. It's calling Wolfram language to find the geodistance between those two points. Do you allow it? Okay, I'll allow that. So now it called that and we can ask it to show us the completion test text. That is what it actually generated here. Okay. According to the Geodistance function of Wolfram language. The distance between blah blah blah is blah blah blah. But now if you want to see, well, what really happened there, what really happened when it called that tool? Here's the answer. So what it did was this is the actual text that the LLM generated, which contains a tool call object, a tool call specification that causes the llmsynthesize function to notice, oh, the LLM has stopped. It wants to call a tool, let's now go and actually call that tool. It knows that the the tool to call is run code. It runs that tool, then it brings the result back into orphan language. So it's very powerful set of capabilities that allow you to have LLM functions within the language, then from within the LLM function to call back into the language using the LLM tool functionality so that you're really knitting together kind of LLM functionality and Wolfram language functionality. Okay, let me show you the final thing I want to talk about today, which is chat notebooks. So this is a chat notebook. Maybe first of all I should show you just a chat driven notebook. We start with that. So a chat driven notebook is kind of just using our notebook interface technology to communicate with an LLM. So this is kind of just like a bit like, you know, ChatGPT interface on the web, except that now you have all the capabilities of a notebook here. So you can say something like write a haiku about a blue wolf. Okay, so this is now going to. Oh, come on. What happened here? What happened here? Let me see what's going on here. I don't know what's going on. Let's just when in doubt, try it again and see if the LLM is happy a second time around. Well, Let me see. Anybody got a suggestion for what to do here? Why is this failing? This was failing. Something like this happened yesterday and I thought that everything had been fixed. Is that the chat driven notebook? I can try try the other one. It's curious if it's completely. So what was the other notebook? It's a chat enabled notebook. Let's just try starting a chat enabled notebook again. Oh, no, I meant a chat driven notebook. It's a chat driven notebook that seems to have an issue. Well, let's just try it again. So by the way, these are chat cells and it's really convenient to be able to just pick up a chat cell and paste it somewhere and so on. Let me try this again. Let's just try it. Oh, what's going on here? Well, I'll show you this In a, in a chat enabled notebook. But I do want to explain what the difference between a chat enabled notebook and a chat driven notebook is. Let me basically say a chat. A chat driven notebook is a notebook where all it's really about is dealing with chats. A chat enabled notebook is a notebook where chats are just one of the things you do in it. So here I said write a haiku about a blue wolf. Now I can really hear. I want to say problem is that this is going to. Yeah, this is all to do with the Personas and prompts it's using. Well, okay, let's say, okay, let's say take that haiku and, and make it a limerick. Okay, so what's happening here is these chat cells are always looking at the whole past history in the notebook. Now there's a notion of a, of a chat, a chat block. So if I now put a chat block here, I can just do this again and I will say, let's say a red wolf here. And it's now going to be something quite independent of what it saw above here. So the chat block. If I now say, if I said at the top of the chat block and everything is very sequential. So if I said, you know, make a wolf limerick. Well, if I ever just use this, if I just try and use this here, I can copy and paste that cell and say, take that haiku and make it a limerick. It's going to say, okay, please provide the haiku you would like to turn into a limerick. Okay, well actually I could just take this if I want to. Just stick it in there. And now I can run that again and it'll do its thing. Oh, by the way, here it's showing these are two different kind of states of that chat block there. And let's see. Okay, Let's see. So let me start showing you a few things that we can do here. So for example, let's. It's really convenient to be able to just take these, you know, blocks of, of cells and move them around here. I can put a chat block in here. I'm typing a tilde to get a chat block. I could for example, change the personality here in the chat block. So I could say add and manage Personas. I can. Where is that? Coming up. Come up me. Hello, we're spinning, we're spinning. There we go. We got all kinds of Personas here, which we can get from the prompt repository. Bernardo is a fun Persona. Okay, there's Bernardo. And now I can say, I say okay here and now if I go up to this chat block, I can say I want. Wait a minute. Chat block settings. What do I want here? I want to add. Well, I have one here. Why am I not adding this? Install from four Personas being shown in the, in the. Okay, seven available. All right, so here I want to add Bernardo and maybe I want to go to the prompt repository. Or I can add a prompt just from the URL. I add that Bernardo. And now up here I'm gonna, I'm gonna copy this whole thing. I did already copy this whole thing down. I can change this. I can now use Bernardo as the thing to now re evaluate this whole chat block. And now Bernardo's attitude will be showing through in, in this thing. So for example here I could say, let me, let me change this again. I could go here, say add and manage Personas. I can install from the prompt repository. And now I go to the prompt repository. Let me go to the Persona. Let's go to the Yoda Persona here, let's go to Yoda. And now I have a button that says install here. And from, from the prompt repository I can go and just install Yoda into my prompt collection here. So I mean I've installed Yoda. I press ok, now I can go up here and I can pick Yoda. And now I can re evaluate this piece of the, of the chat notebook and this will yodify those things. Okay, well now for example, I could also do something here. Let me copy all this down again and let me go ahead and change something else here. I can change. I could just go ahead and change this right here in this prompt thing here. I could say advanced settings. I want to change the temperature. It's now 0.7. Let's crank up the temperature to 1.6 and let's. Then that's now higher temperature. So now let's go ahead and rerun that at higher temperature. And it didn't make any difference in this particular case, but there it is. Now I can, yeah, I can do all kinds of things here. Like I can copy the chat object here. I can put the chat object down here. That has the full chat with all of the prompt and so on. Okay, so this is, this is a very convenient way. And, and by the way, in this notebook I can be adding things like you know, more on Yoda. You know, I can be adding all those kinds of things. And if I wanted to, I could be doing computations in this notebook as well. Okay, Let's see. Oh, I'm being told that I just have to update to Packlet. If somebody gives me the, the code to run, I can do that to fix the problem. You know, it's kind of a complicated moving target when you're using LLM APIs and you're trying to get things. It's all rather complicated, but it's very, it works very. Try to code that you just. That's in the chat. Okay. It's not guaranteed to be. Okay, well then let's not bother. Okay. Okay, so now let me show you another important thing. So in this chat enabled notebook, let me say I do something to get a chat cell. I type a single quote and then say something like solve the equation for, for a harmonic oscillator. Let's try this. I don't know how well that will work, but let's try that. And okay, this is now generating code and I think it will usually use tools to actually run this code. But here I've got the code, I mouse over it. I can go and. Press that button there to actually insert and run the code in the Wolfram language session, which is pretty cool in my view. And now I can go, go here and say something like, I don't know, make a picture of a circle that is half red and half green. Now I think the workflow that is really kind of what one is going to want here. Okay, let's try running this. Okay. Oh, that did pretty well. That gave a good result. Fine, I'm happy. Let's say, let's try this, do that with a sphere instead. So remember, it's got the context. So let's see what this does. I wonder whether this is going to give the right answer. Now, you know what I'm doing here is I'm looking at the code that's being generated. That red is very suspicious. And splatteroo didn't work. Now a lot of the time the, and the more and more of this will be coming. The, the LLM is actually being set up with the prompt to actually run Wolfram language as a tool inside here to start checking whether what it did came out right. I'm gonna actually. Well, I don't know if it's gonna do me any good, but, but so, but now what I can do here is I could take that code, I can just copy down that code here and I could start editing it. Like I'll just remove that piece there. Actually this is looking very unpromising because this is basically. Maybe I can just do this here and now. At least I'll have two spheres like that. But the workflow that's very typical is you use the LLM to get a sort of chat version of what you want to do. And then you kind of tighten it up by actually looking at the code yourself. You run it, you see it isn't quite right. Etc. Etc. Etc. So you do those kinds of things. And. Let's see. So by the way, in a chat notebook, there's a whole mechanism for dealing with. Let me start a new chat block here. There's a whole mechanism within a chat cell for dealing with things like. Let me use this, an exclam emojify. And actually. And now I can just give here the. Let's see, in the chat cell, I want to say emojify. And that. That little hieroglyphic means. Okay, the mouse ate cheese. See what that does. Ok, so now that will emojify there, right? In an interactive way that. Remember, we could have done that as well with LLM function of. Sorry, LLM resource function of emojify. That's the. This is now. Okay, the mouse ate cheese. I need to get that. This is the same thing, but done. Oh, come on. That's crazy. How could it be saying that? I hope somebody didn't. That's really weird. This. I think that's related to that error I found before. That was. That had to do. It must be some kind of authentication mechanism. I could have gone and entered a key there, but. Okay, well, anyway, there's. We can. We can do this interactively like this. We can also do things like. We could say something like, what is the. Is the moon made of cheese? And then I could say here, # translated. What do I want to do here? I thought I wanted to say what happens if I do this resource Translated not found. Okay, so I didn't think that was right. What I was trying to do here was to say, translate into French and use that prompt. But this is a way of giving what we call modifier prompts that will. Okay, let's do this. Let's try Eli 5. Okay, that's. That's a fine thing. So now. Ooh. Oh, come on. All right, let's try this again here. I am now going to try running something here. I'm going to try updating the packlet here and see whether that helps me at all. Well, golly gosh, Try quitting your kernel. It seems like things are out of sync at this point. I'm not sure what's going on. It's kind of interesting. That's a joke from like 10 minutes ago. The error that was generated there. Okay, let's try running this again here. The error that was generated. Generated that as a. As a kind of a side effect there. I wonder what's going on here. This is a bad sign. Things are completely locked up. Okay, let's see if this is going to work or if we're going to have to. Oh my. All right, let's abort that. And I think we got it confused here as we tried to install a. We tried to make it better, but we didn't make it better. All right, I'm going to restart this and go back. Go back here and say that. And let's start this again. Oh, that's the wrong version to start, I believe. Drat. Hold on, let me futz around here. Let me just futz around for a second here. And let me see here, Let me see. I think I want this here. Okay, There we go. All right. Now all I have to do in principle is. Let me see here. I just want to update something here and then we go back to doing this. Very convenient. This whole packlet mechanism that we have that allows us to have sort of arbitrary on the fly pieces of functionality that are loadable is very convenient. I probably could show you a chat driven notebook now, but I'm off. I'm off. Chat driven notebooks. I'm going to show you a chat enabled notebook again. Again, the difference is chat enabled notebooks are things where the. You have capability to do. There's a whole interaction with Wolfram language. So let's say. I say, I don't know, make a plot of the lengths of numbers in Roman numerals and whether it's going to interpret that. Oh my. Well, it's not quite the way I would have done it, but again, we can just run this and. Oh my gosh, why this messages are coming out in a separate window. I have no idea. That is another horrible thing. Okay, okay, so we can try this again. Let's just try it again. See if it. It. Well, it produced some code here which I need to actually read. And it. From Roman numeral. No, that would be Roman numeral there. Let me correct it. And now let me copy down that code and let's see whether we get any better. Wait a minute. That should have just copied down the code that I have now that has Roman numeral in it. Well, it's corrected here. And now run it. Okay, much better. So this is, I think, a typical workflow of your. You're getting it to generate something and then it produces that. Now Let me show you something else. Let's say I just generate. I type one over zero. It says complex. It'll say complex infinity. Now I have a little thing here where it has a little icon that. Oh, come now. Okay, this is giving me commentary on what I've done. In the second input, you attempted to calculate the resulted volume 1 by 0. However, division by 0 is undefined. Blah, blah, blah. Now, if I, if I put a chat block there and started putting in I don't know what. Let's try. I'm going to live very dangerously here. Let's say X equals X plus one. Wow, that's nice of it. So there it's giving me a bunch of commentary about the error message that I, the, the, the, the error that I got. So it noticed that I generated something that wasn't right and it preemptively just started telling me, oh, this is what you should do. So in any case, the, the thing that I sort of wanted to emphasize here is there's, well, there's, there's a lot that is possible in kind of the interaction between LLMs and Wolfram language, really depending on the fact that in Wolfram language there is this very succinct way in which you specify things and get results. So let's, for example, this is another Persona here. This is the code writer Persona that is not nearly as wordy. It should just generate. Okay, it's pretty goofy result, but I was pretty vague in what I said. This is, I don't know why I added that commentary. It's not supposed to. This is, this is giving, this should have been just giving code without being as chatty as the code assistant is. All right, well, I think this is almost everything I wanted to talk about. You can find a bunch of information about the things I've talked about by downloading version 13.3, looking at all the online material. You can also go to my writings area where you will find all sorts of things from the original discussion of 13.3 to a bunch of more detail about the LLM things I've been showing you. You can even, for extra bonus points, you can even learn about AI space. This is all done with Wolfram language here. I'm going to be talking about this on Friday, but I'll just give you like a little preview here. This is something which is going to make use of. It's going to make use of some sophisticated neural nets which are now in our neural net repository. But that's a coming attraction for right now. What I'm What I wanted to show you was just the thing that we are very pleased with, which is version 13.3 now out and available. I should say that all the things I've been showing you on the desktop, also available in the cloud. So if I go to the cloud version of I go here to the cloud, I can. This is just wolframcloud.com I can go ahead and sign in here. And you'll notice that there are now, in addition to just the new Notebook button, which gives us a pure new Wolfram language notebook, we can also go and say file, new chat enabled notebook. And now we'll have a chat enabled notebook and we can start saying these are. These are those kinds of things. So we can say something like draw a. I don't know, draw a pentagon with circles at each corner. And with luck. Oh, oh, my, oh my, oh my. All right, let's see whether I can do this. Let's see how this works. All right. And let's try it again. Okay, there we go. So now it's off. Oops, that's very strange. That's not the right icon there. Okay, so now we have the same kind of thing. We can click this, we can copy it, we can run it. Oh, did a good job there. So this is all just running directly in our cloud. Calling out to an external. I don't quite know why this is showing up there, but there we have that. So all of these capabilities, all the things I was showing you about version 13.3, also available in the cloud. And you can also go to Cloud Basic and try things out and well, check it out and enjoy version 13.3. We're now busily at work on the next version and that's our next six months spoken for. All right, maybe if there are a few questions I might. I don't think we really have. I think we should probably wrap up here. So thanks, thanks for joining me and see you another time, hopefully before the next version of Wolfram Language. Bye for now.
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






