Latest / Agentic Conversations (formally mlops.community) / Building LLM Products Panel // LLMs in Production Conference Part II
Transcript
- 0:00Hey everybody. We got a special edition of the
- 0:03Milos Community Podcast today. This was a recording of the
- 0:07panel discussion that we had at our most recent LM and
- 0:11Production Virtual Conference that took place about a month
- 0:15ago and I wanted to jump in and just let you all know that we
- 0:20will be having another one on October 3rd.
- 0:23We don't have the registration open yet, but we do have they
- 0:27call for speakers open. So if you or anybody you know is
- 0:32doing anything cool with LM and you're actually using them in
- 0:35production and you can talk about what you are doing and
- 0:39what some of the challenges that you had to overcome are, we
- 0:42would love to hear about it in our next LM and production
- 0:47conference. So without further ado, let's
- 0:49get to this panel about building products with LM's huge shout
- 0:54out to all of the panellists who joined us.
- 0:57And a very special thank you to my man Sam Charrington who was
- 1:02the host of this panel. If you do not listen to his
- 1:07podcast this week in Machine Learning and AI, go and check
- 1:10that out right now. And as always, it would mean the
- 1:13world to me if you share this with one person you think it may
- 1:18be valuable for And of course like subscribe.
- 1:22Give us a review, let us know what you thought of the episode.
- 1:26Where ever you are listening to this, let's get it.
- 1:29Back. Thank you.
- 1:31All so much for joining us. I think this is everybody.
- 1:35We're missing one person. Ah, we're.
- 1:37Missing Ah. Ohh man, you were the most.
- 1:41Important here. Alright, well.
- 1:45I'll let you all take it away. Thank you so much for joining.
- 1:47Us Alright. Hey, thanks so much Lily, I am
- 1:50in Hardy agreement. This is a very exciting topic
- 1:53and one that I get a lot of questions and comments around.
- 1:58Hey, Allons are super exciting, but how do we actually build
- 2:01products around them And that is what we're going to dig into in
- 2:05this panel. I will quickly introduce our
- 2:08panellists so that we can dig right into the heart of the
- 2:11discussion. We've got a Smith Arathusa Smith
- 2:14is a machine learning engineer. That prompt docs, where she's
- 2:18applying LCM's to enterprise observability.
- 2:21For DevOps engineers, we've got George.
- 2:23Matthew George is the managing director at Insight Partners,
- 2:27where he's invested in companies like Weights and Biases and
- 2:29Fiddler. We've got Natalia Barina, a
- 2:32former AI product leader at Meta, where she focused on
- 2:36issues like transparency, control, and explain ability.
- 2:39And we've got Sahara Moore, who's currently at Stripe, where
- 2:43he's leading the work around making LMAO.
- 2:46Bang at the company I am of course Sam Charrington.
- 2:50I am host of the Tumble AI podcast.
- 2:53If you've not come across the podcast, I encourage you to
- 2:56visit to malaya.com or your podcast platform of choice and
- 3:00check us out. We've got 600 plus episodes on
- 3:04ML and AI including rocks on LMS and generative AI for you to dig
- 3:08into. I asked our panellists for their
- 3:13spiciest takes on LM. And we've got some really
- 3:18interesting responses there, and we're gonna start there just to
- 3:22get the well started. Spicy and Natalia wanted to kick
- 3:26us off. With yours.
- 3:29A. Is that LLM?
- 3:31Hallucinations. Are a feature and non bug.
- 3:35Why people lie? We can't verify even what people
- 3:39say, so why do we expect that we'll be able to verify what
- 3:43machines are saying? And how can we even
- 3:46differentiate truth from lie? There's a lot of grey area in
- 3:50this. My again, The other part of it
- 3:53is I don't think we'll ever get rid of hallucinations if the
- 3:57Bulls aren't. Dry.
- 3:59Instead, the right thing to do is to use LNG for the right use
- 4:03cases where they can shine. In particular, that means around
- 4:07creativity and inspirations. And yeah, that's my hot, spicy
- 4:13take. Awesome, Sahara, why don't?
- 4:14You get a first I. Stick around for some time, we
- 4:20don't need to have great ways to mitigate those.
- 4:23So my end I actually think that open open source language models
- 4:26are the future and we got this recent paper from Berkeley about
- 4:30the false promises of open source and MMS. But at the same
- 4:33time, since methods released in last February of Lamma, we can
- 4:37think about our open source LMS can be quite powerful.
- 4:40So first they can run at the edge and which is a great fit
- 4:43for everything that is privacy related use cases and also
- 4:46independent of Internet connection.
- 4:48We have like great work. Like M CLM and also Lama CP,
- 4:52that gets us really close to being able to run this amazing
- 4:55technologies at the edge. Developers can fine tune them
- 4:58for specific purposes so you can achieve better performance or
- 5:01less compute and less latency. And they also give you a lot of
- 5:04flexibility without predefined constraints or policies, which
- 5:08is sometimes an issue, for example when you use the open
- 5:10eye. API and licencing is no longer
- 5:14an issue. We got some really strong
- 5:16powerful alms and that are now commercially permissible like
- 5:20Falcon at Microsoft Release and this paper Orca a few weeks ago
- 5:25that basically shows how. Smaller Lambs and operators and
- 5:29Lambs can also perform well and when you imitate the right
- 5:31things and not necessarily the style like maybe other open
- 5:34source Adams. So the exciting futures and
- 5:37looking forward to see what people will do with those and.
- 5:41My spicy take is that you know, we're all here because of the
- 5:44generalised ellens. Everyone's talking about it, but
- 5:47I think the future is going to be very domain specific
- 5:51specialised models where each company, each organisation data,
- 5:55they're propriety data is going to be the key going forward.
- 5:59Everyone's going to have their own data, have their own
- 6:02specialised models, and they're going to release these as like a
- 6:06model as a service where they the propriety data is going to
- 6:09be the big thing. I love.
- 6:11How all of our commentaries like somewhat interrelated.
- 6:14To each other. Mine is that we're going to run
- 6:17out of public corpus to be able to trade these large language
- 6:20models at scale. And that's going to happen in
- 6:22the next half a decade when let's just say the GPT 5 style
- 6:26models start to emerge. Mainly because you know we're
- 6:30approximately training on 20% of the human corpus and we've
- 6:33exponentially used every last run of generative pre trained
- 6:36model on scale up to this moment.
- 6:38So there's another 10X happening in terms of.
- 6:41Where the extent of the training data is going to come into
- 6:46training the next generation model literally publicly
- 6:49available human corpus. And so coming back to escapist
- 6:53point as well as the hardest point moment ago, we are going
- 6:57to move to a world where private data quickly on smaller form
- 7:00Thatcher large language models likely emerge into around open
- 7:06source. Which is where some of these
- 7:07small or large letters wells are most relevant?
- 7:10Is where this sort of. Half a decade and beyond, it's
- 7:13gonna go for the future of building transformer based
- 7:17architectures. Now, are these spicy takes so
- 7:20spicy that there's some argument that anyone on the panel would
- 7:25like to pick on any of the take we've heard that far, Or anyone
- 7:29in the audience, for that matter.
- 7:32Anyone jumping out to disagree? I guess I could go, I'm not
- 7:37disagreeing. But there is another point that
- 7:40the there are open source models, you know, like companies
- 7:43where like right now we're seeing so many companies out
- 7:46there that they're training, they're not training these
- 7:49models, but they're using LM's into their products without any,
- 7:53without the huge ML team, right. There's no management of VR
- 7:57training your whole ML pipeline, your whole ML infrastructure and
- 8:01with these. Open source like these APIs that
- 8:04Open AI cohere have. It's so easy for these companies
- 8:07that don't have an ML expertise to include LM's into their
- 8:11product. So I do see it coming from that
- 8:14side too. There's a role for services.
- 8:17Yeah. Yeah, I think if we were taking
- 8:20the other side of this argument, you can make a case that A, the
- 8:26quality of these smaller form factor open source models might
- 8:30not be ever as good enough as the large research houses.
- 8:34And with the effectively producing and over time the
- 8:39research houses that are producing these large language
- 8:42models are going to have additional capabilities.
- 8:45You know, like you know, the function libraries that emerged
- 8:47like Huggins that emerged. About a few months ago where
- 8:50there there's just going to be a general arms race where the open
- 8:55source community and the use of, you know, called the public
- 9:02datasets is not going to be enough.
- 9:06And you're going to see the research pages take on a lot
- 9:09more workload when it comes to leveraging private data,
- 9:13multimodal sets of data. And there's likely a chance
- 9:17that, like, you know. Sort of the things that are kind
- 9:20of being predicted at least as we we indicated can have an
- 9:23alternative feature. So you could kind of argue very
- 9:26easily for the the, the counter billing point here that this is
- 9:30all going to stay very much in the hands of three or four, you
- 9:34know, well funded research jobs being open.
- 9:38I could hear anthropic I21 as the continued leaders in the
- 9:43space, but it doesn't seem that way right now.
- 9:46It does seem that there is there there is a prevalence.
- 9:49Towards smaller per factor models and open source and in
- 9:52particular. Actually just maybe adding one
- 9:55that is you could look at timeline.
- 9:56So I actually think that at some point it will be point source
- 10:00models will be good enough. So now we have GPT 3.5.
- 10:03We already have models reaching this level of performance.
- 10:06So maybe in one year from now we will have a GPT 4 or even more
- 10:10than that potentially. I know it's kind of hard to
- 10:12think about it at this point, but if we take history so far
- 10:16and we believe that some of those papers about open source
- 10:18models achieve this. Performance.
- 10:20So I think it's a matter of time we get there.
- 10:22And then the other question is potentially as we are building
- 10:25products in production, what are the requirements for such
- 10:27products? Do we actually need a GT4 like
- 10:30model to do question answering on documents or answer very
- 10:34specific questions. So I think that as we build more
- 10:37picks and shovels in this space, we improve on evaluation.
- 10:40We better understand what are the use cases we would like to
- 10:42serve and get better results even with smaller and open
- 10:45source model. But this will be an iterative
- 10:47process. Well, we'll touch on all of
- 10:49those themes and in particular model selection a little bit
- 10:53later. I want to take us to one of the
- 10:56very first issues that a product builder needs to think about,
- 10:59and that is the degree to which their use case is a good fit for
- 11:03LM. Right now, LM's are this shiny
- 11:05magical hammer and everything is a nail just waiting to be
- 11:08smacked with it. But Natalie, you've got some
- 11:13really interesting experiences thinking about applicable use
- 11:16cases for LLM's and AI generally, and I'd love to hear
- 11:19you time on what you've, you know, frameworks for thinking
- 11:24about this. And in particular, are there
- 11:26kind of recurring use cases that people get excited about that
- 11:29are ultimately doomed to failure because they're not a good fit?
- 11:33If you want to throw that spicy, take in there.
- 11:35Yeah, yeah, absolutely so. I would start off by talking
- 11:41about what are the fundamental characteristics of LM that
- 11:44really make them shy. And it's really about fluency.
- 11:49So This is why LM's are a big deal and why everyone's excited
- 11:55about them. They have this uncanny ability
- 11:58to give answers. They're surprisingly human, like
- 12:01This is why we have so much time.
- 12:06And that's really what fluency is.
- 12:08The ability to articulate very natural sounding answers that
- 12:12are human like and that. Is their.
- 12:15However, on the other hand, as we have already touched on, we
- 12:20have also hallucinations, or as other people like to call them,
- 12:25confabulations, where LM sound perfectly plausible, however can
- 12:30be disastrously wrong. We can't trust them.
- 12:35And so a way to think about a framework for use cases around
- 12:41is around 2 axes and you can visualise the accuracy as these
- 12:46kind of on the on X. So it's your horizontal and I
- 12:50think about fluency as your vertical axis.
- 12:54And then you know, you could you could kind of map your youth
- 12:57pieces along those two lines and if you do that, you will see
- 13:01that places where you don't need accuracy when you might need.
- 13:05Who need fluency and really benefit from LMS or things like
- 13:10writing a greeting, writing poem, writing fiction, writing
- 13:15children's stories. So these are really creative.
- 13:19He was cases where you need fights and inspiration, then you
- 13:22could think about you know other.
- 13:25On the other end you might have use cases where you need a lot
- 13:31of accuracy but you don't need fluency.
- 13:33So these are really about. Being precise on the information
- 13:38and getting the right answer. Um, so really to me those are
- 13:42kind of the tool buckets, the creator and productivity use
- 13:46cases versus the second bucket which is more around decision
- 13:49making. So I'd consider, you know, like
- 13:53where did you argue cases fit along those two lines And once
- 13:57you map them, I would recommend thinking about, you know, what
- 14:00is your business decision framework.
- 14:03And there's really a few aspects of that, and they are, well, our
- 14:07LLM's going to make your business obsolete, go all in and
- 14:11invest. Two, can they boost your
- 14:14revenue? So this might be customer
- 14:17support, call centres, et cetera.
- 14:19Then you have to think about your builder.
- 14:21Bye. 3rd, can you help, can you get a competitive advantage and
- 14:26this is like that vertical scenario that that is beautiful
- 14:30and if we see those come to fruition and then finally you
- 14:35might be in a position where you just you know LM make no impact
- 14:39to your business and product and.
- 14:41You could experiment. But you don't really need to
- 14:44apply them. So those are the two two kind of
- 14:49frameworks. One is around use cases and then
- 14:51the second one is around making that business decision and
- 14:54seeing what your situation is before making an investment or
- 15:00before even beginning to experiment, which I I highly
- 15:04encourage everyone to experiment at.
- 15:06That's pretty cheap. And then click.
- 15:09That's where I'm going to conclude.
- 15:10Anyone want to jump in and elaborate?
- 15:14I can add a few like to send so from my experience and it's
- 15:19right but also elsewhere like the biggest gap that will make
- 15:22us work more with them and feel more confident it actually again
- 15:26like evaluation and so in the world.
- 15:28Let's imagine a world where we every time we change the prompt
- 15:32we can immediately know how it well performs on like biassed
- 15:35society. How often are the glycinate and
- 15:38also? How it correlates with our own
- 15:39performance benchmark then I will be a lot more confident
- 15:43deploying something just production.
- 15:45So in a way it reminds me of how like deep learning and machine
- 15:48learning what decade ago where it was really we all like a bit
- 15:51scared to deploy something to production because my ideal the
- 15:54result don't expect. But then evaluation monitoring
- 15:58like what we now call ML OPS really made it a lot more easily
- 16:01and and streamlined and therefore increased confidence
- 16:04in applying these kind of. Here's a real element that I see
- 16:08a lot, particularly on the part of, you know, product owners,
- 16:12executives, they, you know, it's easy to get enamoured by a
- 16:17ChatGPT demo. But when you think about the
- 16:20brand risk, that's possible when your LM, your customer facing LM
- 16:25starts. While hallucinating publicly, it
- 16:30really, you know, put some pause in, especially with the
- 16:36valuation frameworks not fully, fully baked.
- 16:39Has anyone come across any useful ways to kind of drive
- 16:45team alignment and alleviate that kind of fear, Natalia?
- 16:49And I would recommend. Plug for my own work, but one.
- 16:54Of the things we developed at Meadow was something called an
- 16:58AI system card and it's essentially a way to publicly
- 17:02report on the risk and to present the evaluation.
- 17:06And actually this is what chat TPT did or Open A I did with the
- 17:10latest version of GP is they published their AI system card
- 17:17and they literally went through and they said OK, this is how we
- 17:20looked at all the safety risks, this is how we.
- 17:23The weighted toxicity. It's a very exhaustive document.
- 17:28There's 40 pages. There's a lot in this space.
- 17:33And the other thing I would say is, you know, you have to think
- 17:36about evaluation is expensive. Evaluating your AI product, it's
- 17:41gonna take time, it's gonna take resources.
- 17:44So you have to figure out like you know how much and you can
- 17:47you do. But I think everyone should
- 17:50absolutely do it. And I encourage people to go
- 17:53through and look at the T4 System card, which is a really
- 17:56good guide for a very comprehensive evaluation of an
- 18:00LLM and all sorts of issues that can go, you know, we we
- 18:03mentioned privacy here and just robustness bias.
- 18:09Toxicity. There's so much in here.
- 18:13Yeah, there's there's a lot to do.
- 18:15Yeah, yeah. Prompting is obviously been
- 18:19raised quite a bit at this event so far, and it's core to LM and
- 18:25it's in a lot of ways a new way to create software and systems
- 18:29with the rule book that's being developed as we speak.
- 18:33That the can you talk a little bit about your experience with
- 18:37building prompt based applications?
- 18:40Sure, I would love to. I think prompting is a whole
- 18:43topic on its own. We could do like a whole panel
- 18:45just on that. I've you know for the past six
- 18:48months, it's the whole like how we build the application.
- 18:52It's changing so much with these prompts and you know with tools
- 18:55like Lang chain out there, it's very easy to get a POC out over
- 18:59a weekend. But now pushing that POC,
- 19:02pushing your idea into production.
- 19:04That's the hard part. And there are a lot of things
- 19:06that you can actually do with Prom.
- 19:08And let's take take for example like you know, one use case that
- 19:14everyone's been talking about is like a document question
- 19:16answering system and. You can provide a lot of contact
- 19:21along with the prompt that you develop and this can be you know
- 19:26document one with it, URL one document 2 with the with the
- 19:31significant URL. But how the output comes out,
- 19:35you can always structure this output.
- 19:36You can prompt it say hey I want this output in a particular
- 19:39format. I've seen that help a lot.
- 19:41Let's say like you want it in a JSON format with XYZ and you
- 19:46know markdown tags, all these hell but.
- 19:49Another thing that also helps is adding examples.
- 19:52Lots of examples, relevant context into your prom has
- 19:56helped a lot for me at least. It's like a week RHF.
- 20:00Kind of like a few shot examples that you can add within your
- 20:03context of your prompt. But not just adding examples of
- 20:08how you want this prompt to complete.
- 20:11But you can also get a lot of people say, hey I had examples
- 20:15that overfits to these examples, but another way to overcome this
- 20:19overfitting. Is by adding this relevant
- 20:22examples of the contextual retrieval everyone's talking
- 20:25about with like vector databases out there.
- 20:28Fetch the relevant context and you can provide a list of
- 20:32examples there and you can do vector database search like
- 20:36semantic similarity search from what is the user's query.
- 20:40Get relevant context added into your prompt and that that has
- 20:44I've seen do a great job there. Another thing when it comes to
- 20:51getting these lens into production is that I've faced is
- 20:56the latency. Right as you change prompts.
- 20:59You know there's so many agents chaining of prompts, latency has
- 21:02been a huge issue and you can actually solve this by a lot of
- 21:07UX features. Depending on your use case, you
- 21:10can. You know streaming is a great
- 21:12thing that we've seen chat DPT do.
- 21:14You don't feel the latency because ChatGPT keeps throwing
- 21:17you throwing you these messages. Another thing is you could you
- 21:22could let your Proms into multiple things like for example
- 21:25like documents searching first, fetch the documents, provide
- 21:27that to the user, let the user look into the documents while
- 21:30you fetch the answer. So splitting your prompts and
- 21:33getting intermediate messages out there is does wonders, and
- 21:37hiding the latency is what I've seen.
- 21:40And yeah, I think that's my overview.
- 21:44Like a really short overview of like prompting tip that eye
- 21:47blur. Awesome.
- 21:50So how are you? Have a take on that.
- 21:52Yeah, I mean one maybe one thing I found really useful for
- 21:56avoiding illucinations. So first we know the normal tips
- 22:00actually like act as something we think about GPT and LMS is
- 22:04this huge tree of many activations neurons and you
- 22:07always want to help it understand what we expect it to
- 22:10do. So the more information you can
- 22:12provide within the problem and help it know what past activate,
- 22:15the easier it will be for it to help you in achieving your goal.
- 22:18So specifying the format. Times stating what role it
- 22:22should act is always been useful.
- 22:24One concrete tip for avoiding illucinations within the prompt.
- 22:27In many cases you can pick out. I think about NLMS as like this
- 22:29satisfiers so they always want to provide you with an answer.
- 22:32So just by giving it an out they will actually follow.
- 22:36So for example, if you want to classify an Amazon review as
- 22:39positive or negative, but maybe sometimes you're missing context
- 22:42or you're getting input that is not a review, you can always ask
- 22:45it to provide maybe like, say, otherwise return and a or error
- 22:50and then. You're doing so it will actually
- 22:52avoid losing an answer that is actually wrong.
- 22:55And and and return an NA or some other predictable form.
- 22:59And talk more broadly about your experience combating
- 23:03hallucination. You know, what kinds of things
- 23:06have you run up against that stripe and and how have you
- 23:08approached it beyond that? This prompt trick you mentioned?
- 23:12Yeah, so I mean first illucinations where Elms makes
- 23:16data makeup data that is incorrect.
- 23:18And I feel like what's the main difference between other ML and
- 23:21deep learning models before is that they do it really
- 23:24confidently. So it's really hard to tell if
- 23:26it's actually wrong or not. That's one of the biggest
- 23:29shortcomings and building up on Natalia's point is very use case
- 23:33dependent. And so if you are doing working
- 23:36with the brainstorming partner, one thing versus building, maybe
- 23:39have behind the scenes classification model or.
- 23:43Pipeline that will then have substantial downstream tasks.
- 23:46So first about illumination and understand what is your use
- 23:49case, What is the impact of mistake?
- 23:52Then wait to mitigate hallucinations.
- 23:55And what I've seen very useful is first giving the 11 out as I
- 23:58mentioned, but also prompt chaining.
- 24:00So there is like a few approaches like self reflect and
- 24:04also like another video I've seen recently Smart GPT, where
- 24:07you basically ask the ask a question and you ask the LM to
- 24:11criticise the answer as an expert in this space and then
- 24:14provide even the resolution. And by doing so, it increases
- 24:17performance and substantially at the cost of latency and cost.
- 24:22And so that's another. Idea like prompt chaining and
- 24:24and kind of. You get an answer and you check
- 24:26if the answer is is actually the.
- 24:28And another option and mitigation path is actually see
- 24:31patients. So forcing the LM to quote the
- 24:34source for its answers and it's really useful for using
- 24:37hallucinations. And it will also allow your
- 24:40users or yourself to check if the generated the response makes
- 24:44sense. So you can actually go to that
- 24:45page in that PDF and see if this makes sense.
- 24:49And lastly, I've seen this is relatively nascent and recent.
- 24:52There is this research called LM Blender from Allen Institute of
- 24:57AI where they used they combine multiple LMS so each LM kind of
- 25:01peaks in different areas. So if you combine them all and
- 25:05know which one to call in the relevant time, they might help
- 25:08you prove performance overall and the voice of the nation.
- 25:11Yeah. What we're seeing a bit of that
- 25:12in some of our companies that are more advanced work here.
- 25:16So Jasper, for instance, is a great example of someone who's
- 25:18actually. Using a blender style model to
- 25:21basically orchestrate across multiple lens to just understand
- 25:25and produce the best results where there is effectively you
- 25:29know sort of mics in the latent space of the model.
- 25:31One of the other areas that we're also kind of noticing has
- 25:35pretty significant amount of opportunity is where you can
- 25:40take call it visualisations of the latent space of a model and
- 25:44be able to understand where there's practically holes in the
- 25:48Latin space and. The folks that had a gift for
- 25:52all the Novak team was actually doing some pretty impressive
- 25:54work here in terms of visualising the latent space of
- 25:58the model and then helping understand where to introduce
- 26:01additional retraining runs to improve the fidelity of models
- 26:05overtime. So that's that was a called
- 26:07pretty exciting area that we're seeing opportunity particularly
- 26:11when you're dealing with a lot more small factor models that
- 26:14you're trying to train for domain specific purposes like
- 26:17retraining based on. Where there's missing
- 26:21developments, the data set trained, latent space properly
- 26:25is something that's exciting. George and one of the earlier
- 26:29sessions, Josh Robin had this great point about the the
- 26:32companies that we really admire for doing a great job with AI.
- 26:36Tesla was an example he gave. Didn't just kind of throw out
- 26:39this model and kind of declare victory.
- 26:41They built this continuous feedback and improvement loop
- 26:45around their product and that's really the, the differentiator
- 26:48and why we admire those companies.
- 26:50What have you seen? In terms of companies building
- 26:54these kinds of feedback and improvement loops around LM
- 26:58based models in the wild. Yeah, I'm glad you asked that
- 27:01question to him. I I think when you look at the
- 27:04best MLM's and just transform based architectures that are
- 27:08going to continue to evolve in this space, they're inherently
- 27:12all going to have some reinforcement learning
- 27:15associated with them. And whether that be a human
- 27:17feedback loop, a machine feedback loop, a human and
- 27:20machine back loop. I mean, just think about the the
- 27:23fundamental difference between what we saw with chat cheap T
- 27:28early on and. More recently, right.
- 27:31It wasn't just the fact like it started to evolve the model
- 27:36itself. And you know, why are there sort
- 27:38of so many less hallucinations around?
- 27:40Check GPT today. Well, it turns out that it is
- 27:43the feedback loop itself. It's the RHF that improved the
- 27:46model effectively over time. So I think we're going to see
- 27:51quite a bit more, call it model fidelity model interfering by
- 27:56the fact that there is just good feedback loops, just naturally.
- 28:01Part of any sort of, you know, call it.
- 28:05Model that's being built for the purpose of these domains as
- 28:09they're kind of proving the application experience around
- 28:12it. I don't think this is a journey
- 28:14where you kind of just send the model off into production and
- 28:19then never call it improve it beyond just introducing the next
- 28:24generation of the model. I think in most cases there's
- 28:27going to be some feedback loop for reinforcement learning
- 28:30that's going to continuously improve models of fine.
- 28:33And when we think about that kind of continuous improvement.
- 28:36Improvements, you know, it's hopefully relevant or related to
- 28:41some kind of evaluation metric. We touched on evaluation
- 28:45previously, Sahar, dig into that a little bit deeper.
- 28:49What would have you seen working from an evaluation perspective
- 28:52for these kinds of models? Yeah.
- 28:54First of all done by saying that I'm too surprised how we asked
- 28:58quite behind on evaluation as as a community like I space, it
- 29:01doesn't prevent us from running past and deploying production,
- 29:04but still there's something to be made there.
- 29:07I know that many folks are working on making operation
- 29:10better like lynching and other smaller startups, but it's still
- 29:14a gap and I feel like when it comes to valuation there are a
- 29:17few ways and I we go about that. So the first one is you know
- 29:21automated manner so some papers have used.
- 29:24LM secretary before to score the generations.
- 29:28So because generations are more like open-ended text, more
- 29:31subjective and alms lend themselves really well.
- 29:35One useful tip is actually use. If you're using GPS for frequent
- 29:405, you should use GPT 4 to to judge the inferior model.
- 29:44So using superior models to judge inferior models works work
- 29:48actually surprisingly well. And you also need to make really
- 29:51clear what are your kind of metrics and what you're
- 29:54measuring. For example, you might want to
- 29:56have a benchmark or a set of examples for illumination.
- 30:01The more examples about electricity and what you define
- 30:04in your company as things that you do not make their way into
- 30:07the user. You might want to have more
- 30:09performance products, performance specific benchmark
- 30:12for specific use case. So hopefully.
- 30:15We will get more and more tools that help us to streamline these
- 30:18processes and and I expect other players like laying chain ways
- 30:23and biases also released a few goals to help us get it there
- 30:26and but still it's a lot more manual than we I have expected
- 30:31it to be at this point. Smith, what have you seen?
- 30:34Yeah, I think I I chime in with Sahar like what he said.
- 30:39I think another thing to bring in is prompt versioning.
- 30:43That's been a big thing, prompt versioning like you change a bit
- 30:47of your prompt it it can change like the output of something
- 30:50that worked before and it deviates though benchmark
- 30:54questions, that's been a big thing.
- 30:56At Prom Dobbs, we have like a bunch of benchmark questions
- 30:59that we have that that we want to evaluate against.
- 31:03And another thing is that like the harm mentioned, you could
- 31:06have like GPT say, hey do you think this answer is similar to
- 31:11the answer that I expect? Right.
- 31:13And we could even do what I've done before is have like a
- 31:17scoring method where you have hey this is the question, these
- 31:20are the keywords I expect in the output, right?
- 31:23It doesn't have to be the exact output, but these are the the
- 31:25answer should be having certain keywords.
- 31:28These are the significant keyword and you could check
- 31:30against those keywords. And the other one is you could
- 31:34do like a quick semantic similarity.
- 31:37Do you think that this answer is similar to this answer?
- 31:39How the score and you could have like a whole evaluation score
- 31:43like weighted against these and another thing to make sure is
- 31:47that the benchmark questions that you have should span across
- 31:50multiple areas. It shouldn't focus and adding
- 31:53flying benchmark questions, just keep adding them in and it it's
- 31:57not going to you know, you could keep running this maybe daily or
- 32:02at some frequency and see where that deviate.
- 32:05Actually, I'm I'm curious, Smita, how do you track all
- 32:08those feedback requests and responses from music?
- 32:12Something in production? By feedback request, do you mean
- 32:16like the? You you found the new case where
- 32:19your LMS events as well. Yeah.
- 32:24So I think at that point you have that what what is that
- 32:27question that deviated and I would think about like what is
- 32:31the answer that I expected at that point what did the user
- 32:34expect? And then I could add that to the
- 32:36benchmark or I could even add like as I mentioned earlier
- 32:40examples my whole like I like the semantic like the vector
- 32:44store database add some examples there to improve the improve
- 32:49like the output at that point. And that something that you know
- 32:52you need to have like and George said that you need to have this
- 32:55entire feedback loop and it's all there's there's no right way
- 33:00to do it and there's no nothing right now.
- 33:02So it's going to keep evolving. And are you finding that you're
- 33:07able to put all that feedback back into the process through?
- 33:13Through prompting or through RHF, or you also needing to
- 33:18apply heuristics, regexes or whatever those might be to.
- 33:23You know to enforce constraints on the LM, it's it's definitely
- 33:27a lot of like you mentioned like regex matching.
- 33:31I think that's been a big thing because it's not just going to
- 33:35be that the output like it's not going to be that the output
- 33:38always is going to follow the same format, right.
- 33:40I'm going to prompt it to it can go, it can go some way.
- 33:44So making sure that like the J maybe like the Jason format or
- 33:49like tag things like that. I think like Open Eye came up
- 33:52with the function calling yesterday that they released.
- 33:55That's a huge thing that the model's been fine-tuned on.
- 33:58So that's that's where that's where it's heading.
- 34:01People know. Regex and and heuristics as The
- 34:04Dirty secret of the big. Guy and.
- 34:10Exactly, exactly. So we we've talked about
- 34:13chaining Blender pipelines, all these things.
- 34:20One of the, you know, the challenges that they introduce
- 34:24is these API's aren't free. You know, whether we're talking
- 34:29about open AI or inference, calls aren't free.
- 34:32So there's an economic component that's particularly important
- 34:35for folks that are trying to field products.
- 34:38Natalia, can you talk a little bit about how product builders
- 34:42should think about the economics of these kinds of models?
- 34:47I think everyone on this panel does.
- 34:48Is that the more explicit detail and examples you put into a
- 34:52prompt, of course, the better model performance, as Sahara
- 34:56talked about, one of the ways to assuage some of the
- 35:00hallucination issues. But that means that you get, the
- 35:05more expensive your inference will get with those longer, more
- 35:09detailed Proms. So I think that's, that's the
- 35:11first thing you understand. Yeah.
- 35:14If you think about Open AI, they charge both for input and output
- 35:17tokens depending on the task. It you know, it adds up, but
- 35:22overall prompt engineering is still pretty cheap and easy way
- 35:28to experiment as opposed to building a whole ML.
- 35:32Product. So I'd encourage people to
- 35:36really use prompt engineering. You know, the next thing I'd
- 35:40say. Is set up your experiments, and
- 35:42be very. Experiments are not free, so be
- 35:45very thoughtful about how you set up your experiments.
- 35:47Make sure you're solving the right problems.
- 35:51Set clear expectations depending on like.
- 35:53I've worked in large organisations, which means a lot
- 35:55of alignment. A lot of.
- 35:57Buy INS You have to explain to leadership team, partner teams
- 36:01what are what kind of expectations they should have
- 36:04from your experiments and minimise the risks.
- 36:07Time box or experiments. Think about build versus buy and
- 36:10have a clear data story. Umm, so I would say you know all
- 36:15of those things. Experiment in order to figure
- 36:18out your cost, and then I would say the second part is something
- 36:24we had already alluded to in the earlier conversation.
- 36:26Consider smaller models. Smaller models will be cheaper
- 36:30and there will be trade off around accuracy, but that might
- 36:34be a really good way to minimise your cost.
- 36:37Umm. And yeah, those are my
- 36:41recommendation. I want.
- 36:42I want to hear what? What other people think?
- 36:48Yeah, I was curious from George's perspective as an
- 36:50investor, you know you you're seeing a lot of these economic
- 36:53conversations. You know what our how our
- 36:57founders kind of thinking about it and having those
- 37:00conversations with their investors.
- 37:02Yeah, I'm glad you asked that. I think we're seeing
- 37:04particularly some of the. In the companies that are more
- 37:10call it earlier in their growth journeys, they're the ones that
- 37:13are experimenting faster and trying things in a way where
- 37:19they're bringing products to market in literally weeks,
- 37:22right. So give you a good example, mid
- 37:24stage growth company Honeycomb is in the observability market,
- 37:28right and they built you know next generation of their ability
- 37:31pollution. They introduced a better query
- 37:33builder though that instead of. You know, asking questions from
- 37:38a distributed tracing standpoint, using a very
- 37:41esoteric query builder to ask the question, they introduced a
- 37:44natural language overlay. Now very, very straightforward
- 37:48to introduce something like that using a finely tuned 11 or you
- 37:53know, introducing a product feature like that within weeks.
- 37:57And interestingly, that became, I would say, the most actively
- 38:03used feature inside of the Honeycomb product within.
- 38:06Two days of it launching. And so that ability to just kind
- 38:11of try something, experiment, iterate launch and moving
- 38:15quickly is something we think is a pretty profound opportunity,
- 38:19particularly for any startup that's going through this
- 38:22journey. We're also by the way just
- 38:23quickly finding the fact that a number of larger scaled out
- 38:27combines have a pretty tremendous advantage here, which
- 38:30is the private data itself over time.
- 38:33We don't think this is a moment where it just incumbents will
- 38:36fall by the wayside. Because just generative AI
- 38:39movement is happening. It actually turns out they have
- 38:41one of the the most important weapons inside of inside of this
- 38:47scale and capability that's going to occur in this space and
- 38:49that happens to be the private data itself.
- 38:52And capital. Hi, Capital.
- 38:55Sahar, you wanted to jump in? Yeah, just adding on that point
- 38:59about how do we, how do we make it make sense from a cost
- 39:02perspective. Also fine if you have longer
- 39:04like context Windows fine tuning is also quite helpful.
- 39:07We have found that it's fine the model, it's a one time pass you
- 39:11have to pay, but then future generations will have weight
- 39:13loss prompts and toolkits or weight loss token tokens.
- 39:16And then another metapoint is usually what I've seen is we
- 39:19have two different type of companies, right.
- 39:21We have the enterprise companies which so far I haven't heard
- 39:24from anyone working in this space, Not only it's right, but
- 39:27in general. Having cost is an issue, so
- 39:29given the impact that usually has on the bottom line business
- 39:33and for enterprise companies, it's still not a blocker for
- 39:36startups. I would encourage actually
- 39:38startups to currently kind of put this aside.
- 39:40Of course there will be a path for this becoming cheaper and
- 39:42cheaper if you look at the trend from the last 12 months or so.
- 39:45And items are becoming cheaper and more powerful.
- 39:48So I wouldn't let anyone kind of be blocked by this profit
- 39:51margins unless it makes no sense.
- 39:53And then that's a different. Yeah, I totally agree they're
- 39:57working on a startup like it. If the cost isn't a huge concern
- 40:01right now because the value to the customer and the
- 40:04expectations of the customers increasing, they do always
- 40:07expect like, yeah, I just want to ask it in normal English,
- 40:11right. That's always been like I don't
- 40:13want to remember this query language.
- 40:15That's one thing. And coming to Natalia's point
- 40:18about like the tokens you are charged for the input tokens and
- 40:21the output tokens, those adding prompt engineering to constrain
- 40:25right constrain your output. You could either say you know
- 40:28like if if your use case is like some summarization use case,
- 40:31keep the length to to like a short extent because we've seen
- 40:35that the completions can go on and on.
- 40:37So constraining it having like the formatting, output
- 40:40formatting expectation that can reduce it, as well as semantic
- 40:44caching if that's something that for your use case it makes sense
- 40:48if you don't need the completion to happen every time.
- 40:51If the similar question have been asked before, just get that
- 40:54out. But you don't need to do API's
- 40:56opening API calls all the time. 11 quick observation I want to
- 41:00make. We're talking about costs, but
- 41:02in reality for enterprise they're at the very beginning of
- 41:06the journey where they're stared at the wrist and even wading in.
- 41:09And so once they get past that the I think costs might be a
- 41:15consideration. But by that time I think the
- 41:16cost will be so reduced. We're seeing every day we're
- 41:19seeing smaller and smaller models on edge.
- 41:21There's been super excited about and open source, I think
- 41:25increasingly like the story didn't costs changing very
- 41:28quickly? Costs are coming down very fast.
- 41:31Yeah, yeah, I think we're coming up on time, but I don't see
- 41:34anyone here to kick us off, so we'll we'll pass.
- 41:37On the other. Question.
- 41:39Well, I think we're doing a service until someone comes and
- 41:43says for the next session we did say we wanted to come back to
- 41:48model selection. You like one more question?
- 41:54OK, perfect. You know we've we've throughout
- 41:59this talked about how there are new models emerging all the
- 42:02time. We just talked about how the
- 42:05models, you know, there are smaller models, bigger models.
- 42:08You know, still. You know there are advantages,
- 42:13advantages to to both of those. So our talk a little bit about
- 42:17your experiences from a model selection perspective.
- 42:20How much time are you thinking about when you are approached
- 42:22with a new product opportunity, you know what's the the right
- 42:26model to start with and and where do you start that
- 42:28conversation? Yeah.
- 42:30So and we usually think about the way right, we have the open
- 42:34source models and the commercial models on the commercial side
- 42:37and coming from more of an enterprise perspective.
- 42:39The number one sector to start experimenting is what you have
- 42:42access to. So like getting something off
- 42:45the ground and working with cloud from a profit requires
- 42:48requires agreement the same way that open the Eyes and Azure on
- 42:51the other cloud provider. So usually if you want to
- 42:54experiment I will go with what's most available at this point.
- 42:57But then when it comes to performance it's still like it's
- 43:00all comes back to evaluation. I'm so excited about this space
- 43:03and there is a leaderboard and there is also like also
- 43:07leaderboard for. Vector the basis and embeddings
- 43:11we're supporting the channel in the chat, So what we usually do
- 43:15we start with something like GPT 4 which is usually the most
- 43:19performant. If it works correctly.
- 43:20Well we can always downgrade because you 3.5 cheaper, but
- 43:24more importantly faster and so depends on the use case.
- 43:28But I would advise folks to start with the most the more
- 43:31powerful model, see if it works really well, iterate the problem
- 43:33and then potentially downgrade if it makes sense.
- 43:36And then when it comes to open source models, I feel like the
- 43:39more we will build our own. Aviation, it's literally in the
- 43:41last four to 8 weeks and this amazing progress is happening.
- 43:45The easier it will be for us to also incorporate these models.
- 43:47And lastly I will say companies like AWS launching Sage Maker
- 43:52like with Laughing Face and other also bedrock and and these
- 43:57kind of generativity capabilities help us all
- 43:59experiment a lot faster. So we would expect probably in
- 44:02the next six months or so we will have a smarter engines
- 44:06slash layer do allow us to plug different language models and
- 44:09experiment a lot faster. And then potentially using even
- 44:13more than one LM for the same use case based on our latency
- 44:16requirements, cost requirements and accuracy.
- 44:20Awesome, awesome Dimitrios. What's up everybody?
- 44:26This is Angled 2. I'm trying to do both stages at
- 44:30once, which you can imagine is a lot of fun, and I've been
- 44:34listening in on this. Absolutely loved it.
- 44:38Thank you all for joining. I wanted to just come on here
- 44:42for this moment because I have to say, like George, I've gotten
- 44:47to meet you in person. It was incredible.
- 44:49You blew my mind. And I hope to meet the rest of
- 44:52you asked to Meetha, Sahar, Natalia and of course Sam in
- 44:56person. But I wanted to just wrap it up
- 44:59with this that if anyone is not listening to Sam's podcast, go
- 45:04and do that. He has been.
- 45:06Absolutely. Inspirational for me and this
- 45:10whole community and so much help that I had to drop in here and
- 45:14tell everyone that. And because I know you're too
- 45:16humble to say that. So for the people that do not
- 45:20listen to Twiddle this week in Machine learning and AI, get out
- 45:24there, listen to it. We'll drop a link in the chat.
- 45:27And I know that I'm pretty sure most of the panellists are huge
- 45:30fans of this and I'm pretty sure you probably got some fans out
- 45:33there listening right now. So thank you all for doing this.
- 45:36This was. All thanks everyone.
- 45:38You keep one. This is Skyler.
- 45:42I lead machine learning at Health Rhythms.
- 45:45If you want to stay on top of everything happening in ML OPS,
- 45:48subscribe to this podcast. Now.
- 45:52Now now. Now now.
- 45:59Now. Now.