Dilma Da Silva: Hi! Everyone
Dilma Da Silva: Hi! Everyone! I'm so pleased to have you here attending our size. Distinguished lecture.
Dilma Da Silva: So I am, Dilmo da Silva. I'm the division director for communication and computing and communication foundations. And I'm you know, here the host today.
Dilma Da Silva: I'll be very. I'll give you a very brief introduction to our speaker. We think it's much better that you know he will tell more as he sees fit.
Dilma Da Silva: So Sumiti Gawan is the distinguished scientist and vice president at Microsoft, where he spearheads scientific advancements in AI technology and their integration into mass market products.
Dilma Da Silva: So sumit, this sounds really like a very interesting job. So
Dilma Da Silva: maybe people can even ask more about it later on, if we have time. So feel free to start. Thank you so much for
Dilma Da Silva: of being here.
Sumit Gulwani: Yes, thank you, Dilma, for this opportunity.
Sumit Gulwani: and good morning. Good afternoon. Good evening to everyone who is joining in.
Sumit Gulwani: So back in 1995,
Sumit Gulwani: when I was picking colleges.
Sumit Gulwani: I have 2 options.
Sumit Gulwani: pick electrical engineering at it, comfort.
Sumit Gulwani: which was closer to my hometown
Sumit Gulwani: or study computer science in a different iit.
Sumit Gulwani: Now I left programming.
Sumit Gulwani: but the desire to stay closer to parents was stronger.
Sumit Gulwani: and I thought I could self teach myself programming.
Sumit Gulwani: So I ended up picking electrical engineering at it. Kanpur.
Sumit Gulwani: So the 1st year in one of our intro programming courses.
Sumit Gulwani: the instructor told us that we can multiply
Sumit Gulwani: 2, 2 by 2 matrices
Sumit Gulwani: using 7 multiplications instead of 8.
Sumit Gulwani: Now that sounded very intriguing.
Sumit Gulwani: and I wondered, how can you do that
Sumit Gulwani: now? At that time there was no Google.
Sumit Gulwani: and much less chat gpt.
Sumit Gulwani: So I went back to the instructor and asked them, How is this possible?
Sumit Gulwani: And you know what? The instructor responded.
Sumit Gulwani: So they said that this premium material is meant only for Css. Students.
Sumit Gulwani: and that upset me enough
Sumit Gulwani: to rewrite the joint entrance examination
Sumit Gulwani: and get myself admitted to study computer science at Iit Concord.
Sumit Gulwani: and noticing that
Sumit Gulwani: I followed it up
Sumit Gulwani: with a Phd. In computer science at Uc. Berkeley.
Sumit Gulwani: And then, after I got trained as a scientist, and I started my job at Microsoft Research.
Sumit Gulwani: One of the 1st problems that I decided to tackle
Sumit Gulwani: 1st how you can automatically synthesize
Sumit Gulwani: such tricky programs
Sumit Gulwani: say, by searching over the state space of all possible programs of a given size.
Sumit Gulwani: And it took me 5 years to get my revenge
Sumit Gulwani: when we had a paper
Sumit Gulwani: that could do just that.
Sumit Gulwani: And, in fact, one of the enabling technologies here was.
Sumit Gulwani: and ability to verify the correctness of such programs in the 1st place, and that's why the paper is titled from program verification to program synthesis.
Sumit Gulwani: So this paper that appeared in Purple 2,010
Sumit Gulwani: also received the most influential paper award
Sumit Gulwani: in 2,020,
Sumit Gulwani: and, in fact.
Sumit Gulwani: life has come back a full circle for me.
Sumit Gulwani: When my elmometer
Sumit Gulwani: told me 4 weeks ago
Sumit Gulwani: that I'm being honored with the distinguished alumnus Award
Sumit Gulwani: for all of my program synthesis work that followed since then.
Sumit Gulwani: And this is the journey that I will share in this talk.
Sumit Gulwani: Now, I'm so glad that Chat Gpt didn't exist at that time.
Sumit Gulwani: because today, if you were to just specify this in natural language.
Sumit Gulwani: It will actually give you this program
Sumit Gulwani: of how to multiply 2 by 2 matrices using 7 multiplications instead of it.
Sumit Gulwani: And not only this, you know, chat Gpt can
Sumit Gulwani: give you many other programs and algorithms.
Sumit Gulwani: In fact, it can even give you
Sumit Gulwani: a way to multiply 2, 2 by 2 matrices using 6 multiplications.
Sumit Gulwani: which is mathematically impossible.
Sumit Gulwani: Now this is the challenge
Sumit Gulwani: with such technologies
Sumit Gulwani: that they can hallucinate
Sumit Gulwani: even when they don't know how to do a certain task.
Sumit Gulwani: And maybe this is time
Sumit Gulwani: for us to go back to program verification program synthesis
Sumit Gulwani: so that we can validate the results of
Sumit Gulwani: these large language models. And in this talk I'm going to touch a little bit on this.
Sumit Gulwani: But if we can do that, we not only get reliability.
Sumit Gulwani: maybe this is the way for us to also discover new algorithms that we do not know yet.
Sumit Gulwani: So once I was actually returning from a seminar
Sumit Gulwani: on program synthesis. This was in 2,009.
Sumit Gulwani: After presenting this algorithm that I described to you from program verification to program synthesis.
Sumit Gulwani: And there was a lady sitting next to me in the plane.
Sumit Gulwani: She was very impressed to know that I have a Phd. In computer science and that I work for Microsoft Research, and that I work on automated programming.
Sumit Gulwani: So she thought that maybe I could help her with something that she was struggling with.
Sumit Gulwani: So she opens up her laptop.
Sumit Gulwani: fires up, excel, and shows me a column of names.
Sumit Gulwani: and asks me, how can she reformat these names
Sumit Gulwani: by giving me an example?
Sumit Gulwani: Now, at that time
Sumit Gulwani: I had no idea about the programming model underneath excel.
Sumit Gulwani: so I had to excuse myself out of the situation.
Sumit Gulwani: But after I got back home
Sumit Gulwani: I try to look for a solution to this problem.
Sumit Gulwani: and it is then that I observed
Sumit Gulwani: that many, many people struggle with simple, repetitive tasks like these.
Sumit Gulwani: and this inspired me to develop the flash field feature in Excel.
Sumit Gulwani: where, if you give one example of the transformation that you want to do
Sumit Gulwani: and then press control E.
Sumit Gulwani: The system will generalize your example into a program
Sumit Gulwani: and run that program to automate the task for you
Sumit Gulwani: and the enabling breakthrough. Here was
Sumit Gulwani: the ability to automatically synthesize such programs very efficiently.
Sumit Gulwani: And just from one or more examples.
Sumit Gulwani: Now let me tell you a little bit about how this algorithm works.
Sumit Gulwani: So flash, fill searches for programs in an underlying domain specific language.
Sumit Gulwani: and in this case the language consists of a typical string algebra.
Sumit Gulwani: that is, operators like substring or concatenate.
Sumit Gulwani: Now, one way to search for programs in a domain specific language
Sumit Gulwani: might be to enumerate all programs in order of increasing size and see which one fits the examples that the user has provided.
Sumit Gulwani: But this algorithm is not going to scale, because even this Dsl has too many programs to enumerate.
Sumit Gulwani: So the real heart of the flash wheel algorithm
Sumit Gulwani: is a technique to do symbolic back propagation
Sumit Gulwani: of examples
Sumit Gulwani: over the structure of the ground.
Sumit Gulwani: And this process also sometimes leads to multiple goals at each recursive step.
Sumit Gulwani: So what we can do is to explore those goals
Sumit Gulwani: in the order of their likelihood to succeed.
Sumit Gulwani: And this can be done using machine learning techniques, and it sometimes even gives us that 10 x speed up.
Sumit Gulwani: So at the end of this process we end up with many, many programs that satisfy the examples of the user has provided. And we need to pick. Now one of those programs.
Sumit Gulwani: And this is done using ranking techniques.
Sumit Gulwani: So we can rank programs based upon
Sumit Gulwani: how simple or small the program is.
Sumit Gulwani: And another thing that we figured out was
Sumit Gulwani: also to leverage output features
Sumit Gulwani: features of the output obtained from executing the program on other inputs.
Sumit Gulwani: So if one program ends up generating outputs that look more or less uniform, then that program should be preferred.
Sumit Gulwani: Now this technique
Sumit Gulwani: has also stood the test of time.
Sumit Gulwani: and this copper 2,011 paper also received the most influential paper award
Sumit Gulwani: at the public 2021 instance.
Sumit Gulwani: and the idea of leveraging a domain specific language
Sumit Gulwani: is now also finding
Sumit Gulwani: it's used with Llms as well.
Sumit Gulwani: So I use Dsl. For efficiency.
Sumit Gulwani: But with Llms. Dsls are quite important
Sumit Gulwani: to ensure that the output from these models adheres to some syntactic or semantic constraints.
Sumit Gulwani: In fact, in August 2024, Openai released an Api
Sumit Gulwani: to allow you to actually do that.
Sumit Gulwani: And in fact, this entire paradigm
Sumit Gulwani: of us generating lots of programs
Sumit Gulwani: and then ranking them, using some extra signals.
Sumit Gulwani: is also very common with Llm. Student.
Sumit Gulwani: Now Flashhell became very popular.
Sumit Gulwani: and my sister.
Sumit Gulwani: who parents are middle schooler figured out
Sumit Gulwani: that flash will make it into middle school computing textbooks.
Sumit Gulwani: But you know what my most heartening accolade was.
Sumit Gulwani: It came from my father.
Sumit Gulwani: who told me that, son. Now I understand your research for the 1st time
Sumit Gulwani: so sadly. My father passed away
Sumit Gulwani: couple of years ago.
Sumit Gulwani: but he had a big influence
Sumit Gulwani: on my scientific journey.
Sumit Gulwani: He always used to nag me. How does your research help common people?
Sumit Gulwani: And that was perhaps my inspiration to get started on this line of work.
Sumit Gulwani: Now, Flash can automate a wide variety of tasks, you know. That's why it's so popular.
Sumit Gulwani: But there are also many tasks that it cannot do such as date transformations or number transformations.
Sumit Gulwani: But the user experience is so inviting that it doesn't prevent people from trying it on tasks that it was never meant for.
Sumit Gulwani: So there was this tweet that went viral
Sumit Gulwani: where someone gave an example. Mapping Dec. To December.
Sumit Gulwani: and then the system maps Ocd. To October.
Sumit Gulwani: Now some people even came to my rescue
Sumit Gulwani: by saying, maybe this is how we should have named months. In the 1st place.
Sumit Gulwani: I even came across this shipping label
Sumit Gulwani: where someone likely incorporated flash fill as part of their process automation.
Sumit Gulwani: But you know, the beautiful thing about this kind of feedback is that it helps inspires the next scientific problems that you might want to go solve.
Sumit Gulwani: And this is exactly what we did.
Sumit Gulwani: So the next version of Lashville
Sumit Gulwani: that we have built actually supports such data number transformations.
Sumit Gulwani: For instance, look at the task here, where in column a, you have a string.
Sumit Gulwani: and the user wants to extract the year and the month out of it, and then convert it into the year quarter format, as you see on the right side in column B,
Sumit Gulwani: and this new system can infer the right transformation from a couple of examples.
Sumit Gulwani: and not only that.
Sumit Gulwani: it will also give you a readable formula in various languages, such as python, or in this case the excel formula language.
Sumit Gulwani: In fact, this was one of the most common asks from flash fill users.
Sumit Gulwani: because they would like to get some transparency into the underlying process.
Sumit Gulwani: So this functionality ships as the formula by example, feature in excel copilot
Sumit Gulwani: one of the videos from an Excel influencer that I saw
Sumit Gulwani: talked about how they find that this is 10 x better than flash film.
Sumit Gulwani: And we often talk about 10 X expressions. So this was very heartening to see
Sumit Gulwani: my most favorite tagline
Sumit Gulwani: in a video that was made for this feature
Sumit Gulwani: is the one on the bottom. Right here
Sumit Gulwani: we have someone very explicitly says that this is not chat gpt.
Sumit Gulwani: So how does this technology work?
Sumit Gulwani: So what we did was we extended the flash full language
Sumit Gulwani: to include date and number transformations
Sumit Gulwani: and many stylized ways of doing string transformations so that we can generate good readable programs.
Sumit Gulwani: But the big challenge when you extend the Dsl
Sumit Gulwani: is that it leads to scalability issues.
Sumit Gulwani: So we had to come up with some very interesting optimizations
Sumit Gulwani: that combine the
Sumit Gulwani: top down search process. That flash will uses
Sumit Gulwani: with some hints from bottom up. Search as well.
Sumit Gulwani: So if you are interested in reading a recent AI paper that is not chat gpt.
Sumit Gulwani: So this one in power? 2023 would be it.
Sumit Gulwani: Now, one question that you might ask is, why not use chat gpt for these kinds of tasks. And actually, it's a great suggestion, because Chat Gpt has a lot of worldly knowledge. And if you ask it, you know, if DC. Goes through December. It will actually tell you that Oct. Goes to October.
Sumit Gulwani: and, in fact, this was the title of my entire keynote that I gave at cab last summer.
Sumit Gulwani: but I will just summarize it in, you know, one slide
Sumit Gulwani: so Gpt 3 can actually do a syntactic transformations of the kind that you see here where you want to extract the 1st 3 characters from the month name.
Sumit Gulwani: However, its bias about the real world. Knowledge is so strong.
Sumit Gulwani: then, if you ask it to extract the 1st 4 characters.
Sumit Gulwani: it cannot even learn to do that, even from 4 examples, it will not not get it right.
Sumit Gulwani: But if you were to give this task to Gpt. 4,
Sumit Gulwani: it will get this right.
Sumit Gulwani: But if you ask him to extract the 1st 5 characters.
Sumit Gulwani: then it fails to do that one.
Sumit Gulwani: and maybe Gpt. 5 will probably solve this problem
Sumit Gulwani: now. Over the last year, you know, after giving the talk
Sumit Gulwani: we have been investigating more closely.
Sumit Gulwani: Why is it that the Llms are not so great at programming by example problems? And what can we do
Sumit Gulwani: to have them solve these problems more effectively.
Sumit Gulwani: So this is what we figured out.
Sumit Gulwani: The programming by example actually requires you to predict the execution semantics of a given program.
Sumit Gulwani: And we know that Llms are not very good at doing arithmetic operations, for instance.
Sumit Gulwani: but
Sumit Gulwani: the way to do arithmetic is to have them generate number sentences.
Sumit Gulwani: and the same kind of phenomenon also extends to more complicated operations that we have in programming languages.
Sumit Gulwani: and the trick here is
Sumit Gulwani: to actually show the exhibition results to the model as it is decoding its output.
Sumit Gulwani: And I'll show you how this works on our next slide.
Sumit Gulwani: And the other challenge in programming by examples is
Sumit Gulwani: that once you have a tricky task where you're manipulating some dirty data, and you need 2 or more examples.
Sumit Gulwani: then it is not really a translation kind of problem
Sumit Gulwani: as you would normally have from natural language.
Sumit Gulwani: It is really more of a search problem because you want to find the common logic that works for multiple examples.
Sumit Gulwani: And here the idea is that let Llm. You know, do the search. So let's see how we can do that.
Sumit Gulwani: So here I have a task where I want to extract the last name of the author from some bibliographic entries.
Sumit Gulwani: and if I give these 4 examples to Gpt. 4.
Sumit Gulwani: It gives me a program which doesn't really do the right job. And, as you can see in the last column, it makes some errors.
Sumit Gulwani: So what can we do instead?
Sumit Gulwani: So that here is that main idea.
Sumit Gulwani: So as Gpt. 4
Sumit Gulwani: is generating the program
Sumit Gulwani: line by line.
Sumit Gulwani: so you take control back after it has generated a line.
Sumit Gulwani: Can you augment that
Sumit Gulwani: with the execution semantics of that line
Sumit Gulwani: on the various inputs that you have in the examples.
Sumit Gulwani: And now, Gpt. 4 is able to see what is the effect of this
Sumit Gulwani: program sentence that it has emitted.
Sumit Gulwani: and then you give the control back to Gpt. 4.
Sumit Gulwani: It will output, underline you, augment it back with the execution of that line.
Sumit Gulwani: And as this process continues, you know, you stop when you hit the outputs in the examples that you have.
Sumit Gulwani: and this actually gives you the correct result.
Sumit Gulwani: Now, in the very same methodology, you can also employ another extremely powerful idea.
Sumit Gulwani: which is that instead of asking the Gpt. 4 to give you one candidate for the next line.
Sumit Gulwani: you ask it to generate multiple candidates for the next line.
Sumit Gulwani: and then you can combine all of those candidates together
Sumit Gulwani: as one program segment
Sumit Gulwani: and add it to the program.
Sumit Gulwani: And now the model can decide which of these lines it wants to use
Sumit Gulwani: for its further computation downstream.
Sumit Gulwani: So this is a very simple way
Sumit Gulwani: to convert Llm.
Sumit Gulwani: Into a search engine.
Sumit Gulwani: So what you've seen up till now
Sumit Gulwani: is examples being a very effective modality
Sumit Gulwani: for doing string transformations. So turns out there are other kinds of tasks also which are amenable to example based intent specification.
Sumit Gulwani: I'll show you an instance of table extraction next.
Sumit Gulwani: So here is a task taken from a data science class
Sumit Gulwani: where the instructor asks the students to take a semi structure text file that you see here
Sumit Gulwani: and convert it into a
Sumit Gulwani: proper Csv format.
Sumit Gulwani: and the instructor provides the students a script to build on top of.
Sumit Gulwani: Now let me show you how this experience can be made much more delightful using programming by example interface.
Sumit Gulwani: So this is the same file that I've loaded
Sumit Gulwani: in my playground.
Sumit Gulwani: And now all that I do is to give you examples of the various fields I want to extract. So let's say, I want to extract the championship name.
Sumit Gulwani: So I select one example.
Sumit Gulwani: and then I highlight another instance of that field.
Sumit Gulwani: and after I provide 2 instances, the system is smart enough now to learn a program
Sumit Gulwani: and use that program to extract other instances of that field efficiently from this file.
Sumit Gulwani: Now suppose I want to extract a different field.
Sumit Gulwani: say that here I give one example.
Sumit Gulwani: and now one example suffices for the underlying system
Sumit Gulwani: to infer my intent.
Sumit Gulwani: Now, let's say I also want to extract the winning score.
Sumit Gulwani: So when I give one example.
Sumit Gulwani: the system actually makes a mistake in the 3rd record here, because it's in a different format.
Sumit Gulwani: Now, I can fix this example. I can give the right output for the 3rd row.
Sumit Gulwani: and the system will then convert to the intent that I have in mind.
Sumit Gulwani: But what if this mistake
Sumit Gulwani: was somewhere deep within your long file?
Sumit Gulwani: In fact, if you are programming it yourself. You know all bets are off, because you might not even notice that such a mistake actually occurred, and you might get wrong results in your analysis.
Sumit Gulwani: But in case of programmable example, there's something very beautiful that you can do.
Sumit Gulwani: So you take top ranked programs that a system has generated from few examples, and you run all of them in parallel
Sumit Gulwani: and see
Sumit Gulwani: if they have a discrepancy in their outputs on some future record.
Sumit Gulwani: And if so, you point that out to the user. So in this case, if you take the top 2 end programs and run them.
Sumit Gulwani: you'll notice that those programs actually produce different outputs on record 3.
Sumit Gulwani: And this is exactly what you show to the user. And you ask the user, do you want out this output or the other output or something else.
Sumit Gulwani: And in this case no, I want something else, which is 16. Dash 7.
Sumit Gulwani: And when I do that I actually get the correct results.
Sumit Gulwani: So again, this technology works exactly along the same methodology that I showed you for flash fill.
Sumit Gulwani: except that the domain specific language is different here.
Sumit Gulwani: But what the demonstration showed
Sumit Gulwani: was the importance of helping the user identify the right examples.
Sumit Gulwani: especially when the data might be dirty and it might be big.
Sumit Gulwani: And this idea of asking the user.
Sumit Gulwani: oh, on this row? 37. Do you mean output one or output 2. Or do you want to provide another output
Sumit Gulwani: is taken from this paper
Sumit Gulwani: on distinguishing Inputs, which also received the most influential paper award recently.
Sumit Gulwani: and the other ways to also help people figure out potential discrepancies
Sumit Gulwani: by analyzing the patterns in the input row, or even patterns in the output that is generated from picking some specific program.
Sumit Gulwani: So this demonstration that I showed you
Sumit Gulwani: or custom text files
Sumit Gulwani: can also be applied to semi-structure documents of different kinds, such as web pages, Pdf. Json, and so forth.
Sumit Gulwani: And many of these technologies actually ship as data connectors inside the Microsoft product called power Bi.
Sumit Gulwani: and they've been ranked as top connectors in in surveys.
Sumit Gulwani: But the most interesting thing we figured out was
Sumit Gulwani: that these technologies had very high usage during Covid times, and people would try to mash up different messy data sets to build up important dashboards.
Sumit Gulwani: Okay, now, let me move on to a different way of expressing intent.
Sumit Gulwani: So when we build these data connectors, these technologies for extracting tables.
Sumit Gulwani: the product team challenged us
Sumit Gulwani: and told us that. Oh, we don't have time to build these rich user experiences that you're talking about.
Sumit Gulwani: Can you actually do such table extraction tasks
Sumit Gulwani: from 0 examples.
Sumit Gulwani: And I thought they had gone some gone crazy
Sumit Gulwani: because even giving one to 2 examples, you know, such a tremendous boost for the user as opposed to writing the entire parsing script.
Sumit Gulwani: But how on earth can you do it with 0 examples?
Sumit Gulwani: But when I thought more about it. I realized that if I show you a semi-structure document you can pretty much figure out what the various fields are. You don't need to provide me one or 2 examples of the various tens of fields that might be there in the document.
Sumit Gulwani: So this is what inspired us to develop technologies
Sumit Gulwani: that can understand the user's intent for the underlying table
Sumit Gulwani: by just looking at the raw table and without requiring the users to give some examples. So let me show you an experience
Sumit Gulwani: of what might be possible with these technologies.
Sumit Gulwani: So this is a video recorded by my colleague Arjun.
Sumit Gulwani: a table in a Pdf. Here. This one is about rice production. I don't know much about agriculture, but I do know a lot about the pain of pasting Pdf tables into excel. We get all the data into one column, and it's a huge pain fixing it here we have omnitable, which is a clipboard extension built on top of pro's ingestion technology. And look at that omnitable has done the right thing.
Sumit Gulwani: And why? Just text from Pdf, you can directly copy Pdfs from the file explorer and omnitable will read and parse the file. I really like this case, as it has figured out that the last bits of the page are shaped differently, and it's handled it really well.
Sumit Gulwani: But Pdfs are just the beginning. Omnitable can handle many formats, web pages, malformed Csvs, Json files and many other textual formats. Here is me copying a list of movies from Imdb that I want to watch later.
Sumit Gulwani: And it's figured out all the right details automatically. And here's 1 case where I'm trying to figure out what concerts I can see this summer.
Sumit Gulwani: and the web page here is not even formatted as a table, but omnitable, has identified some tabular data inside, and the table that was pasted is exactly what I wanted.
Sumit Gulwani: Tables are everywhere, but copying tabular data is currently hard and convoluted omnitable can act as a bridge. That makes this process easier.
Sumit Gulwani: So you can see how such technologies can enable a smart copy paste experience now.
Sumit Gulwani: And the key idea here is to actually infer and guess the examples which the user is not providing anymore
Sumit Gulwani: and then use programming by example techniques. And today, if the data is quite noisy.
Sumit Gulwani: we can actually even use Llms
Sumit Gulwani: which understand the semantics of real world to actually infer what these examples might even be.
Sumit Gulwani: But now let me actually show you another way where the user can express intent
Sumit Gulwani: through temporal context. So what you saw was a special context. But sometimes the users intent is also hidden inside temporal context as to what they have been doing in the recent past.
Sumit Gulwani: So suppose I'm watching a class.
Sumit Gulwani: and I have written this.
Sumit Gulwani: Now I can let a co-pilot take over, and it will actually complete the code for me. Right? So very impressive stuff.
Sumit Gulwani: But
Sumit Gulwani: what if I'm working on this code fragment?
Sumit Gulwani: It would be hard for someone to guess what my intent here would be.
Sumit Gulwani: However, what if you observe what I was doing
Sumit Gulwani: a few minutes ago.
Sumit Gulwani: So I had this other program segment.
Sumit Gulwani: where I replaced an expression that was converting Fahrenheit into centigrade by a
Sumit Gulwani: a call to a new method that I've just defined.
Sumit Gulwani: and then I do a similar kind of refactoring at another place.
Sumit Gulwani: And if you saw me doing this.
Sumit Gulwani: then you can potentially guess what I want to do in the bottom code fragment.
Sumit Gulwani: which is to do a similar conversion.
Sumit Gulwani: So this is called learning the user's intent from
Sumit Gulwani: temporal context.
Sumit Gulwani: And the way you do this is that the user provides some examples. And then the programming by example, synthesizer will learn a transformation program
Sumit Gulwani: for doing such poor transformations. And then you apply this program to give the user what they want.
Sumit Gulwani: So let me show you the 1st experience that we designed around such a technology.
Sumit Gulwani: So there are 4 boxes
Sumit Gulwani: and the user
Sumit Gulwani: copies and paste all the expressions they want to transform in the top left box.
Sumit Gulwani: Then they give me an example of the transformation in the 2 bottom boxes.
Sumit Gulwani: and then they press the magic button and all the expressions, you know, get transformed appropriately.
Sumit Gulwani: But there's a big problem with this user experience, because it involves
Sumit Gulwani: lot of windows, switches and copy paste.
Sumit Gulwani: And, in fact, and in the flow user would not even realize to use such a tool when they start doing the task manually.
Sumit Gulwani: And I guarantee you that if this is the experience we released
Sumit Gulwani: people would not really have used this functionality.
Sumit Gulwani: So what do we do instead?
Sumit Gulwani: So this team T-shirt shows, you know, our solution.
Sumit Gulwani: And the idea is to watch constantly what the user is doing.
Sumit Gulwani: and from their potentially noisy sequence of keystrokes
Sumit Gulwani: we try to infer
Sumit Gulwani: any repetitive examples.
Sumit Gulwani: And once we find those instances.
Sumit Gulwani: then we produce suggestions for the transformation from those examples.
Sumit Gulwani: Now, this looks a bit like clippy.
Sumit Gulwani: because the tool is always going to hand, raise and give you suggestions about what you want to do next. And you don't want this to become Tp for code.
Sumit Gulwani: So, for instance, if the user changes. You know, 2 integers to strings. You don't want to suggest to the user to replace all instances of integer to string.
Sumit Gulwani: People will lose trust in your feature, and will turn off your feature. In fact, this is what happened with an initial release
Sumit Gulwani: of this of this functionality.
Sumit Gulwani: and we learned the hard way that it is very important to strike the right precision, recall trade off, and do the right ranking of the underlying suggestions.
Sumit Gulwani: and for this we used many different signals, even including where the user's cursor location was.
Sumit Gulwani: And with that we went from people writing posts on how to turn off this feature to a lot of social media love.
Sumit Gulwani: But let me actually share with you my most heart heartening accolade for this functionality.
Sumit Gulwani: So I'm going to play a video from the ability summit at Microsoft, where you get to hear about the pains that this developer has the challenges that she has
Sumit Gulwani: the one in 4 computer users will develop a chronic overuse injury.
Sumit Gulwani: Having one hand just means. I ran into it twice as fast.
Sumit Gulwani: Suddenly every click sent pins and needles shooting up my arm. From the minute I woke up to the moment I fell asleep. If I could fall asleep
Sumit Gulwani: the pain would not stop.
Sumit Gulwani: I tried switching to using my shoulders and my nub more to type, and my wrist got a little bit better.
Sumit Gulwani: But 6 months later I developed chronic tendonitis in both of my shoulders.
Sumit Gulwani: By that point my arms were so bad I couldn't wash my own hair or hold a cup.
Sumit Gulwani: and every doctor, I saw agreed that the root of the problem was the thing I loved the most.
Sumit Gulwani: By computer
Sumit Gulwani: career computer use requires a lot of repetitive gestures. I learned
Sumit Gulwani: more than any one part of the human body is designed to do long term. A paraplegic who uses voice control will develop vocal strain. We've all probably met someone in our field whose hands or lower back hurts at the end of the workday or
Sumit Gulwani: hurts, and some of it helped a little. But no matter what mouse you use, you still have to click it.
Sumit Gulwani: Okay, now let me fast forward to the segment where she talks about. But now I have to repeat this 10 more where she talks about a couple of features that she uses every day that have helped alleviate the pain that she goes through
Sumit Gulwani: or times. Ugh!
Sumit Gulwani: But look at what happens now. I do that edit a second time, and on the 3rd time intellicode is going to do something amazing.
Sumit Gulwani: It automatically suggests that same edit on the next line.
Sumit Gulwani: Then, if I press the preview all shortcut.
Sumit Gulwani: are you seeing this? It applies the edit to every spot in my file that matches that pattern, and lets me take all of those edits by just pressing tab
Sumit Gulwani: for me. This is huge. It took fewer gestures to edit 10 lines than it would take to just get the cursor onto the next line without intellicode.
Sumit Gulwani: And while this is great for me because typing is physically difficult. If you have a focus-based disability like Adhd, a tool like this could help you stay on track
Sumit Gulwani: another spot. Us developers get bogged down in is
Sumit Gulwani: so I hope you know, this inspired you to consider developing AI technologies.
Sumit Gulwani: but also enhancing accessibility as opposed to only focusing on productivity.
Sumit Gulwani: Now let me move on to the part of my talk. Where we will talk about a different way that the user expresses intent.
Sumit Gulwani: not through examples, not through natural language.
Sumit Gulwani: but by doing the task themselves.
Sumit Gulwani: and then expecting AI
Sumit Gulwani: to assist them to fix what might have potentially gone wrong.
Sumit Gulwani: So one common complaint that we often see
Sumit Gulwani: on excel health forums
Sumit Gulwani: is, people will share the formulas that they have
Sumit Gulwani: and the errors that it leads to
Sumit Gulwani: when they try to run the A formula.
Sumit Gulwani: and then they request an expert on the Health Forum
Sumit Gulwani: to help them fix this formula.
Sumit Gulwani: Now, in many cases the formula is just a little bit. No, away from being correct.
Sumit Gulwani: A small edit distance away.
Sumit Gulwani: But the syntax is often very cryptic, and the compiler error message, not very helpful.
Sumit Gulwani: However, the expert is often able to look at this and provide the right fix, and we call this the problem of last mile repair.
Sumit Gulwani: So I thought, if the expert can do such fixes, maybe we can also develop an AI technology to do these fixes.
Sumit Gulwani: So in this case. The fix is, you know, just inserting these 2 characters that you see at the bottom.
Sumit Gulwani: So here is how our workflow looks like.
Sumit Gulwani: So given the Z buggy formula.
Sumit Gulwani: We do some enumeration of all potential local repairs, small local repairs to the buggy formula
Sumit Gulwani: and to speed up this process
Sumit Gulwani: we leverage a neural module
Sumit Gulwani: which predicts where the error might be. In the 1st place.
Sumit Gulwani: And then, once we get a bunch of repairs, potential repairs, we use another Ml. Module
Sumit Gulwani: to rank these repairs, and then we pick the top one and show it to the user.
Sumit Gulwani: Now let me talk about
Sumit Gulwani: a very important application domain
Sumit Gulwani: for program repair.
Sumit Gulwani: And this is an area that has not yet been disrupted by AI,
Sumit Gulwani: the area of education.
Sumit Gulwani: So the picture that you see here is not a stock picture, it is actually taken by a colleague at partner.
Sumit Gulwani: These are the students waiting in the corridors of the office hours
Sumit Gulwani: of an Intro programming course.
Sumit Gulwani: and the line extends around the corner.
Sumit Gulwani: and you know what the last student is thinking.
Sumit Gulwani: Will I get a few minutes with that PA to discuss the doubts that I have.
Sumit Gulwani: I think the big challenge with education has been that we are still stuck with this centuries old model, where one teacher is teaching
Sumit Gulwani: 30 students in a classroom, and students are not able to get personalized feedback.
Sumit Gulwani: In fact, the demand for programming courses is 5 times more.
Sumit Gulwani: Then the availability and often due to lack of tas.
Sumit Gulwani: Another sad statistics that we see is that the 80% dropout amongst us minority students.
Sumit Gulwani: likely, because the tech stack is not adequate.
Sumit Gulwani: What students need is not a sample solution.
Sumit Gulwani: but feedback on how their broken solution, which reflects their thought process can be extended into a correct solution.
Sumit Gulwani: And I think we have a huge opportunity at our hands right now
Sumit Gulwani: to develop a technology that can give feedback to students just like a human ta would give by progressively revealing different kinds of hints.
Sumit Gulwani: We have decades of work in program analysis and verification.
Sumit Gulwani: And now we're only seeing a disruption that large language models have brought with respect to how good they are at programming.
Sumit Gulwani: And we have the potential to fine tune these models
Sumit Gulwani: with the students learning journeys
Sumit Gulwani: because the students all across the world year after year, are struggling with the similar kinds of confusions. And this data can be collected
Sumit Gulwani: to actually fine tune these models.
Sumit Gulwani: So let me show you some work that we have done in this space.
Sumit Gulwani: So what you see here
Sumit Gulwani: is an incorrect program for the palindrome problem from the student. It has all different kinds of errors, syntax errors, semantic errors.
Sumit Gulwani: and we're able to fix all of them, as you see in the second column.
Sumit Gulwani: and this fix does not happen in just one call to the Llm. But we do these fixes in an iterative manner, just like how the student would have probably done it themselves.
Sumit Gulwani: So 1st we fix syntax errors.
Sumit Gulwani: and we do that one by one.
Sumit Gulwani: because fixing a syntax error can lead to change in the next set of errors that you might have to fix.
Sumit Gulwani: And then, once the program can execute, we look at the semantic discrepancy
Sumit Gulwani: on some test cases that might be available
Sumit Gulwani: and ask the Llm to
Sumit Gulwani: consider making
Sumit Gulwani: making similar changes in the student's phone.
Sumit Gulwani: And then once we get multiple candidates on the Llm. We pick the one that is closest to the student solution.
Sumit Gulwani: So similar kinds of process can actually lead to fixing the students code.
Sumit Gulwani: But the interesting thing is that the students do not really need a fix to their submitted code.
Sumit Gulwani: What the need are hints
Sumit Gulwani: that will help increase their learning, enhance their learning experiences.
Sumit Gulwani: So let me show you the work that we did recently in order to provide some good hints to students, and this will also be a good exercise into showing some tricks around prompt engineering.
Sumit Gulwani: So we asked the Llm. To give a
Sumit Gulwani: short hint to the student.
Sumit Gulwani: and we describe what a hint should be. It should not be too detailed.
Sumit Gulwani: so that the student is able to think.
Sumit Gulwani: and it should not be too abstract, so that it is constructed.
Sumit Gulwani: but
Sumit Gulwani: just asking the Llm. To provide a hint to a student's buggy solution is not very effective. So, for instance, this is a broken
Sumit Gulwani: program from the student which has this error.
Sumit Gulwani: and if you ask Gpt Port to generate a hint here, it will actually give you something that is not very meaningful.
Sumit Gulwani: So one trick is to enhance the prompt here with respect to asking the model to do some chain of thought, reasoning.
Sumit Gulwani: and the way you do that is by asking the model to actually 1st describe the bug in detail and the fix
Sumit Gulwani: and use that to actually generate this hint, which is not very concealing
Sumit Gulwani: but even before generating the fix
Sumit Gulwani: we pass in more information, such as the failing test case.
Sumit Gulwani: and probably even a fixed version of the buggy program that was computed using the technology that I showed you earlier.
Sumit Gulwani: So with this kind of prompt augmentation.
Sumit Gulwani: the tool is now able to generate the right hint.
Sumit Gulwani: And now, if you look at the results, we went from 66% precision to 82% precision.
Sumit Gulwani: But this is still not a good number for this tool to be deployed in classrooms.
Sumit Gulwani: because you would likely not send her child to a teacher, that is only 82% correct. You want the accuracy to be much higher in nineties.
Sumit Gulwani: So let me show you what we did in order to increase the appreciation, and the trick is to actually reduce the recall.
Sumit Gulwani: and the idea is to understand
Sumit Gulwani: what might be needed
Sumit Gulwani: to prevent bad hints from being shown to the student.
Sumit Gulwani: So our key insight there is
Sumit Gulwani: that we ask the model
Sumit Gulwani: to take the feedback that was generated by the by the model and use that feedback to fix the buggy program. So in some sense, model is going to be simulating the student.
Sumit Gulwani: And since we are focusing on only one bug. We ask the model to resolve the remaining bugs by itself.
Sumit Gulwani: so that we can then check
Sumit Gulwani: whether the
Sumit Gulwani: fix that the system did by looking at that explanation was actually a correct fix or not.
Sumit Gulwani: however, the model might be too smart, and might be able to still generate the right fix, even if the explanation is bad.
Sumit Gulwani: and the trick here is to provide an escape mechanism to the model.
Sumit Gulwani: to
Sumit Gulwani: point out if the explanation is indeed bad as opposed to just trying to look at that explanation and still trying to fix the program.
Sumit Gulwani: And then we use a
Sumit Gulwani: less powerful model for doing this. So hints are generated using Gpt. 4.
Sumit Gulwani: But whether that hint was good enough or not
Sumit Gulwani: is tested, using Gpt. 3.5,
Sumit Gulwani: and since the process might be stochastic.
Sumit Gulwani: What we do is we run n different trials.
Sumit Gulwani: and then we say, a hint is good
Sumit Gulwani: only if a certain fraction of these trials lead to success.
Sumit Gulwani: And furthermore, we also see what the effect is
Sumit Gulwani: if the hint is not shown to Gpt. 3.5,
Sumit Gulwani: and in this case we require
Sumit Gulwani: that the delta between when the hint is shown and not shown, is again significant.
Sumit Gulwani: And once you go through this workflow
Sumit Gulwani: we find that the performance really boosts up a lot close to 95% precision at the cost of reducing recall.
Sumit Gulwani: And here's a table that shows the importance of each and every trick that I showed you.
Sumit Gulwani: So if you don't use one of those tricks, you know, the performance will actually drop. Drop down.
Sumit Gulwani: Okay. Now, let me talk about the last application
Sumit Gulwani: in the case of repair.
Sumit Gulwani: and this is for helping developers
Sumit Gulwani: debug their code.
Sumit Gulwani: Debugging is one of the most time consuming tasks for developers.
Sumit Gulwani: So over the last year
Sumit Gulwani: we have brought in co-pilot support to assist developers with debugging their code.
Sumit Gulwani: So now, when you get a runtime exception in your code
Sumit Gulwani: you will see this option to ask Copilot where copilot will give you an explanation
Sumit Gulwani: of the potential error in your code, and also suggest a fix.
Sumit Gulwani: So let me show you what was the 1st solution that we built for such a functionality.
Sumit Gulwani: So like everyone else, we focused on doing
Sumit Gulwani: prompt engineering
Sumit Gulwani: and putting in all kind of debugging information as context for the Llm.
Sumit Gulwani: And we noticed that there was only 25% success rate around our user study.
Sumit Gulwani: And the reason for this was
Sumit Gulwani: that Copilot was
Sumit Gulwani: trying to leap towards providing a fix to the user, even when it did not know what the real error was.
Sumit Gulwani: so it would make wrong assumptions, and will try to quickly close the conversation with the user by saying, This is how you should actually fix it.
Sumit Gulwani: And this again gets back to the problem of hallucinations. If the model does not know something.
Sumit Gulwani: it has been trained to still respond.
Sumit Gulwani: So there's 1 very simple but powerful idea that you can use
Sumit Gulwani: to prevent this from happening, or to less lower the chances of this happening.
Sumit Gulwani: So instead of asking the model.
Sumit Gulwani: Give me a fix
Sumit Gulwani: to this buggy program.
Sumit Gulwani: You ask the model.
Sumit Gulwani: Do you know
Sumit Gulwani: the answer to this challenge? Do you know what the issue might be.
Sumit Gulwani: And do you know the fix to this problem?
Sumit Gulwani: And if the model says
Sumit Gulwani: No, I do not need any more investigation. I know how to solve it.
Sumit Gulwani: Then you let it get back to the user.
Sumit Gulwani: But if the model says.
Sumit Gulwani: Yes, I need to do some more investigation.
Sumit Gulwani: then you ask the model, do you need to involve the user and have some interaction with the user?
Sumit Gulwani: And if the model says No, then let the model figure out this more information from the context
Sumit Gulwani: and repeat this process.
Sumit Gulwani: Or you go to the user and ask some questions of the user in a collaborative way to help the user figure out this issue.
Sumit Gulwani: So with this kind of agentic workflow, we were able to get much better performance for debugging tasks.
Sumit Gulwani: So this gan diagram shows the effect of using this agentic pattern
Sumit Gulwani: versus using the vanilla copilot chat experience
Sumit Gulwani: on various tasks that we give to the developer.
Sumit Gulwani: So on the right side. What you would notice is that there are more solid bars
Sumit Gulwani: as opposed to slanted bars, indicating more use of
Sumit Gulwani: these technologies by the users.
Sumit Gulwani: And another interesting thing that you'll notice on the right side
Sumit Gulwani: is that the blue bars occur before the green bars.
Sumit Gulwani: meaning that the tool is
Sumit Gulwani: 1st trying to localize the problems, working with the developer
Sumit Gulwani: and then trying to provide a fix
Sumit Gulwani: as opposed to just leaping to a fix without even figuring out properly what might be wrong.
Sumit Gulwani: And this leads to 88% success, which is big, you know, compared to the baseline of 25%.
Sumit Gulwani: And here are some verbatims, and my favorite is the second one that we got from one of the users in the user study.
Sumit Gulwani: where the user says that now they feel more empowered to be able to resolve a similar issue on their own.
Sumit Gulwani: So you can see that these kinds of experiences can also aid learning experiences. For people.
Sumit Gulwani: Okay, so this is the last segment of my talk.
Sumit Gulwani: where I will talk about the most common form of intent, which is natural language. It's very versatile, and today Llms. Can even interpret it.
Sumit Gulwani: However, if this natural language occurrence is about a task that the Llm. Does not know how to do well, because it's probably has not seen much of a training data.
Sumit Gulwani: Then one fascinating capability that these large input models offer
Sumit Gulwani: is that ability. For in context, learning.
Sumit Gulwani: and this can be facilitated
Sumit Gulwani: by giving a good example
Sumit Gulwani: or some good part of the documentation to the model.
Sumit Gulwani: So this is some space that my team has been doing some work recently, and I'll share some insights from there.
Sumit Gulwani: So suppose I want to convert this natural language appearance on the left side into the SQL. Code fragment on the right side.
Sumit Gulwani: Now, when we were trying this task, using Gpt. 3, we figured out it could not do that
Sumit Gulwani: so the trick was, what kind of example can we pick from our example bank.
Sumit Gulwani: so that the model can actually do this translation?
Sumit Gulwani: And the most intuitive idea is to pick an example from the example bank.
Sumit Gulwani: whose natural language
Sumit Gulwani: part of the input is very similar to the natural language that the user has provided.
Sumit Gulwani: But if you do that in this case you will notice that the model actually gives you the wrong output
Sumit Gulwani: because it refers to a column that does not exist.
Sumit Gulwani: Instead, there is another example in our database in our example bank.
Sumit Gulwani: where
Sumit Gulwani: the quote part of the example, the output part of the example, is actually very similar
Sumit Gulwani: to the output that we desire on the right side.
Sumit Gulwani: And if we pass this example instead, then the model can do this task.
Sumit Gulwani: And now the challenge is, how on earth will you figure out that you should pick this example
Sumit Gulwani: at the bottom, as opposed to the one at the top.
Sumit Gulwani: and the trick there is
Sumit Gulwani: to simply fine tune the model right fine tune this sentence word model
Sumit Gulwani: to redefine the similarity of 2 utterances
Sumit Gulwani: to match the similarity of their respective code.
Sumit Gulwani: and to make this process efficient.
Sumit Gulwani: you want to only pick those examples
Sumit Gulwani: where natural language similarity is high, but code. Similarity is low, because those are the things you want to unlearn.
Sumit Gulwani: or it is the other way around. And these are the things that you want to learn.
Sumit Gulwani: as opposed to picking out all quadratic pairs of examples which might be very expensive.
Sumit Gulwani: And then one other optimization that we did later on was to replace the sentence, but
Sumit Gulwani: by the
Sumit Gulwani: embedding slayer of these large language models
Sumit Gulwani: which will allow you to even handle out of distribution language, because these models are very strong in the language, understanding abilities, and you simply fine tune by adding few dense layers.
Sumit Gulwani: At the end of this embeddings.
Sumit Gulwani: Now, one interesting optimization relates to, how do we define code similarity?
Sumit Gulwani: So in this scenario, I want to map this natural language attendance
Sumit Gulwani: to this expression that you see on the right side
Sumit Gulwani: but this one is actually incorrect because it is not using the right regular expression syntax. What we really want
Sumit Gulwani: is the one that you see at the bottom
Sumit Gulwani: where you have dot. Dot.
Sumit Gulwani: Now, I might have 2 examples in my example. Bank.
Sumit Gulwani: The one at the top
Sumit Gulwani: is actually very close
Sumit Gulwani: to the intended output that you see on the bottom right.
Sumit Gulwani: You just have to replace one comma by a dot dots.
Sumit Gulwani: And if you define code similarity based on edit distance. This is the example you will likely end up picking.
Sumit Gulwani: but then it will not really help.
Sumit Gulwani: Instead, if you pick the example at the bottom.
Sumit Gulwani: then it works out.
Sumit Gulwani: But now, to pick the example at the bottom.
Sumit Gulwani: The important thing is that port similarity should not be defined, based on edit distance, but based on some properties
Sumit Gulwani: such as what method, name is being used.
Sumit Gulwani: or whether or not a regular expression is being used or not.
Sumit Gulwani: and the advantage of using properties for defining
Sumit Gulwani: code. Similarity is that it makes the example selection also very granular.
Sumit Gulwani: So you can keep picking multiple examples until they cover all the properties
Sumit Gulwani: that the system predicts.
Sumit Gulwani: and then I'll share one final optimization here.
Sumit Gulwani: So in this case, if you want to go from the natural language on the left to the code snippet on the right side.
Sumit Gulwani: picking the example that I have in my example bank.
Sumit Gulwani: The best example still does not help me.
Sumit Gulwani: because the example does not really tell me
Sumit Gulwani: that the 3rd argument
Sumit Gulwani: actually corresponds to the count.
Sumit Gulwani: But I know which method is important. So now I can go and look into the documentation
Sumit Gulwani: to get more information about this method, which actually also talks about the 3rd argument.
Sumit Gulwani: And when I additionally pass in this documentation to the model, it is actually able to do the right job.
Sumit Gulwani: So I have one other trick for enhancing prompt engineering. But I guess I'm running out of time, so I'll skip this part. But at a very high level. This is about using the model itself to refine its own prompt instructions
Sumit Gulwani: after having it to self-reflect on its failures.
Sumit Gulwani: Now we have seen a natural language as a a very important modality for describing users intent.
Sumit Gulwani: but turns out that natural language is also an interesting modality for output.
Sumit Gulwani: because, you know, one very common
Sumit Gulwani: use of large language models is even not as much as generating programs. But to explaining programs.
Sumit Gulwani: We also saw the use case of hint generation.
Sumit Gulwani: And then one important question that arises is, what constitutes a good explanation or hint.
Sumit Gulwani: In fact, natural language is also an important modality for conversing with the user to resolve the ambiguity.
Sumit Gulwani: and here it is important to understand
Sumit Gulwani: what constitutes a good conversation with the user. Because if you can do that, then we can also try to improve that quality.
Sumit Gulwani: And here our key insight was to look into principles of effective communication and social sciences, literature.
Sumit Gulwani: and we figured out these Grecian magazines of communication.
Sumit Gulwani: and when we encode this kind of information in the prompts. We actually see
Sumit Gulwani: that the quality of communication with the user actually goes quite up. And it is these kinds of exams that you can also use to evaluate the quality of the communication.
Sumit Gulwani: And, in fact, you know one of the most
Sumit Gulwani: interesting aspects of using natural language as conversation
Sumit Gulwani: is to design these multi-agent workflows
Sumit Gulwani: with this conversation
Sumit Gulwani: or this natural language, is used to describe a plan as to how to solve a given problem.
Sumit Gulwani: and even to generate a review of the output of an Llm.
Sumit Gulwani: This is the most happening area in the world of AI these days, you know, I did not have time to get into this. This is a completely separate topic of its own accord.
Sumit Gulwani: But
Sumit Gulwani: But the most and then most interesting aspect about about this is that now you're not writing one prompt. What you're doing is you're writing multiple, different prompts.
Sumit Gulwani: one for planning, one for reviewing and so forth.
Sumit Gulwani: And now, if prompting is what you know becomes our new programming paradigm, or at least you know AI programming paradigm.
Sumit Gulwani: Then we saw some instances of how to actually construct such prompts. In the 1st place, but one big opportunity that we have is also on how to maintain these prompts, and this is the opportunity to define the software engineering equivalent in this new programming paradigm.
Sumit Gulwani: for instance, what parts of a prompt are really leading to a given buggy behavior, or if I were to change this part of the prompt which tests are likely to break.
Sumit Gulwani: Okay. So now let me conclude.
Sumit Gulwani: So that number one idea I wanted to share in this talk was around building neurosymbolic systems.
Sumit Gulwani: Now, the symbolic, logical reasoning based techniques are the ones that can give you validation and correctness, but the big challenge there is that they require very domain specific investments.
Sumit Gulwani: On the other hand, Llms have very broad applicability.
Sumit Gulwani: and I believe their combination can be potent.
Sumit Gulwani: Now, one way to combine them is to use a neural model. First, st for instance, to figure out the examples and then the user symbolic model to generate the program from those examples.
Sumit Gulwani: or you can even use them the other way around.
Sumit Gulwani: But you can also combine them in more intricate ways.
Sumit Gulwani: So the way I showed you how the programming by example, architecture of flash field works.
Sumit Gulwani: where models can actually be used to provide hints about which path in the search to explore.
Sumit Gulwani: or even for ranking.
Sumit Gulwani: and it can even be the other way around, where the symbolic model actually provides hint to the newer model which we saw in the execution guided search.
Sumit Gulwani: In fact, this is the talk that I would highly recommend for you to watch. It was given by Noram Brown at Uw
Sumit Gulwani: a few days ago.
Sumit Gulwani: where he talks about the importance of search at inference time.
Sumit Gulwani: and our ability to generate such trajectories
Sumit Gulwani: can actually be used to fine tune the underlying models in the 1st place.
Sumit Gulwani: and then the second final idea I wanted to leave you with is that there are many different forms of expressing intent which might be more natural than natural language in respective settings.
Sumit Gulwani: you know, examples being one of them.
Sumit Gulwani: and sometimes the user's intent is also hidden inside that temporal context as I showed you.
Sumit Gulwani: And user interactivity is key to enabling reliability and correctness for sophisticated long running tasks.
Sumit Gulwani: And here I showed you this, investigate and respond agentic pattern
Sumit Gulwani: which really prompted. When should Llm. Be talking to the user
Sumit Gulwani: and existing maximums of communication which talk about how to interact with the user.
Sumit Gulwani: So I will stop here. This is my final summary slide, and would be happy to take on any questions.
Dilma Da Silva: Thank you so much. Sumit. I certainly super enjoyed your talk, and I am so jealous that you found a way of explaining to your father what you did. This is so powerful to all of us. With my Phd. Thesis in operating system I really struggled to get a way of communicating.
Dilma Da Silva: And and I was so very inspired by the origin story for Flash. But you know, you're trying to solve a problem from a real user. So thank you. Thank you for that.
Dilma Da Silva: We have a here a few questions. The 1st one will exercise your
Dilma Da Silva: guessing of context. Because, the the question came at the middle of the talk, when I noticed could be a few minutes after it. It was when you were talking about
Dilma Da Silva: repetitive tasks that users do, and learning from it, and you motivated all of us to look at accessibility as another dimension that we should communicate. So it was on on that part of the talk with the question and I'll read is, how could this technology be transferable to emerging emergency services?
Dilma Da Silva: So if something comes, you tell us, otherwise we can just wait for the the person can now ask now, a little more generically, but anything
Dilma Da Silva: about applying
Dilma Da Silva: the pieces of reduction of repetitive work to emergency service. Anything comes to mind.
Sumit Gulwani: Yes. So I would say that temporal context is one aspect that is today missing from the data that these large language models have been trained on.
Sumit Gulwani: So these argument models have been trained on a snapshot of the word that exists at a given point of time.
Sumit Gulwani: and there is lot of value in leveraging the signals
Sumit Gulwani: that have happened.
Sumit Gulwani: Before
Sumit Gulwani: now these signals can be of 2 different kinds.
Sumit Gulwani: One is for the very specific instance that you are trying to solve.
Sumit Gulwani: whereas I showed that if you want to edit code
Sumit Gulwani: it would be good to see what other edits you have done in the very recent past.
Sumit Gulwani: But this kind of temporal context
Sumit Gulwani: scales beyond that as well.
Sumit Gulwani: And this gets you into the category of personalization
Sumit Gulwani: of the AI model.
Sumit Gulwani: knowing more about you.
Sumit Gulwani: how you have done things in the past.
Sumit Gulwani: maybe even. How have other users, you know, done things in the past.
Sumit Gulwani: and that I also believe is going to be one of the next. You know big AI frontiers.
Sumit Gulwani: So I don't know the details. You know, of the application that you have in mind.
Sumit Gulwani: But I'm absolutely confident
Sumit Gulwani: that temporal context is the key.
Sumit Gulwani: either for making the current instance more effective or from there's this space of personalization.
Sumit Gulwani: and our opportunity to get there
Sumit Gulwani: would be to collect this kind of data which has this temporal aspect
Sumit Gulwani: and then use it to train foundational models with this kind of data, or to fine tune existing models.
Dilma Da Silva: Okay, very good.
Dilma Da Silva: The second question came when you were talking about visual studio supporting, debugging, of helping the user to debug. So it was about copilot pro providing fixes for the users. And the question is that
Dilma Da Silva: so the the
Dilma Da Silva: the these techniques can be applied if these techniques can be applied to across many domains of programming language, procedural function, object, oriented scripting and logic programming language, for instance.
Dilma Da Silva: The person who asked the question has been converting Python and Perl code into rust
Dilma Da Silva: are similar constructs available in Ros for each of these language types, so that kind of transformation.
Sumit Gulwani: Yes, so I'll break down that question into 2 parts
Sumit Gulwani: one is, what would it do to do? A. What would it take to do a more effective job on different kinds of debugging problems.
Sumit Gulwani: And the second question would be about the specific migration scenario that you might be interested in.
Sumit Gulwani: So on the 1st part what I focused on was
Sumit Gulwani: the importance of
Sumit Gulwani: letting the Llm. Figure out more information if it believes that it does not have the right information to answer the question.
Sumit Gulwani: and when it figures out more information.
Sumit Gulwani: it can either use the tools that are made available to it.
Sumit Gulwani: such as look at the results of a program analysis, or look at the errors
Sumit Gulwani: in a given watch window
Sumit Gulwani: or it can go back to the user and ask them some
Sumit Gulwani: more details that are not evident to the Llm. Even from the context.
Sumit Gulwani: In fact, you know, I think of it. Another analogy that I have is, you know, what happens in a courtroom
Sumit Gulwani: when the judge is presented with the various facts. The judge does not
Sumit Gulwani: announce a decision immediately.
Sumit Gulwani: The judge investigates
Sumit Gulwani: when they get one piece of investigation. Then, based upon that, they might actually investigate even more and figure out more questions until they feel confident that they have all the right information, then to be able to pass on the judgment.
Sumit Gulwani: And it's very important to be able to make the retrieval of this information iterative and also involve the user in doing this right? So this is what I focused on.
Sumit Gulwani: Now, what I did not talk about was that, of course, you know, there are some other domain specific aspects that are very important.
Sumit Gulwani: So one aspect was, how do users themselves
Sumit Gulwani: go about
Sumit Gulwani: doing this kind of debugging and fixes, and that workflow that they use
Sumit Gulwani: is also important to capture in this process.
Sumit Gulwani: So one thing that we captured at a very high level. Was that in order to suggest a fix you 1st need to localize. So if you look at the entire literature
Sumit Gulwani: on program repair. You will see that one of the 1st pillars there is that you need to 1st understand what the issue is, then localize where the bug might be, and then suggest a repair. So we do to incorporate this kind of Gendic workflow also into our agent architecture. And now you can start making it more specific. So if you're looking at functional languages or declarative languages, and so on.
Sumit Gulwani: It would be good to take a do, some case, study, or or some, you know, understanding of, how do typical developers go about fixing these bugs and see if you can encode that process inside this agentic architecture that I that I showed you right? So I talked about very general terms. But there's definitely opportunity, for we specialize these agentic architectures
Sumit Gulwani: to incorporate the workflows that humans have. So that's 1
Sumit Gulwani: but the other specific. You know. The second part, you know, that I would make out of your question is for the very specific application of migration, such as you want to convert C to rust.
Sumit Gulwani: or you want to migrate your code from an old version of Java to a new version of Java, or from an old version of.net to a new version of.net. So these are very sophisticated tasks, longer running tasks
Sumit Gulwani: might take months, you know, for people to actually do.
Sumit Gulwani: In fact, you know, a lot of work today runs on cobol
Sumit Gulwani: because that's verified software, right? You know our airplanes, and so on. It would take quite an effort to modernize these things. And now, with the power of Llms, we can start, you know, dreaming and thinking about this kind of software debt that we have in the society.
Sumit Gulwani: And
Sumit Gulwani: And the most important thing I would say here is involving the user. So when you have a sophisticated, longer running task, you know, errors at each step are continue to get multiplied, and you will end up with completely wrong translations or the system might get stuck in a completely wrong path.
Sumit Gulwani: So it is very important to involve user in the process. In this agentic workflows. It is very important to be able to backtrack, to employ some kind of search, and it is very important to have some kind of validation and verification loops as well. This is probably the place where you can bring on. You know some of our work in the space of program analysis and verification.
Sumit Gulwani: This is also the place where
Sumit Gulwani: this logical reasoning based techniques can actually be combined. You know, with this with these neural techniques. So this is this is probably the most happening thing that is in the world of AI today is multi agents. And if you're interested to learn more, you can actually watch out for the leaderboard on the suite bench benchmark. So that's 1 place where many organizations are competing against trying to solve these sophisticated software engineering tasks.
Dilma Da Silva: So the next question comes from Greg Hager. He's the lead here at size. In other words, my boss
Dilma Da Silva: and Greg says very interesting work and examples. One question he has is how this will evolve as language models evolve. For example.
Dilma Da Silva: an updated Llm. May produce different outputs, for example, than its potentially weaker predecessor. Do you have any ideas? How we, managing versioning of hints and prompts in the underlying Llm. Based technology itself.
Sumit Gulwani: So that's a a great question.
Sumit Gulwani: And
Sumit Gulwani: at a philosophical level, what I'm continuing to tell myself and make my choices as I pick up problems to solve
Sumit Gulwani: is to be very intentional about picking problems where you're not facing these headwinds.
Sumit Gulwani: You know, you think that is a problem with the models. You work on some problem only to figure out that your work is no longer relevant, because new version of the model, you know, does not need that it already, you know, solves that problem.
Sumit Gulwani: You know, you want to be picking up problems where you have tailwinds. So maybe you have a solution that does not work very well today. But your approach likely stands a test of time. And then, as models evolve, you know, your solution just automatically keeps getting better. So it's easier said than done. Because this is the constant, you know, worry on my mind as we
Sumit Gulwani: as we continue to do our own research
Sumit Gulwani: in this, in this space. Now, now, more directly answering your question
Sumit Gulwani: one of the problems that we have inside releasing these technologies inside real products is exactly around this model migration.
Sumit Gulwani: So we spend a lot of time.
Sumit Gulwani: please, inside Microsoft to deal with issues like, you know, responsible. AI
Sumit Gulwani: making sure there are no security issues and and so forth.
Sumit Gulwani: And when. And we also want to make sure that we are able to use the best of the models. So when new models come in, we want to migrate to those models.
Sumit Gulwani: and invariably what happens is that all of your benchmarking that you have
Sumit Gulwani: suddenly breaks down
Sumit Gulwani: as soon as the model switch happens.
Sumit Gulwani: And this is a place where you need to. Now rethink your prompts. So today I would say the prompting is still a very flaky business.
Sumit Gulwani: I touched a little bit upon it when I talked about prompt maintenance.
Sumit Gulwani: and one of the places where it hits us hard is actually, when model migration happens when you have to migrate to a different model.
Sumit Gulwani: it might be a more powerful model.
Sumit Gulwani: But the way you wrote the prompt may not be very effective, and you might get worse performance.
Sumit Gulwani: So now you are in a situation where you have to figure out how to update the prompt so that you get better performance with the new model.
Sumit Gulwani: And this is the opportunity for us to build, you know, some good software engineering practices here
Sumit Gulwani: you might have a huge benchmark.
Sumit Gulwani: but then, now, if you make a small change in the prompt, if you have to run through your entire benchmark, it's very expensive, also very time consuming.
Sumit Gulwani: How can we get some kind of quick feedback as to what part of the prompt. Should you change in order to fix this regression issue, or if you were to change this part of the prompt, what tests might possibly break.
Sumit Gulwani: And one interesting idea in this front might be to look at the attention mechanism of these models.
Sumit Gulwani: So if you can get heat, map
Sumit Gulwani: of what aspects of the prompt is the model paying more attention to
Sumit Gulwani: when it tries to do a certain kind of task, then it might give you some hints on which parts of the tests are more sensitive, to which parts of the prompt
Sumit Gulwani: and this kind of stuff might help you. Be do more agile software engineering.
Sumit Gulwani: Not
Sumit Gulwani: maybe some of these problems will go away once we get to even better and better models where these models are not as flaky with respect to how we write prompts. But today this is not the case. And I say that this is a big opportunity for us to think about our software engineering in this new world of
Dilma Da Silva: Okay, thank you. You know, we have comments from the audience about being a brilliant session, excellent responses, and insightful presentation. We also have a question.
Dilma Da Silva: how can we ensure fairness of metadata for any model? Are we following fair principles.
Sumit Gulwani: So Dilma did not get the question. Fairness of what.
Dilma Da Silva: Fairness of metadata.
Sumit Gulwani: I see? Yes.
Dilma Da Silva: So how can we ensure fairness of metadata for any model? And then are we following fair principles.
Sumit Gulwani: So I feel that fairness can be built at different layers.
Sumit Gulwani: So one is that these innovations, as they keep happening around in the world. You know, companies like, you know, big companies like open AI are constantly watching.
Sumit Gulwani: Which of these techniques is successful, and it becomes actually part of the model itself. So that is one layer that you that you actually get
Sumit Gulwani: the second layer where you can incorporate any of these responsible AI concerns
Sumit Gulwani: would be in trying to develop some kind of filter when the users query comes in. So that would be the second layer of defense that you can put in.
Dilma Da Silva: Hmm.
Sumit Gulwani: And then the 3rd layer of defense would be once the output is actually generated.
Sumit Gulwani: So again, the answer to this, you know, will be very specific for different kinds of domains where you're looking for this responsible AI aspects which I believe are extremely important.
Sumit Gulwani: And but generally answer that I can give is that there are 3 different layers where you can, where where this can be affected. Right? One is probably out of your control.
Sumit Gulwani: which is
Sumit Gulwani: the the companies organizations that actually develop these models. So they take care of it.
Sumit Gulwani: Thing that are in your control is to put a filter when the users input comes in and the query comes in, and then you can decide, how you want to transform, if at all, before passing into the model, and then the 3rd layer of defense would be when the output comes out, and then you figuring out whether it meets the responsibility, criterion or not.
Sumit Gulwani: Now to evaluate whether it meets the responsible AI criteria or not to develop these filters that I'm talking about, especially in the Pre. Pre. When the users query comes in, or or when the output from the model comes in, you can itself use Llm. Also, right? So there's a lot of work that is going on in in even train these Llms. To be able to pass a judgment on on responsible AI aspects.
Dilma Da Silva: Okay, we only have now 1 min. But there is a very interesting question. I'm you know. I'll read it. You probably won't have time to really go into detail. But it is about incorporating AI models into code that it's the code itself may be stochastic.
Dilma Da Silva: So when you're doing that in the programming process. So one example, you're using a computer visual model in an application with the computer, visual model itself may not always provide correct output.
Dilma Da Silva: and which itself may be evolving its capabilities over time.
Sumit Gulwani: Yes, so very fascinating observation. And what I will say is that
Sumit Gulwani: in this new world of AI programming, the best perspective that you can take is that you have a very powerful piece of technology at hand, which is these, you know, large language models.
Sumit Gulwani: but they are not a very reliable form of computation, so very powerful, but not 100% reliable and approximately correct.
Sumit Gulwani: And this is the place where I feel neurosymbolic methods hold the key to doing things.
Sumit Gulwani: So if you are able to evaluate the quality of the output of a given call to the large image model.
Sumit Gulwani: if you're able to reflect on it, and this can become the basis of doing some kind of search and backtracking.
Sumit Gulwani: So in domains where you have the generative verification gap. No, this is a slide that I showed you the Youtube slide. The talk from this Openai researcher that was given at Uw actually goes into this phenomenon that whenever you have a domain where validation is relatively easy compared to generation.
Sumit Gulwani: you have a very interesting situation to do, search and backtracking and reflection on, whether it was correct or not, but neurosymbolic solutions, you know, would be the key there, and search and backtracking.
Dilma Da Silva: Very good. Thank you so much for the fascinating talk. We're really very grateful for the Nsf people around in the talk. We will be, have the opportunity to talk more to
Dilma Da Silva: Dr. Sumit Gawani, in 15 min, but for the rest of the audience, thank you for being here.
Dilma Da Silva: Thank you so much sumit, and you should be hearing the big claps coming, you know, from all people watching. Thank you.
Sumit Gulwani: And thank you everyone for the wonderful questions. I really enjoyed this interaction, and thanks Lima, for the opportunity.
Dilma Da Silva: Thank you. Thank you. Everyone. Bye.
Sumit Gulwani: Bye.