Last night I was grateful to be welcomed to the Bristol MLOps. Community meetup where I gave a 10 minute lightning talk in which I: * Live coded a Helix App pretending to be Gareth Southgate (the England football manager who resigned this week after his team lost the final at the weekend) * Created a GitHub repo and pushed a helix.yaml to it with a system prompt * Noticed that Garethbot was feeling a bit too upbeat because it didn’t have up-to-date knowledge about the England defeat * Added a BBC news article via RAG to the app * Confirmed that Garethbot is now feeling appropriately unhappy and has up-to-date knowledge about what happened * Embedded Garethbot in a website and launched it :-) Take a look at the video (it’s a bit fun), and if you like what we’re doing, please help us amplify this Twitter post and this LinkedIn post. You can also find it on YouTube here. As ever, if you have a GenAI app you’d like us to help you build, hit reply to this email or email luke@helix.ml :-) Thank you! Luke This is a public episode. If you would like to discuss this with other subscribers or get access to bonus episodes, visit blog.helix.ml
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
SPEAKER_00I'm Luke. I'm going to attempt to live code a GenAI app in 10 minutes, so wish me luck. This is in order to demonstrate something that we're working on called AISpec, and I guess it will become clear what AISpec is when I show you. I'm not going to have any slides. I'm just going to go straight to live coding.
SPEAKER_00I fully expect someone to say, that's not live coding. You're only writing YAML and HTML. So I thought I'd preempt that one. But let's go for it. So I'm going to make an application. I'm going to call it live coding 4. So I think I made 3 earlier when I was practicing. I'm going to make a new repo. Just shout if the text is too small.
SPEAKER_00And then I'm going to make a brand new GitHub repo. And then inside it, I'm going to make a file called helix.yaml. And then the AI spec is basically a way of saying, oh, I forgot to start the timer. So I promised I'd do this in less than 10 minutes, so I put a timer. I know, I know. So yeah, the idea with the AI spec is make it dramatically simpler for developers,
SPEAKER_00every developer, to build applications that have LLM capabilities in them. So the most simple thing that we can do is start by making a spec that looks a little bit like this. So I'm going to make a new app. And I thought I would commiserate the football result by making a Gareth Southgate app.
SPEAKER_00So we're going to make Gareth Southgate bot. Description is chat to Gaza. image let's go and find a picture of I thought like is it like too soon maybe oh that's true I didn't think about that Okay, we'll have this one. So I'm going to copy the image address. Hopefully that works when we embed it.
SPEAKER_00And then this is where it gets interesting. So in the AI spec, apps have assistants. So basically you can put more than one assistant in an app. And then an assistant is something you can talk to or interact with and then configure in various ways. So the first assistant is going to use model llama3-instruct, which is the latest LLM from Meta. It's very, very good. And then you can have a system prompt. And then we can say, you are Gareth Southgate.
SPEAKER_00And then I'm going to do a commit. And then I'm going to go into Helix, which is the thing we're working on, and building this AI spec around, and I'm going to add an app. That will just take a second to load.
SPEAKER_00And then what I'm going to do is I'm going to hook the repo up to Helix. So every time I push into the repo, it's going to automatically deploy the app. So Live Coding 4, going to hit Connect. And that will create the Gareth South gate bot. I'm going to make it a bit bigger so you can see. And then as soon as I hit Save, then this bot is available in the app store inside this Helix deployment.
SPEAKER_00Those are all my test ones from earlier. So you can say, hey, mate. And that's not right. I think... The problem with this bot is that it doesn't have any up-to-date knowledge about what happened last week. So what should we do? Let's go and add some documents with RAG. So let's get some news about Gareth Southgate.
SPEAKER_00Let's grab this BBC News article, plug it in there. Hit continue. And then that's going to go and index that document, chunk it up into vectors and put those vectors in the vector store. And then what we can do is we can find the... Oh, I need to make the screen bigger to get access to the right button. grab that there,
SPEAKER_00and I think it's rag source ID, put that one in, I'm just going to double check that, rag source ID, yeah that's right, add news from BBC, and Then I'll just check that the commits line up. Oops, not that one. So that's 8D.
SPEAKER_008D, yep, that's right. So it's updated already. So now we can go and ask this bot another question. So what happened in the Euro 2024 final? And it knows. It knows that we lost to Spain. So that's cool. I mean, that took five minutes. Let's see if we can now launch Gareth Southgate bot on the web.
SPEAKER_00Let's make a website. So let's just quickly make a website. And then I'm going to say, let's have an image of him looking sad. That one will do. Copy image, copy image address, sorry. And then a couple of new lines.
SPEAKER_00And then I can go in and copy and embed code. So that's that one. And add web page. And now this is the next thing we need to do is just tell GitHub, please put that on the internet. So we deploy from a branch.
SPEAKER_00deploy the main branch and click save. And then we wait because GitHub actions is the slowest part of this demo. Um, so yeah, while we wait, does anyone have any questions? Yeah, expand further and how all this actually works. Sure. So in terms of expanding further how this works, so what the AI spec is doing,
SPEAKER_00and AI spec is really a layer on top of Helix. So Helix is this project we're working on, which which allows you to, to begin with, just deploy open source models. So, like, we used Llama 3 from Meta there, and what we've done is we've basically taken Ollama, which is a popular project that allows you to run these open source models, and we've made Ollama run across multiple nodes on Kubernetes,
SPEAKER_00so you can actually run it on the server. So that's, like, step one, and so you can attach multiple GPU runners. And then we've got this control plane piece. And then the idea is you can run this entire stack yourself on your own infrastructure. So if you're a company and you want to run LLMs locally on your own servers because you care about privacy, you don't want to send all your data off to ChatGPT, then you can spin this whole stack up. And then we've got this kind of application layer that sits on top of it,
SPEAKER_00which is what the AI spec is documenting, where we're kind of pulling out common patterns that people want to do with large language models like RAG. One that's very popular is calling APIs, so automatically calling APIs on behalf of the user. And we've also got things in here with fine tuning and GPT script, which I definitely don't have time to go into. Let's see. Oh, it works, okay. Let's see.
SPEAKER_00Okay, Gareth Southgatebot is live online. What shall we ask Gareth? Talk about 1996. You didn't specify when. In 2024. Pushing it now. Okay, yeah, I pushed it. I shouldn't have pushed it too far.
SPEAKER_00There we go. That's a more reasonable answer. Cool. 57 seconds left. That's me. Check out AISpec. Please do connect with me on LinkedIn. Come talk to me if you're interested about any of these things. And we've made an AISpec channel on the MLOps community Slack. So yeah, come join and love people's feedback. Thank you very much.
SPEAKER_00a drink, a slice of pizza, or go to the loop. And we'll be packing.