Summarise the following transcript: david: So for the people that might've missed this…
- User
Summarise the following transcript: david: So for the people that might've missed this we've launched this initiative where we will translate Validated high quality prompts from English to different languages. And we've asked the Agilea community and the Hugging Face community to take the lead in terms of leading these translation efforts and communicating and all these kinds of things. So I think gathering, yeah, more and more high quality prompts for different languages, because sometimes these automatic translations, it can be off. And yeah, that's one of the reasons that we. Yeah. I want the community to help and pitch in and yeah, Krishna has offered to, to lead a handy example. So if if someone might be interested in that, feel free to pitch in and go to the hugging face discord. Go to the data is better together page and then you'll find it there. If anyone wants to do a brief introduction, feel free to say hi, or maybe tell us something, what you're working on, but otherwise I will maybe ask Elad Levi to give a brief introduction about what he's been doing on intent based prompt calibration. How that's, how that works. It was translated in a practical way into the super cool out of prompt open source project that you've been working on together with three friends, I believe. And how you actually built that on top of Argella and what's the idea behind that. So feel free to, to give a brief introduction. Glad to have all of you here and then I'll give the mic over to Elad. So you can start if you want. elad: Great. Okay. Thank you very much. Okay. So what we will talk today a little bit. So I will first describe the challenge of prompt sensitivity and I will show some very surprised results of how much large language models are really sensitive to the prompt. Then what I will describe is the previous methods for prompt optimizations and the issues that they have. I will then describe our contribution, our methods and how we tackle these issues. And then we will discuss a little bit about the auto prompt. So we build an open source system that implement these methods. And using also Argila as a UI server. So it's like a really cool system. And we will talk about the system and we'll show some demo. So about prompt sensitivity. So you have these two prompts. So in the first one, it's almost exactly the same phrasing. Just is does instead of is, adding some review. Cool. looking exactly the same. So if you will ask some human annotators and give it as an instruction to the annotators, I'm sure you will get the exact same results. There's no really difference. But when you're asking a large language model, you are seeing here that that the there is like very High discrepancy between the results. So we prepare some spoiler benchmark. It doesn't really matter what exactly was was this benchmark, but it's contained about 500 samples. We run these 10 times, so we get statistical significant differences. And you can see that there is a huge gap between the performances of the two probes. So GPT 4, which You think about it as state of the art very similar to human, but he perform significantly different on these semantic differences. Now, another thing that many people's are doing is they take this prompt and they like GPT 4 suggest a prompt. So we instruct GPT 4 to take this initial prompt and generate some prompt, which is better. And you can see that it looks really nice. You can see that is really describing the task of spoiler classification. And he add description of what is spoiler. So it's looking it looks amazingly well, however, the results are even worse than what we saw earlier. So there was no improvement. And although it looks good, the results are not great. So even if you if something is look good. When you evaluate it, the performance might be not that great. Another issue that we try to tackle is the prompt ambiguity issue. So when you have a prompt, you can see here the example of advertisement classification, yes or no. You describe the prompt in a few sentences. So always the ambiguity of the language. Of what to do in all the edge cases. So you see here the example of describing some situation of purchase. Some of the people will say that this is advertisement, and some of the people will say that this is not advertisement. There is this ambiguity. And this is something that we want to to resolve this ambiguity issue of the prompt itself. Now, the last thing that I want to explain about the prompt sensitivity is the changing in the behavior over time. So even if you have found a great prompt, You are satisfied with the results. OpenAI is changing constantly the version. They want to update the model, the knowledge base of the model. And you can see here that there is huge discrepancy between the results between the different versions, both with respect to the accuracy of the model on some tasks. So you see the GPT 4 has decreased accuracy on this task and GPT 3. 5 actually increased the accuracy. So it's really flickery, but also with respect to the behavior of the model, which is like even more important. So you can see that less stop apologizing or other behavior, for example, verbosity. So the behavior of the model constantly change and you need it to all the time update your prompt accordingly. So the conclusion is that we cannot try the prompt engineering process, the regular prompt engineering process. And we need to do prompt engineering correctly, doing some optimization, methodology correct. And there are a few methods that suggest how to do it. And I would like to describe a very recent work, which is called OPRO. And what we did, they did in this method is a very simple process. So they start with some initial prompt. Let's figure it out. So they try to solve some mathematical questions and let's figure it out. What's the instruction? It's like a chain of, you can think about it as a rephrasing of a chain of thought. And then they evaluate the score of this initial prompt. Okay. So they have the benchmark. They use a well known benchmark of GSM 8K. Okay. Okay. And you see the score 61. Okay. So the evaluation is done according to the benchmark. And then they took the prompt itself and the score and they provide it in, they put it in some meta prompt and the meta prompt described the task the task that need to be done. So he described that you have Few prompts and they score this data score and he asked GPT 4 in this case He asked the model to provide a new prompt which has higher score. Okay, so you provide few Samples and they score and you ask the model itself to provide a new prompt which has better score and you could Provide him also like few examples of the prompts in which there was a failure And then you can see, this is the new prompt that was suggested. Let's solve the problem. And now you continue the process. So you continue to evaluate this prompt. You put it in the meta prompt. And you let the model do these iterations until it gets to the calibrated prompt. This is iterative process. And you can see here the results that they tested on BigBench hard, and they got up to 50 percent improvement on 2023 challenging reasoning task. So they got some really nice improvement. So this is the OPPO paper. Now there is more recent work which called prompt engineering prompt engineer. I will not go into the full details of this work. This is work that simply did a prompt engineering on this metaprompt. We have the metaprompt that provide the new prompt. So they did just prompt engineering. many experiments. This is experimental paper. And I will not, most of the things they test actually not improved the metaprom, but they have something that we take from this paper of splitting up the to two to two steps such that in the first step, we provide the current prompt, a false example, like the error and ask him to provide some error analysis. And then we put this error analysis to the meta prompt to generate the new prompt. Okay. So this is the idea that we took and indeed, this is something that improving the results. Now, this metaprompt and using large language model as optimizer, the advantage of this approach for port optimization, that you can run it on every black box LLMs. You can run it on OpenAI proprietary model or Gemini. Whatever you like, you just use it on this black box LLM. However, the challenge with this approach that you need to iterate it with this very strong LLM, because the metaport requires strong LLM, on some high quality large benchmarks. So in order to improve it and give a good feedback to the model. You need very high quality, a large benchmark. And in many cases, this is not feasible or it's hard to get. either because there is a low resource task or the data set is a little bit biased. And of course, this is very costly. Running GPT 4 on very large data set with large amount of iteration in Opro they did About one thousand and six hundred iteration. So this is something which is very costly. It's get to up to a few hundred dollars. And we didn't have the money to do it. So we need to come with a new method which is much more efficient. So what was our idea? So our idea was very simple. You see you again, you give the model the initial prompt. Generate a spoiler movie classification, and then you see the nice UI for Agila. The model, the LLM model generates synthetic samples, so it generates about 10 synthetic samples. And you annotate them, yes, no, according to your labels. And so you annotated a few examples. And then after you finish this annotation you are letting the model optimize on top of this benchmark. So now we are using the same idea of Metaprom, where we provide this feedback, and we do the prompt optimization. So we get a new prompt, and we now generate a new synthetic data for the new prompt. Now the main idea that the synthetic data that we are generated are not like standards standard data set, but it's a boundary cases. So it's ask the cases that best differentiate between the different classes. So this is like the main tweak that we are doing. So this, since we are going on the boundary cases, we got very, distinguish very effective data set. Although we have a few samples because it can separate and isolate all these edge cases. So the idea is to calibrate according to the user intent and the user intent. You get it from these synthetic boundary cases. And here you can see the example. So what the model is getting is just the task description and the initial point. You see the the advertisement classification, yes or no. And this is the generated synthetic data that the model generate. We already saw it. It's really a boundary cases. So the model predict no, and this is a legitimate answer. But however, I was the annotator and I decided I want to be more conservative. And I told the model this example is indeed advertisement because you mentioned some company. And that in the next iteration, the model immediately understand and fix the prompt. And that he said that even if it was indirect advertisement. Oh, you just mentioned a competitor store. Then also in this case, annotated as yes. Now you see that now in this iteration, there was a synthetic data. In which there is no mentioning of of any company. So in this case, the model was over conservative. So it predicted as advertisement. Although I, as annotator, I said that it's not an advertisement. Again, this is an edge case. And after a few iterations, this is iteration six. The model catch all the nuance and get to the prompt accuracy of 97%. Okay, so he catch all these like boundary cases and was able to refine the prompt correctly. And it seems to work like very effectively. So about the evaluation process, so how we evaluate and compare ourselves to the previous method. So we want to evaluate ourselves on a real world use case, not on classic benchmark, reasoning benchmark like GSMK, because we thought that like these are not really a benchmark that, you take for, these are not real world use cases. So what We did a very simple evaluation process. We take very powerful model, GPT 4, and we provide very highly detailed prompt. You see this very high detail prompt for the spoiler classification task. So this prompt contain like all the nuance of what to do in all the edge cases, and it simulates human intent to a given task. And we use this prompt as a ground truth. So this is the prompt that was used to create the ground truth. Then we start with some initial prompt and try to converge to this prompt. We compare ourselves to the ground truth. And we compare between the different methods. We use the IMD review data set. This is a classical data set. And we test with respect to different tasks. And you can see the results. So on top, this is the red one is our method. And you can see below that this is Opro and the prompt engineering approach. And you can see that our method outperform previous methods. And you don't need too much samples with only between 30 and 50 samples. This is enough in order to get a very high quality results. And so you get to 30, between 30 and 50 samples. This is all that needs to be done. In all the cases we test on 30 iterations of the the model. So it's really not cost too much, not it's, it should not cost more than 20. So this is really nice. You can actually put the number of dollars that you want to optimize and optimize until like this stage. But of course we have some stopping criteria. If there's no improvement after fuel iteration, then the model stop to iterate. And you are not, david: okay. And yeah, feel free. If people have other questions in between, feel free to post them in the chat. Then I'll answer them later or leave viral. Sorry. And Chris had one question about is what's for you are goods. Number of examples to use a seed for the synthetic data generation when the task is a bit more niche for example, a medical domain or the finance domain, which might require a bit more funds. elad: Yeah, it's a good, from our experience again. using some 10, 20 real examples, and then let the model to generate about another 30. It's working great on many of the productive use cases that we saw. But of course, elad: We need. I need to look at the task in order to say exactly what is the number. And I'm suggesting to simply play a little bit with it. There are very few hyper parameters that you need to play with them. But again, the basic recipe, will work, I think very nicely also on this child david: yeah. So I'm not sure if you have any more comments from your side. Otherwise. Given that there are no more questions, I would like to thank you for the presentation. I really enjoyed it and I'm sure we will use the framework for some optimization with this label and potentially it might be interesting to see if there's a an integration possible. Yeah, as always the slides will be shared along with the presentation and everything will be uploaded for the people that maybe joined later. Keep track of YouTube and LinkedIn and other socials. And I would like to thank everyone for coming and then hope to see you soon to during one of one of our other meetups or somewhere online. So thanks. Thanks a lot for coming. Thank you very much. Goodbye.
- Assistant
David introduced an initiative to translate validated, high-quality prompts from English to other languages with the help of the Agilea and Hugging Face communities. This initiative emerged as a response to the sometimes inaccurate results of automatic translations. He also mentioned the opportunity for community members to contribute, specifically highlighting Krishna's leadership in a translation example. David then invited Elad Levi to discuss his work on intent-based prompt calibration and the development of a super cool open-source project based on this concept, using Argella as a UI server.
- User
What implications, advantages and benefits does Autoprompt help realise in business or enterprise domains?
- Assistant
- User
Unlike other 'prompt optimisers ' that purely rely on large language models to optimise prompts, what is the advantage of using human annotation in the prompt optimising loop? Explain using examples.What are the benefits, if any, of using both synthetic data and human annotation in this case?
- Assistant
- User
Explain how Autoprompt may benefit those working in financial domains, such as Quantitative Finance or Factor Investing?
- Assistant
- User
Does Autoprompt help align llms more closely with what humans want and expect? How could Auto prompt help a business get an edge in competition, especially when to it comes to boundary cases or edge cases?
- Assistant
- User
I have an an idea. I could use Autoprompt to teach a large language model how to detect scams more accurately, efficiently and reliably. Because scams can be complex and take advantage of human biases and scammers use this to their advantage.
- Assistant