And graphi, because as I said that the typical graph the data flow programming, that because the graph needs to be a cyclic, we needed to introduce a few new concepts to make it convenient to write a complex program. So this is another example, the first we showed the loop, but this is another example, it's a sub graph. So in the big, when you started writing a large graph, then it became complex.
Sometimes you want to create a sort of the nested graph, so that we can use that portion, just like a sub routine or function. So you can have a graph inside a graph, and from the external point of view, the outer graph is point of view, it's like a special node, which inside execute a sub graph. But from the parent now from point of view, it's simply receive the data from another node on the parent side, execute some operations asynchronously, and then return the output to the parent. So this is the enables the reusable code, also make it easier to read the code.
Another one is the map reduce. So when we are reading with an array of data, like a benchmark, right, the benchmark, the LLM data benchmark has a large set of questions and answers. And we need to throw it to LLM to see if it responds correctly. And running that code is again complex. If you try to do concurrently, so today, many people just do synchronous, but using a graph, you can simply give an array of data to this map agent, we call it the map agent, the map agent, recognize that array, and execute the sub graph on each item. And then of course, the concurrently.
Another complexity comes when the graph becomes large and too heavy to execute on one machine. We can actually specify a certain portion of the graph, typically a sub graph, to be executed on the remote server. Again, it's all part of the graph extension. So you don't need to worry about how to remote execution. You simply need to specify this subset of graph need to be executed on this URL, then the graph extension will figure out and then execute. And on the parent point of view, the parent graph's point of view, it's simply just a node, right, which perform asynchronous execution. But internally, that node send the sub graph to the remote server, remote server execute concurrently, and they return the result back to that node, that node, then give the result back to the parent node. So this is how the distributed computing works inside a graph. And as I said, because the graph is implemented in pipes route, so you can run on either client side or server side or anywhere. So we can actually write a complex program to and then execute on multiple machines. In certain cases, we recognize that the like a special database need to be accessed only from a particular server.
So in that case, we give a sub graph to that server to execute on behalf of the outer server, which doesn't have access to the database, that does server execute that grass, get the result, and then only the result coming back to the parent server. So that's how we execute distributed graph. So this is the graph I, and this is new, but we open sourced.
Comments