1 00:00:04,960 --> 00:00:19,999 [Music] 2 00:00:20,680 --> 00:00:28,000 hello and welcome back to the education 3 00:00:25,400 --> 00:00:32,920 track it is backwards there we go there 4 00:00:28,000 --> 00:00:35,000 we go um do you want to swap it mhm um I 5 00:00:32,920 --> 00:00:37,640 will it is my absolute pleasure to 6 00:00:35,000 --> 00:00:41,520 introduce introduce Renee Noble she is a 7 00:00:37,640 --> 00:00:44,640 senior Cloud Advocate uh at Microsoft um 8 00:00:41,520 --> 00:00:48,800 she is also a wearer of just so many 9 00:00:44,640 --> 00:00:52,640 hats um uh the girls Programming Network 10 00:00:48,800 --> 00:00:54,520 Tech inclusion just way too many things 11 00:00:52,640 --> 00:00:58,840 fabulous shout out before from cooker 12 00:00:54,520 --> 00:01:00,800 Berry work uh connected code if I kept 13 00:00:58,840 --> 00:01:04,839 on with the intro we would run out of 14 00:01:00,800 --> 00:01:06,920 time so interests of actually hearing 15 00:01:04,839 --> 00:01:09,200 what you have to say uh Renee take it 16 00:01:06,920 --> 00:01:11,360 away excellent fantastic lovely to be 17 00:01:09,200 --> 00:01:14,680 here today I'm going to talk about how 18 00:01:11,360 --> 00:01:17,040 smart AI really is and have a real world 19 00:01:14,680 --> 00:01:18,280 project to help build real world 20 00:01:17,040 --> 00:01:19,720 understandings for you know you or your 21 00:01:18,280 --> 00:01:22,560 students or whoever you want to give 22 00:01:19,720 --> 00:01:24,799 this out to uh so uh but yes we've just 23 00:01:22,560 --> 00:01:26,680 gone over vaguely who I am basically I'm 24 00:01:24,799 --> 00:01:28,759 some sort of conflux of tech education 25 00:01:26,680 --> 00:01:30,520 and Community I do work for Microsoft 26 00:01:28,759 --> 00:01:32,600 I'm in the python Cloud ad advocacy team 27 00:01:30,520 --> 00:01:34,119 and I get to do cool things like this um 28 00:01:32,600 --> 00:01:36,520 and make cool samples like the one I'm 29 00:01:34,119 --> 00:01:39,960 going to show you or make blogs and live 30 00:01:36,520 --> 00:01:42,520 streams and go to events and help make 31 00:01:39,960 --> 00:01:44,280 the world easier in terms of technology 32 00:01:42,520 --> 00:01:46,399 and becoming a developer and using those 33 00:01:44,280 --> 00:01:48,360 skills I also get to do cool stuff as a 34 00:01:46,399 --> 00:01:50,799 CEO of tech inclusion and girls 35 00:01:48,360 --> 00:01:52,280 Programming Network and also my side 36 00:01:50,799 --> 00:01:54,439 business which I run with my lovely 37 00:01:52,280 --> 00:01:56,000 husband Jack with cooker and not cook 38 00:01:54,439 --> 00:01:57,840 sorry connected code we work with the 39 00:01:56,000 --> 00:01:59,479 cook team sometimes and do other cool 40 00:01:57,840 --> 00:02:01,799 stuff helping teachers teach the digital 41 00:01:59,479 --> 00:02:04,000 technology curriculum in schools so 42 00:02:01,799 --> 00:02:06,119 altogether those are all about context 43 00:02:04,000 --> 00:02:09,399 driven learning experiences that's a 44 00:02:06,119 --> 00:02:12,480 really way great way to get people to 45 00:02:09,399 --> 00:02:15,440 engage get students to engage with tech 46 00:02:12,480 --> 00:02:16,760 education like why are we doing this so 47 00:02:15,440 --> 00:02:19,959 uh I'm going to talk a little bit about 48 00:02:16,760 --> 00:02:22,920 that today uh in the context of AI have 49 00:02:19,959 --> 00:02:24,680 you heard of it um it's you might have 50 00:02:22,920 --> 00:02:26,040 heard of it sometime in the last couple 51 00:02:24,680 --> 00:02:28,239 years if you haven't you might have been 52 00:02:26,040 --> 00:02:30,280 living under a rock um we can probably 53 00:02:28,239 --> 00:02:33,040 help you out a little bit today to catch 54 00:02:30,280 --> 00:02:35,760 you up um but so what is 55 00:02:33,040 --> 00:02:37,360 AI it's artificial intelligence great 56 00:02:35,760 --> 00:02:39,680 we've done we can probably go now we 57 00:02:37,360 --> 00:02:41,080 know the we know what the words are um 58 00:02:39,680 --> 00:02:44,959 no we probably need to go a little bit 59 00:02:41,080 --> 00:02:47,280 more into what AI is and why AI is um 60 00:02:44,959 --> 00:02:50,440 but it starts a lot further back than we 61 00:02:47,280 --> 00:02:52,640 might actually think so we're like yeah 62 00:02:50,440 --> 00:02:55,080 cool chat g chat GPT has been around for 63 00:02:52,640 --> 00:02:56,599 like 2 years and one month now so yeah 64 00:02:55,080 --> 00:02:58,000 we've got heaps of AI experience 65 00:02:56,599 --> 00:03:00,400 actually we're going to go way back to 66 00:02:58,000 --> 00:03:03,080 the 20s and uh the 30s and 40s 67 00:03:00,400 --> 00:03:05,720 when we first start thinking about AI so 68 00:03:03,080 --> 00:03:08,040 we have uh right then we have the 69 00:03:05,720 --> 00:03:09,840 Imagining the hypothesizing around 70 00:03:08,040 --> 00:03:12,560 theoretical artificial neurons we're 71 00:03:09,840 --> 00:03:14,319 going brains they learn things and you 72 00:03:12,560 --> 00:03:15,760 have some inputs and output and you kind 73 00:03:14,319 --> 00:03:17,760 of like you know if you think about your 74 00:03:15,760 --> 00:03:19,080 own thinking processes we have some like 75 00:03:17,760 --> 00:03:20,640 different inputs coming in and we're 76 00:03:19,080 --> 00:03:22,760 like yeah and this is how it comes out 77 00:03:20,640 --> 00:03:24,239 and you can balance those different 78 00:03:22,760 --> 00:03:26,040 inputs in your mind when you're making 79 00:03:24,239 --> 00:03:28,120 up a decision so at the very simplest 80 00:03:26,040 --> 00:03:30,959 form we have this artificial neuron 81 00:03:28,120 --> 00:03:33,159 concept where we have in this example 82 00:03:30,959 --> 00:03:34,280 three different inputs and then we work 83 00:03:33,159 --> 00:03:35,439 out the weights for those because we 84 00:03:34,280 --> 00:03:37,319 know what the inputs are we know what 85 00:03:35,439 --> 00:03:39,000 the outputs are and we can back 86 00:03:37,319 --> 00:03:40,959 calculate essentially what those 87 00:03:39,000 --> 00:03:43,080 different weights are for when we're 88 00:03:40,959 --> 00:03:46,159 training getting this neuron to learn 89 00:03:43,080 --> 00:03:48,920 how to predict a future output based on 90 00:03:46,159 --> 00:03:50,400 some new new inputs so we start with 91 00:03:48,920 --> 00:03:54,560 that but we're not doing it yet we're 92 00:03:50,400 --> 00:03:56,560 just thinking about it but come 1950s we 93 00:03:54,560 --> 00:03:58,799 are starting to do it in 1951 we have 94 00:03:56,560 --> 00:04:00,480 the first Checkers and chess bot so 95 00:03:58,799 --> 00:04:02,959 we're describing these games 96 00:04:00,480 --> 00:04:04,920 mathematically and putting them into a 97 00:04:02,959 --> 00:04:06,920 collection of those artificial neurons 98 00:04:04,920 --> 00:04:08,480 now called a neuron net so we've got a 99 00:04:06,920 --> 00:04:09,799 couple of those and we can shove 100 00:04:08,480 --> 00:04:11,439 together a bunch of these different 101 00:04:09,799 --> 00:04:13,120 circles in inputs and outputs and 102 00:04:11,439 --> 00:04:15,079 different weights on the different 103 00:04:13,120 --> 00:04:16,840 arrows we've got going on there and we 104 00:04:15,079 --> 00:04:18,959 can start having things that seem like 105 00:04:16,840 --> 00:04:21,720 they're making decisions based on the 106 00:04:18,959 --> 00:04:23,759 best outcomes of the game so we're going 107 00:04:21,720 --> 00:04:25,320 to use this a lot throughout the rest of 108 00:04:23,759 --> 00:04:26,600 this history we're going to have to 109 00:04:25,320 --> 00:04:28,240 Breeze through a lot of the history cuz 110 00:04:26,600 --> 00:04:30,880 there been a lot of stuff happening in 111 00:04:28,240 --> 00:04:33,039 the world of AI and machine learning 112 00:04:30,880 --> 00:04:37,320 since especially like the 1950s when it 113 00:04:33,039 --> 00:04:39,759 really kicked off uh in the uh in 1955 114 00:04:37,320 --> 00:04:41,320 we start thinking about not just numbers 115 00:04:39,759 --> 00:04:43,400 like games you can describe in numbers 116 00:04:41,320 --> 00:04:45,120 there's a chess board it's called spots 117 00:04:43,400 --> 00:04:47,759 on the grid but we start thinking like 118 00:04:45,120 --> 00:04:50,880 how can we put symbols maybe words or 119 00:04:47,759 --> 00:04:53,160 like mathematical ideas into these 120 00:04:50,880 --> 00:04:55,240 numbers like doing proving different 121 00:04:53,160 --> 00:04:56,960 mathematical formulas and we start 122 00:04:55,240 --> 00:04:58,800 thinking about those Concepts and that's 123 00:04:56,960 --> 00:05:01,560 actually when the word artificial 124 00:04:58,800 --> 00:05:03,320 intelligent was coined or Ai and at 125 00:05:01,560 --> 00:05:05,479 around the same time based on the 126 00:05:03,320 --> 00:05:07,680 mathematical um principles and the 127 00:05:05,479 --> 00:05:09,759 neural Nets we've had with our chess and 128 00:05:07,680 --> 00:05:11,720 checkers boards we get machine learning 129 00:05:09,759 --> 00:05:14,560 coined at the same time so these are 130 00:05:11,720 --> 00:05:16,560 kind of two concepts that kind of 131 00:05:14,560 --> 00:05:18,960 entwine together throughout history and 132 00:05:16,560 --> 00:05:20,919 it's kind of still you know it's not 133 00:05:18,960 --> 00:05:22,360 never quite clear what the difference is 134 00:05:20,919 --> 00:05:24,280 and what the similarities are and that 135 00:05:22,360 --> 00:05:25,880 you know maybe it worked changes 136 00:05:24,280 --> 00:05:27,800 depending on exactly what context you're 137 00:05:25,880 --> 00:05:30,120 in but they're really both quite similar 138 00:05:27,800 --> 00:05:31,479 things and when we kind of understand 139 00:05:30,120 --> 00:05:33,039 that we really understand it really all 140 00:05:31,479 --> 00:05:35,280 comes back to the maths behind the 141 00:05:33,039 --> 00:05:38,440 machine learning these diagrams we're 142 00:05:35,280 --> 00:05:41,360 looking at that um will continue to go 143 00:05:38,440 --> 00:05:43,240 on throughout our history of AI now so 144 00:05:41,360 --> 00:05:45,680 we keep going with this idea of these 145 00:05:43,240 --> 00:05:47,400 neural Nets and we're building up with 146 00:05:45,680 --> 00:05:49,800 starting to think about language now 147 00:05:47,400 --> 00:05:51,639 natural language that is like you know 148 00:05:49,800 --> 00:05:53,319 how can we speak to something in English 149 00:05:51,639 --> 00:05:56,199 and have a computer talk back to us and 150 00:05:53,319 --> 00:05:59,240 in 1966 we have the C creation of the 151 00:05:56,199 --> 00:06:02,479 Eliza chatbot which today if you're 152 00:05:59,240 --> 00:06:04,680 talking to to chat GP it seems very very 153 00:06:02,479 --> 00:06:06,599 very basic even if you have a kid today 154 00:06:04,680 --> 00:06:08,160 who's barely ever touched the computer 155 00:06:06,599 --> 00:06:09,720 try and talk to Eliza they're probably 156 00:06:08,160 --> 00:06:13,479 going to work out that this is not 157 00:06:09,720 --> 00:06:15,800 really a computer that can think um it's 158 00:06:13,479 --> 00:06:17,240 on it's a pre-canned answer it's going 159 00:06:15,800 --> 00:06:19,160 to give you back things and it's very 160 00:06:17,240 --> 00:06:20,639 easy to quickly get it to Loop and tell 161 00:06:19,160 --> 00:06:22,960 you the same thing over and over again 162 00:06:20,639 --> 00:06:25,199 but at the time this was like the first 163 00:06:22,960 --> 00:06:26,319 thing that we have had that can do 164 00:06:25,199 --> 00:06:28,240 something like that so was actually 165 00:06:26,319 --> 00:06:30,759 quite revolutionary at the time and 166 00:06:28,240 --> 00:06:31,960 we're still talking about it today 167 00:06:30,759 --> 00:06:34,479 so we're actually going to jump way 168 00:06:31,960 --> 00:06:35,800 forward to uh the 2000s because there 169 00:06:34,479 --> 00:06:37,039 was stuff that happened in the middle 170 00:06:35,800 --> 00:06:38,720 there we tried a few different other 171 00:06:37,039 --> 00:06:40,400 things we did things that weren't 172 00:06:38,720 --> 00:06:44,000 related to what we're going to talk 173 00:06:40,400 --> 00:06:45,479 about today is GPT technology um but 174 00:06:44,000 --> 00:06:47,680 yeah and there was some ups and downs we 175 00:06:45,479 --> 00:06:49,120 kind of didn't have enough big computers 176 00:06:47,680 --> 00:06:51,880 we're really good at Big computers now 177 00:06:49,120 --> 00:06:54,080 so as we get into two into the 2000s we 178 00:06:51,880 --> 00:06:56,240 start working on probabilistic AI if 179 00:06:54,080 --> 00:06:58,680 you've ever played with a mark of chain 180 00:06:56,240 --> 00:07:00,680 this is like kind of gives you the idea 181 00:06:58,680 --> 00:07:02,759 of where we're getting into these things 182 00:07:00,680 --> 00:07:05,599 that start to have things that look like 183 00:07:02,759 --> 00:07:07,479 language so we have probabilistic G ey 184 00:07:05,599 --> 00:07:09,120 uh and Marco chains might be like I've 185 00:07:07,479 --> 00:07:11,440 got all the lyrics to different Taylor 186 00:07:09,120 --> 00:07:13,840 Swift songs and I can now predict a new 187 00:07:11,440 --> 00:07:15,800 Taylor Swift song based on a couple of 188 00:07:13,840 --> 00:07:17,599 starting words potentially so we've got 189 00:07:15,800 --> 00:07:21,319 those ideas coming into 190 00:07:17,599 --> 00:07:23,800 play Then jumping into the 201s we've 191 00:07:21,319 --> 00:07:25,120 got big data and deep learning starting 192 00:07:23,800 --> 00:07:26,960 to happen because we have a lot more 193 00:07:25,120 --> 00:07:29,000 comp computational power out there we've 194 00:07:26,960 --> 00:07:31,520 got cloud computing happening we get the 195 00:07:29,000 --> 00:07:32,759 creation of Deep Mind in 2010 and open 196 00:07:31,520 --> 00:07:35,520 AI you might have heard of that one in 197 00:07:32,759 --> 00:07:37,879 2015 and finally chat GPT launched in 198 00:07:35,520 --> 00:07:39,639 2022 and it's been a little bit weird 199 00:07:37,879 --> 00:07:41,759 since then it's been kind of a really 200 00:07:39,639 --> 00:07:44,240 different Tech landscape and education 201 00:07:41,759 --> 00:07:46,639 landscape since that came onto the scene 202 00:07:44,240 --> 00:07:49,319 so where are we today we have all this 203 00:07:46,639 --> 00:07:51,919 great technology and we also have a 204 00:07:49,319 --> 00:07:54,560 thing that if we ask AI if you ask chat 205 00:07:51,919 --> 00:07:56,759 GPT how many ARS in the word strawberry 206 00:07:54,560 --> 00:08:00,000 is going to tell you it strawberry has 207 00:07:56,759 --> 00:08:01,960 two RS in it so 208 00:08:00,000 --> 00:08:03,720 where what does that mean I'm actually 209 00:08:01,960 --> 00:08:05,440 kind of okay with this because like 210 00:08:03,720 --> 00:08:07,159 that's kind of not its job people are 211 00:08:05,440 --> 00:08:08,680 like it's not actually very smart I'm 212 00:08:07,159 --> 00:08:11,120 like that's correct it's not smart it's 213 00:08:08,680 --> 00:08:14,560 not counting machine what our what we 214 00:08:11,120 --> 00:08:16,639 have with GPT technology uh is something 215 00:08:14,560 --> 00:08:18,280 that can predict the next sentence 216 00:08:16,639 --> 00:08:20,560 predict the next word it's great at 217 00:08:18,280 --> 00:08:22,800 guessing things that look like real 218 00:08:20,560 --> 00:08:25,400 sentences real documents which is really 219 00:08:22,800 --> 00:08:27,479 handy but what its job is not is to do 220 00:08:25,400 --> 00:08:29,000 maths so it has you're asking it to do 221 00:08:27,479 --> 00:08:30,800 something that it's not trained for and 222 00:08:29,000 --> 00:08:32,080 even if you had a child prodigy who was 223 00:08:30,800 --> 00:08:33,919 8 years old and they're going off to 224 00:08:32,080 --> 00:08:35,279 Jewel yard to study the piano you're 225 00:08:33,919 --> 00:08:38,159 still not going to ask them to do your 226 00:08:35,279 --> 00:08:40,000 taxes so we've got you know a con 227 00:08:38,159 --> 00:08:42,240 conflict of what we're asking GPT 228 00:08:40,000 --> 00:08:44,080 technology to do and what it's actually 229 00:08:42,240 --> 00:08:47,120 designed to be really good 230 00:08:44,080 --> 00:08:49,440 at so where are we today we've got our 231 00:08:47,120 --> 00:08:52,519 GPT technology uh got that means 232 00:08:49,440 --> 00:08:53,959 generative pre-trained Transformers uh 233 00:08:52,519 --> 00:08:56,320 people are like GPT yeah that's that 234 00:08:53,959 --> 00:08:59,959 brand name for Chad GPT it's actually 235 00:08:56,320 --> 00:09:01,680 this concept and in this realm we have a 236 00:08:59,959 --> 00:09:03,680 couple of things llms you might have 237 00:09:01,680 --> 00:09:05,480 heard of them large language models 238 00:09:03,680 --> 00:09:06,680 there we've got a bunch of words and 239 00:09:05,480 --> 00:09:08,600 we've shoved them into some deep 240 00:09:06,680 --> 00:09:10,399 learning some of those neural networks 241 00:09:08,600 --> 00:09:12,720 we saw the diagram with a few circles on 242 00:09:10,399 --> 00:09:14,120 it before now just IM imagine just 243 00:09:12,720 --> 00:09:15,320 millions and millions of circles and 244 00:09:14,120 --> 00:09:17,120 lots and lots of different layers and 245 00:09:15,320 --> 00:09:18,720 lots and lots of different arrows and 246 00:09:17,120 --> 00:09:21,560 now you're starting to imagine a 247 00:09:18,720 --> 00:09:23,440 fraction of the networking that you need 248 00:09:21,560 --> 00:09:24,959 to have this kind of idea that's 249 00:09:23,440 --> 00:09:26,440 bringing all these words together and 250 00:09:24,959 --> 00:09:28,839 having something come out on the other 251 00:09:26,440 --> 00:09:31,200 end we also have slightly smaller 252 00:09:28,839 --> 00:09:32,760 versions of that slms small language 253 00:09:31,200 --> 00:09:34,680 models these can actually be really cool 254 00:09:32,760 --> 00:09:35,800 you might think smaller isn't as good as 255 00:09:34,680 --> 00:09:37,120 bigger that's what we've learned 256 00:09:35,800 --> 00:09:39,959 throughout history we needed bigger 257 00:09:37,120 --> 00:09:42,720 computers to do more AI but now we can 258 00:09:39,959 --> 00:09:45,160 think about if we put in a more selected 259 00:09:42,720 --> 00:09:47,880 section of texts we can actually predict 260 00:09:45,160 --> 00:09:50,399 things that will be more specific to 261 00:09:47,880 --> 00:09:51,959 your use cases and it will be faster 262 00:09:50,399 --> 00:09:54,040 because making a really really big 263 00:09:51,959 --> 00:09:55,560 Network means you have to spend a lot of 264 00:09:54,040 --> 00:09:58,120 time traversing that Network and doing 265 00:09:55,560 --> 00:10:00,600 all those calculations so super handy 266 00:09:58,120 --> 00:10:02,839 and that's super super good for this 267 00:10:00,600 --> 00:10:05,680 educational landscape as well because we 268 00:10:02,839 --> 00:10:08,480 have kids with their limited uh patience 269 00:10:05,680 --> 00:10:11,200 for waiting for AI to give them back a 270 00:10:08,480 --> 00:10:13,480 response so we have a bunch of different 271 00:10:11,200 --> 00:10:15,360 models in these Realms um because we've 272 00:10:13,480 --> 00:10:18,040 you know we heard about chat GPT but we 273 00:10:15,360 --> 00:10:20,000 also have we've got uh different things 274 00:10:18,040 --> 00:10:21,720 coming out from meta we've got different 275 00:10:20,000 --> 00:10:23,120 open source options so there's a lot of 276 00:10:21,720 --> 00:10:26,160 models out 277 00:10:23,120 --> 00:10:28,680 there so we can choose the ones that are 278 00:10:26,160 --> 00:10:31,680 best for our use cases and then have a 279 00:10:28,680 --> 00:10:34,519 good fun time f with them but how do we 280 00:10:31,680 --> 00:10:36,440 actually go about teaching and using AI 281 00:10:34,519 --> 00:10:38,399 responsibly now that we know that AI 282 00:10:36,440 --> 00:10:41,000 isn't smart we had the whole strawberry 283 00:10:38,399 --> 00:10:43,040 situation going on there uh how do we 284 00:10:41,000 --> 00:10:44,880 make sure we use it correctly well we 285 00:10:43,040 --> 00:10:47,480 need to judge the correct context and we 286 00:10:44,880 --> 00:10:50,600 need to te tell students to do the same 287 00:10:47,480 --> 00:10:54,440 thing so there are a few things that a 288 00:10:50,600 --> 00:10:57,160 AI is good at creating like generating 289 00:10:54,440 --> 00:10:59,399 highly standard text so things that I 290 00:10:57,160 --> 00:11:01,839 don't want to do is write a whole work 291 00:10:59,399 --> 00:11:03,839 and safety policy there's a lot of those 292 00:11:01,839 --> 00:11:06,079 out there there's like millions of those 293 00:11:03,839 --> 00:11:08,000 and I'm not that special I don't have 294 00:11:06,079 --> 00:11:09,519 that many brilliant ideas around it so 295 00:11:08,000 --> 00:11:12,519 it's actually really convenient to say 296 00:11:09,519 --> 00:11:15,360 hey chap GPT I have a charity check 297 00:11:12,519 --> 00:11:17,480 conclusion that we need a policy for 298 00:11:15,360 --> 00:11:18,920 work health and safety and we work with 299 00:11:17,480 --> 00:11:20,279 children so it can like oh cool I've 300 00:11:18,920 --> 00:11:22,920 read a bunch of those I can give you one 301 00:11:20,279 --> 00:11:25,800 of those back and then as you know my 302 00:11:22,920 --> 00:11:27,880 job is to be the supervisor to that to 303 00:11:25,800 --> 00:11:30,160 make sure hey this is relevant to my 304 00:11:27,880 --> 00:11:31,920 purposes and I also need to go and add 305 00:11:30,160 --> 00:11:33,920 some things that I as a person who 306 00:11:31,920 --> 00:11:35,320 actually goes and does girls Programming 307 00:11:33,920 --> 00:11:37,320 Network would actually know that the 308 00:11:35,320 --> 00:11:39,600 policy needs to include so you can't 309 00:11:37,320 --> 00:11:41,959 trust it you can't rely on it you can't 310 00:11:39,600 --> 00:11:44,000 ask it to do all that work because it's 311 00:11:41,959 --> 00:11:45,680 not there it's not in in your 312 00:11:44,000 --> 00:11:47,519 organization but it can be like I've 313 00:11:45,680 --> 00:11:49,600 seen a thing like this before here's 314 00:11:47,519 --> 00:11:52,399 some tips on how I would write a 315 00:11:49,600 --> 00:11:54,720 generalized the average of a work health 316 00:11:52,399 --> 00:11:56,959 and safety document given you've asked 317 00:11:54,720 --> 00:11:59,760 for one that's like a bit more child 318 00:11:56,959 --> 00:12:01,079 appropriate or things like that so 319 00:11:59,760 --> 00:12:02,279 that's one thing you could use it for 320 00:12:01,079 --> 00:12:04,560 you could also use it for proofing your 321 00:12:02,279 --> 00:12:06,000 own work because it can also if you're 322 00:12:04,560 --> 00:12:07,839 like yeah I like what I've written 323 00:12:06,000 --> 00:12:09,560 except I wanted to sound more fun it's 324 00:12:07,839 --> 00:12:12,839 been like I've read fun things on the 325 00:12:09,560 --> 00:12:15,560 internet I can help you be more fun with 326 00:12:12,839 --> 00:12:18,880 the power of algorithms so it can help 327 00:12:15,560 --> 00:12:20,279 you do that uh and also uh the only 328 00:12:18,880 --> 00:12:21,600 thing is when you're doing any of these 329 00:12:20,279 --> 00:12:23,920 things you do need to make sure it 330 00:12:21,600 --> 00:12:25,480 matches your purposes so you could ask 331 00:12:23,920 --> 00:12:26,959 it to be more fun but maybe it's fun in 332 00:12:25,480 --> 00:12:29,240 the wrong way or something that I like 333 00:12:26,959 --> 00:12:31,399 to think about specifically if I'm 334 00:12:29,240 --> 00:12:34,800 generating code because that is a really 335 00:12:31,399 --> 00:12:35,959 standardized format of information uh 336 00:12:34,800 --> 00:12:38,120 but there's a lot of different 337 00:12:35,959 --> 00:12:39,480 standardized ways of doing it so for 338 00:12:38,120 --> 00:12:41,120 instance I might be for girls 339 00:12:39,480 --> 00:12:43,560 Programming Network wanting to create 340 00:12:41,120 --> 00:12:45,720 some code that teaches the kids how to 341 00:12:43,560 --> 00:12:47,240 make a scissors paper rock game pretty 342 00:12:45,720 --> 00:12:50,560 basic game but there's a lot of ways you 343 00:12:47,240 --> 00:12:53,160 could code that so I could be like uh 344 00:12:50,560 --> 00:12:54,800 using GitHub co-pilot great love to use 345 00:12:53,160 --> 00:12:56,120 it because I hate you know having to 346 00:12:54,800 --> 00:12:57,920 write things out they like I already 347 00:12:56,120 --> 00:12:59,639 know what I want to write out but now I 348 00:12:57,920 --> 00:13:01,079 have to do the finger moving to make it 349 00:12:59,639 --> 00:13:03,079 actually be on the page and I'm going to 350 00:13:01,079 --> 00:13:04,920 make a bunch of typos in the process of 351 00:13:03,079 --> 00:13:06,360 doing that so instead GitHub co-pilot 352 00:13:04,920 --> 00:13:07,680 can be like yes I know what you're 353 00:13:06,360 --> 00:13:09,000 trying to write on that line here you go 354 00:13:07,680 --> 00:13:10,360 I'm like great I don't need to write 355 00:13:09,000 --> 00:13:12,839 that line that's exactly what I would 356 00:13:10,360 --> 00:13:15,040 have written now it's done but if I do 357 00:13:12,839 --> 00:13:16,440 give a generalized prompt like make 358 00:13:15,040 --> 00:13:17,680 sissors paper rock for me and it will be 359 00:13:16,440 --> 00:13:20,079 like great I've seen a lot of those 360 00:13:17,680 --> 00:13:22,760 online here's your code I'm like that's 361 00:13:20,079 --> 00:13:25,360 really that's some good code right there 362 00:13:22,760 --> 00:13:28,360 um but also this is for year seven and 363 00:13:25,360 --> 00:13:30,800 that has some objects it's got a list 364 00:13:28,360 --> 00:13:32,279 comprehension it's got a dictionary it's 365 00:13:30,800 --> 00:13:34,279 got this that and the other I'm like the 366 00:13:32,279 --> 00:13:36,720 codee's not wrong but it's not right for 367 00:13:34,279 --> 00:13:38,639 my purposes so making sure that you go 368 00:13:36,720 --> 00:13:40,279 through and whatever you're generating 369 00:13:38,639 --> 00:13:43,920 making sure that whatever it's given you 370 00:13:40,279 --> 00:13:47,160 is what you need so other things to 371 00:13:43,920 --> 00:13:49,160 watch out for are once again reflecting 372 00:13:47,160 --> 00:13:51,720 on what it's designed for so it's great 373 00:13:49,160 --> 00:13:53,839 at making text that looks correct like 374 00:13:51,720 --> 00:13:56,720 that is definitely a sentence that 375 00:13:53,839 --> 00:13:58,759 belongs in a document uh it's definitely 376 00:13:56,720 --> 00:14:00,720 in English the spelling is all right and 377 00:13:58,759 --> 00:14:02,680 things like that that's great but it 378 00:14:00,720 --> 00:14:04,519 doesn't necessarily make things that are 379 00:14:02,680 --> 00:14:06,720 factually correct and things like 380 00:14:04,519 --> 00:14:08,360 references can in fact be made up 381 00:14:06,720 --> 00:14:09,680 they'll look like a real reference and 382 00:14:08,360 --> 00:14:12,199 there have been legal cases where people 383 00:14:09,680 --> 00:14:14,920 have submitted documents to court based 384 00:14:12,199 --> 00:14:16,759 on J chat GPT and it's like actually 385 00:14:14,920 --> 00:14:19,000 this case that you're relying on for the 386 00:14:16,759 --> 00:14:20,560 precedent for the legal case doesn't 387 00:14:19,000 --> 00:14:23,199 exist and it's been made up and they've 388 00:14:20,560 --> 00:14:25,360 been in a lot of trouble so don't get 389 00:14:23,199 --> 00:14:28,680 yourself into trouble like that because 390 00:14:25,360 --> 00:14:30,839 you need to remember that uh chat kind 391 00:14:28,680 --> 00:14:33,440 of things generative technology 392 00:14:30,839 --> 00:14:35,759 generative AI can only remix content 393 00:14:33,440 --> 00:14:37,199 that it's already seen so I can't do any 394 00:14:35,759 --> 00:14:38,399 critical thinking around that because it 395 00:14:37,199 --> 00:14:39,880 doesn't think can't think about 396 00:14:38,399 --> 00:14:41,800 strawberries and the spelling of that so 397 00:14:39,880 --> 00:14:43,360 don't imagine it can be like is this 398 00:14:41,800 --> 00:14:45,600 better to include or that better to 399 00:14:43,360 --> 00:14:47,000 include on like a moral or intellectual 400 00:14:45,600 --> 00:14:49,880 level it's just going to take the 401 00:14:47,000 --> 00:14:52,199 average essentially of what it's already 402 00:14:49,880 --> 00:14:53,880 ingested and then it's not going to make 403 00:14:52,199 --> 00:14:55,880 anything creative on you if you want to 404 00:14:53,880 --> 00:14:57,600 make bring something new into this world 405 00:14:55,880 --> 00:15:00,079 it's definitely not going to be do done 406 00:14:57,600 --> 00:15:01,680 with generative AI you need to bring the 407 00:15:00,079 --> 00:15:04,360 creativity and like it could be a tool 408 00:15:01,680 --> 00:15:07,680 in your process but you do need to bring 409 00:15:04,360 --> 00:15:09,920 that in there so now hopefully we 410 00:15:07,680 --> 00:15:12,440 understand a bit that generative AI is 411 00:15:09,920 --> 00:15:15,560 not magic how can we take the magic away 412 00:15:12,440 --> 00:15:18,040 from the children um so we can see what 413 00:15:15,560 --> 00:15:19,199 AI is actually like under the hood by 414 00:15:18,040 --> 00:15:21,120 kind of stripping away a lot of the 415 00:15:19,199 --> 00:15:22,279 stuff around chat GPT which is probably 416 00:15:21,120 --> 00:15:23,720 what they're playing with most of the 417 00:15:22,279 --> 00:15:25,680 time because that has a lot of stuff 418 00:15:23,720 --> 00:15:27,279 about making sure the conversation 419 00:15:25,680 --> 00:15:29,319 remembers what it said before and having 420 00:15:27,279 --> 00:15:32,279 all these extra bits and pieces that 421 00:15:29,319 --> 00:15:34,120 make it feel smarter than it is we can 422 00:15:32,279 --> 00:15:37,240 also work out how easy it is to 423 00:15:34,120 --> 00:15:40,319 manipulate Ai and also see how adding 424 00:15:37,240 --> 00:15:42,199 our own data can change the responses 425 00:15:40,319 --> 00:15:44,279 and kind of maybe give it some motive to 426 00:15:42,199 --> 00:15:46,319 like give it some do something that 427 00:15:44,279 --> 00:15:48,759 isn't necessarily the you know base 428 00:15:46,319 --> 00:15:50,480 level uh chat gbt experience making it 429 00:15:48,759 --> 00:15:52,839 trying to like sell you something for 430 00:15:50,480 --> 00:15:54,240 instance so I've got a project to do all 431 00:15:52,839 --> 00:15:56,279 of that so it's going to involve 432 00:15:54,240 --> 00:15:57,639 connecting to an AI model uh we're going 433 00:15:56,279 --> 00:15:59,440 to be using GitHub models and it's going 434 00:15:57,639 --> 00:16:03,000 to be free which is great uh we're going 435 00:15:59,440 --> 00:16:05,399 to be using the AI API to make a call to 436 00:16:03,000 --> 00:16:06,959 that model and then it's also a great 437 00:16:05,399 --> 00:16:08,160 opportunity to practice some python 438 00:16:06,959 --> 00:16:11,360 there with your students and get some 439 00:16:08,160 --> 00:16:13,720 like of those core year 7even to 10 uh 440 00:16:11,360 --> 00:16:15,399 Concepts going in there which is great 441 00:16:13,720 --> 00:16:17,360 and then also we're going to add some 442 00:16:15,399 --> 00:16:20,120 data to that and give it that motive to 443 00:16:17,360 --> 00:16:21,959 sell sell sell so if you want to grab 444 00:16:20,120 --> 00:16:23,440 this repo there is a link there it's 445 00:16:21,959 --> 00:16:25,800 also going to be sprinkled on a few of 446 00:16:23,440 --> 00:16:27,199 the other slides um and then yeah it's 447 00:16:25,800 --> 00:16:28,920 all going to be in there these slides 448 00:16:27,199 --> 00:16:30,399 will be on there at some point just have 449 00:16:28,920 --> 00:16:32,480 having a little bit of G trouble to 450 00:16:30,399 --> 00:16:35,720 getting them to 451 00:16:32,480 --> 00:16:38,079 upload okay so before we get started 452 00:16:35,720 --> 00:16:40,240 let's be prepared firstly you can grab 453 00:16:38,079 --> 00:16:41,600 my Rigo There's the link again um it's 454 00:16:40,240 --> 00:16:42,680 got the template and you can use it 455 00:16:41,600 --> 00:16:44,079 however you want you can just be like 456 00:16:42,680 --> 00:16:45,680 here class you can play with this or you 457 00:16:44,079 --> 00:16:47,240 can be like I want to make an experience 458 00:16:45,680 --> 00:16:48,519 of this I'm going to use it for 10 hours 459 00:16:47,240 --> 00:16:49,680 of material I'm going to take out all 460 00:16:48,519 --> 00:16:51,519 the python and then you're going to have 461 00:16:49,680 --> 00:16:54,040 to write it yourself um you can do 462 00:16:51,519 --> 00:16:56,560 whatever you want so be prepared with 463 00:16:54,040 --> 00:16:58,360 that uh consider the school rules of 464 00:16:56,560 --> 00:17:00,519 your school so you might have a policy 465 00:16:58,360 --> 00:17:02,440 around AI at your school also you might 466 00:17:00,519 --> 00:17:03,800 have firewalls around AI at your school 467 00:17:02,440 --> 00:17:05,799 so before you go this is what I'm going 468 00:17:03,800 --> 00:17:08,720 to do tomorrow in class make sure you 469 00:17:05,799 --> 00:17:11,600 check those out be secure we're going to 470 00:17:08,720 --> 00:17:13,880 be using a secret token as part of this 471 00:17:11,600 --> 00:17:16,400 never sh share your credentials online 472 00:17:13,880 --> 00:17:19,079 or with other people it's about cyber 473 00:17:16,400 --> 00:17:20,959 security and then we also want to 474 00:17:19,079 --> 00:17:23,120 consider the content policy and your 475 00:17:20,959 --> 00:17:25,480 class so each of these models especially 476 00:17:23,120 --> 00:17:28,240 the ones on GitHub models have some sort 477 00:17:25,480 --> 00:17:31,000 of content policy that prohibits use of 478 00:17:28,240 --> 00:17:32,679 like bad language that uses know 479 00:17:31,000 --> 00:17:35,559 prevents people asking like how do I 480 00:17:32,679 --> 00:17:38,000 bully my sister things like that so make 481 00:17:35,559 --> 00:17:39,480 sure that the restrictions on the model 482 00:17:38,000 --> 00:17:41,280 that you're saying we're going to use in 483 00:17:39,480 --> 00:17:43,679 class is going to be appropriate for the 484 00:17:41,280 --> 00:17:45,440 level of your class by just giving it a 485 00:17:43,679 --> 00:17:47,160 play and being like what would there be 486 00:17:45,440 --> 00:17:48,840 the first 10 things a student asks this 487 00:17:47,160 --> 00:17:51,360 model it's a good way to kind of figure 488 00:17:48,840 --> 00:17:53,960 it out and then finally we've got 489 00:17:51,360 --> 00:17:56,039 classroom management all like your 490 00:17:53,960 --> 00:17:58,120 problems with plagiarism bullying and 491 00:17:56,039 --> 00:18:00,760 child safety can be on steroids when you 492 00:17:58,120 --> 00:18:02,039 introduce AI to the classroom well we've 493 00:18:00,760 --> 00:18:04,000 already know that the kids are already 494 00:18:02,039 --> 00:18:05,159 doing all this stuff so think about how 495 00:18:04,000 --> 00:18:07,760 that's going to go in the classroom and 496 00:18:05,159 --> 00:18:10,520 do have a conversation around proper use 497 00:18:07,760 --> 00:18:12,720 of AI socially within the context of 498 00:18:10,520 --> 00:18:14,520 that so now we're prepared and we're 499 00:18:12,720 --> 00:18:17,360 responsible we're ready to play with 500 00:18:14,520 --> 00:18:20,520 python and do cool stuff so the first 501 00:18:17,360 --> 00:18:22,280 thing we need to do is get some AI which 502 00:18:20,520 --> 00:18:24,240 is we're going to go to GitHub models 503 00:18:22,280 --> 00:18:27,480 we're going to grab ourselves a personal 504 00:18:24,240 --> 00:18:28,799 access token and we're going to start 505 00:18:27,480 --> 00:18:31,480 we're going to grab that and put it into 506 00:18:28,799 --> 00:18:34,600 to our python project so cool we've got 507 00:18:31,480 --> 00:18:36,440 the marketplace here where we can go in 508 00:18:34,600 --> 00:18:38,080 we can say oh cool there's a couple of 509 00:18:36,440 --> 00:18:39,679 AI models even listed listed on the 510 00:18:38,080 --> 00:18:42,240 front here we're actually going to use a 511 00:18:39,679 --> 00:18:43,559 couple examples in here but the GPT 40 512 00:18:42,240 --> 00:18:46,360 mini is good it's one of those small 513 00:18:43,559 --> 00:18:48,360 language models or we've also got the 53 514 00:18:46,360 --> 00:18:50,080 mini which you can get that one and 515 00:18:48,360 --> 00:18:52,360 actually install it locally which is 516 00:18:50,080 --> 00:18:54,080 really handy if you don't want to do it 517 00:18:52,360 --> 00:18:55,679 on the web and you want to run it all 518 00:18:54,080 --> 00:18:56,919 locally within your classroom so we get 519 00:18:55,679 --> 00:18:58,400 that we can play around in the 520 00:18:56,919 --> 00:19:00,480 playground maybe you want to let the 521 00:18:58,400 --> 00:19:02,000 kids that and go wild or maybe you want 522 00:19:00,480 --> 00:19:03,840 to do that as a demonstration on the 523 00:19:02,000 --> 00:19:06,400 board you'll know that based on your own 524 00:19:03,840 --> 00:19:08,480 classroom and your own kids and see how 525 00:19:06,400 --> 00:19:10,960 we can have a play 526 00:19:08,480 --> 00:19:13,120 there so we've got a few you know going 527 00:19:10,960 --> 00:19:15,240 on there the things in the right hand 528 00:19:13,120 --> 00:19:16,840 side we can set different things there 529 00:19:15,240 --> 00:19:19,039 um like the system prompt some of the 530 00:19:16,840 --> 00:19:20,520 models don't interact well with the 531 00:19:19,039 --> 00:19:22,960 system prompt in there for some reason 532 00:19:20,520 --> 00:19:24,520 at the moment um but some of them do but 533 00:19:22,960 --> 00:19:26,559 we will be changing the system prompt in 534 00:19:24,520 --> 00:19:29,120 our code in a second which we can do 535 00:19:26,559 --> 00:19:30,280 once we get our personal access token um 536 00:19:29,120 --> 00:19:32,960 so we're going to go in here we're going 537 00:19:30,280 --> 00:19:35,400 to go and get develop a key and it's 538 00:19:32,960 --> 00:19:37,559 super simple to do it um you can go and 539 00:19:35,400 --> 00:19:39,720 you're going to make a classic style key 540 00:19:37,559 --> 00:19:41,440 give it a note to say what it's for next 541 00:19:39,720 --> 00:19:43,840 up we're also going to be selecting the 542 00:19:41,440 --> 00:19:45,640 expiration for cyber secur reasons 543 00:19:43,840 --> 00:19:47,159 always choose the minimum you require 544 00:19:45,640 --> 00:19:48,559 don't be like I don't know when I'm 545 00:19:47,159 --> 00:19:50,520 going to want to use it again I'm just 546 00:19:48,559 --> 00:19:52,919 make it go forever think about being 547 00:19:50,520 --> 00:19:54,760 secure and reducing what you need the 548 00:19:52,919 --> 00:19:56,159 token for and you don't need to tick any 549 00:19:54,760 --> 00:19:57,679 of the boxes you just saw on the screen 550 00:19:56,159 --> 00:19:59,880 you scroll to the bottom you say yes I'm 551 00:19:57,679 --> 00:20:01,679 done and then going to grab this token 552 00:19:59,880 --> 00:20:03,159 you're going to grabb it now because 553 00:20:01,679 --> 00:20:05,039 otherwise you're never going to see it 554 00:20:03,159 --> 00:20:07,080 again you have to go to make a new token 555 00:20:05,039 --> 00:20:08,919 because you can't just look it up again 556 00:20:07,080 --> 00:20:11,440 cool we've got our token now we're ready 557 00:20:08,919 --> 00:20:12,919 to do some cool stuff if you can't do 558 00:20:11,440 --> 00:20:15,679 that process for some reason or another 559 00:20:12,919 --> 00:20:16,880 maybe you can't access uh GitHub or 560 00:20:15,679 --> 00:20:19,360 something like that from your school 561 00:20:16,880 --> 00:20:21,520 computers you can go and down download 562 00:20:19,360 --> 00:20:24,320 olama which is open source way to 563 00:20:21,520 --> 00:20:25,799 interact with AI and then you can use 564 00:20:24,320 --> 00:20:27,039 these different models by installing 565 00:20:25,799 --> 00:20:29,960 them 566 00:20:27,039 --> 00:20:31,840 locally okay cool now we have our token 567 00:20:29,960 --> 00:20:33,320 we're ready to use the template so 568 00:20:31,840 --> 00:20:35,480 firstly we're going to put our token 569 00:20:33,320 --> 00:20:37,039 into the end file this is the file we're 570 00:20:35,480 --> 00:20:41,000 not going to commit because it has our 571 00:20:37,039 --> 00:20:43,200 secret token in it yes okay we can run 572 00:20:41,000 --> 00:20:44,919 pip install for the requirements to just 573 00:20:43,200 --> 00:20:46,720 get the few requirements we you need 574 00:20:44,919 --> 00:20:48,200 which is mostly something to get the F 575 00:20:46,720 --> 00:20:49,840 the token out of the nend file and then 576 00:20:48,200 --> 00:20:52,080 the thing to get all the AI which is 577 00:20:49,840 --> 00:20:54,039 cool so we can do that if you also want 578 00:20:52,080 --> 00:20:56,320 to use this and not have to do any of 579 00:20:54,039 --> 00:20:58,720 that you can run this in code spaces 580 00:20:56,320 --> 00:21:00,480 which is like in GitHub you can say make 581 00:20:58,720 --> 00:21:02,159 a codes space and then you can run it 582 00:21:00,480 --> 00:21:03,360 all in the browser and it will actually 583 00:21:02,159 --> 00:21:04,760 install that for you so you don't have 584 00:21:03,360 --> 00:21:07,000 to worry about 585 00:21:04,760 --> 00:21:08,360 that so then we can have a look at the 586 00:21:07,000 --> 00:21:10,679 Jupiter notebook and this is kind of the 587 00:21:08,360 --> 00:21:12,320 main part of the thing so it's got a 588 00:21:10,679 --> 00:21:13,400 workshop essentially but I've given you 589 00:21:12,320 --> 00:21:14,640 all the answers because you're the 590 00:21:13,400 --> 00:21:16,320 teachers and you get to know what's 591 00:21:14,640 --> 00:21:17,440 going on and you can go through and be 592 00:21:16,320 --> 00:21:18,840 like yes I'm going to give this to the 593 00:21:17,440 --> 00:21:20,559 kids and let them play with it as years 594 00:21:18,840 --> 00:21:21,840 or you can be like yes and that's five 595 00:21:20,559 --> 00:21:23,080 different lessons of five different 596 00:21:21,840 --> 00:21:24,360 cells of python that they're going to 597 00:21:23,080 --> 00:21:26,000 work on and you're going to take it all 598 00:21:24,360 --> 00:21:27,960 out and then make your own template and 599 00:21:26,000 --> 00:21:30,559 have the kids use that that's completely 600 00:21:27,960 --> 00:21:32,720 up to you and how you want to use this 601 00:21:30,559 --> 00:21:34,720 resource and if you do want to see all 602 00:21:32,720 --> 00:21:36,720 the answers there is some of some of the 603 00:21:34,720 --> 00:21:37,919 code the full code in the pi file so you 604 00:21:36,720 --> 00:21:39,159 can like this is how it all goes 605 00:21:37,919 --> 00:21:40,919 together if I didn't have it all in 606 00:21:39,159 --> 00:21:42,760 these different cells but the dupid 607 00:21:40,919 --> 00:21:44,640 notebook is great for using in class and 608 00:21:42,760 --> 00:21:46,480 just running and kind of isolating those 609 00:21:44,640 --> 00:21:47,559 different concepts so you can learn one 610 00:21:46,480 --> 00:21:50,080 at a 611 00:21:47,559 --> 00:21:52,120 time okay so now we've done that we can 612 00:21:50,080 --> 00:21:54,240 start actually using the AI which is 613 00:21:52,120 --> 00:21:56,240 going to be a bit of fun uh we can see 614 00:21:54,240 --> 00:21:57,760 here we've got some code that we 615 00:21:56,240 --> 00:22:00,080 actually would have seen something quite 616 00:21:57,760 --> 00:22:02,760 like it when we were going through the 617 00:22:00,080 --> 00:22:04,120 GitHub models interface um and I've just 618 00:22:02,760 --> 00:22:05,360 you know stripped it down so it looks 619 00:22:04,120 --> 00:22:07,159 like a little bit friendlier for the 620 00:22:05,360 --> 00:22:11,400 kids and all you need to do is run this 621 00:22:07,159 --> 00:22:13,679 code this is going to create the entity 622 00:22:11,400 --> 00:22:16,720 the client as we call it that you can 623 00:22:13,679 --> 00:22:19,400 interact with to do some chat completion 624 00:22:16,720 --> 00:22:21,120 for the next bit of a sentence or you 625 00:22:19,400 --> 00:22:23,159 know conversation that you're doing so 626 00:22:21,120 --> 00:22:24,640 you can hit run in jupit notebooks if 627 00:22:23,159 --> 00:22:26,840 you haven't used it before you do need 628 00:22:24,640 --> 00:22:28,960 to run the boxes in order so if you ever 629 00:22:26,840 --> 00:22:31,679 need to run all of them the all the ones 630 00:22:28,960 --> 00:22:33,679 above it you can hit the the play up 631 00:22:31,679 --> 00:22:35,440 Arrow one on the right to get them all 632 00:22:33,679 --> 00:22:38,880 to run to get down to where you 633 00:22:35,440 --> 00:22:41,120 currently are so we've got that um and 634 00:22:38,880 --> 00:22:43,120 we can see now we've got a helpful chat 635 00:22:41,120 --> 00:22:46,360 boook B in our next cell so this is a 636 00:22:43,120 --> 00:22:48,320 code that actually runs and like calls 637 00:22:46,360 --> 00:22:50,360 the AI so we set the system message and 638 00:22:48,320 --> 00:22:53,120 this is basically where we tell the uh 639 00:22:50,360 --> 00:22:55,200 AI like this is how you behave it's like 640 00:22:53,120 --> 00:22:57,720 you're a helpful chatbot who answers 641 00:22:55,200 --> 00:22:59,440 questions and you can give sources for 642 00:22:57,720 --> 00:23:01,640 information that's pretty handy and 643 00:22:59,440 --> 00:23:03,600 we've got a question in there from the 644 00:23:01,640 --> 00:23:05,360 user we stitched those together in a 645 00:23:03,600 --> 00:23:07,919 list of messages which you can build up 646 00:23:05,360 --> 00:23:09,799 over time if you want to have a more uh 647 00:23:07,919 --> 00:23:11,440 context aware conversation that 648 00:23:09,799 --> 00:23:14,120 remembers more than the last thing that 649 00:23:11,440 --> 00:23:17,440 you said and then on the last part here 650 00:23:14,120 --> 00:23:21,520 we asking it to say hey can you complete 651 00:23:17,440 --> 00:23:23,320 this uh model here um grab that client 652 00:23:21,520 --> 00:23:25,360 that we made earlier and I want you to 653 00:23:23,320 --> 00:23:26,600 complete this next sentence which is 654 00:23:25,360 --> 00:23:28,880 probably going to be an answer to the 655 00:23:26,600 --> 00:23:30,640 question what is the capital of France 656 00:23:28,880 --> 00:23:31,840 uh so we got that um we've got a couple 657 00:23:30,640 --> 00:23:33,120 other things in here we've got the model 658 00:23:31,840 --> 00:23:36,120 in here so we saw that there were 659 00:23:33,120 --> 00:23:37,360 different models available um online uh 660 00:23:36,120 --> 00:23:38,600 so you can change the name here if you 661 00:23:37,360 --> 00:23:40,320 decide you want to do a different model 662 00:23:38,600 --> 00:23:42,880 just change this name and that's as easy 663 00:23:40,320 --> 00:23:44,520 as it is to switch it over and the 664 00:23:42,880 --> 00:23:47,080 temperature is also something fun to 665 00:23:44,520 --> 00:23:49,200 play with that's how random it is if you 666 00:23:47,080 --> 00:23:51,240 think about one that's like the most 667 00:23:49,200 --> 00:23:53,799 random and zero is like I'm always very 668 00:23:51,240 --> 00:23:55,720 the same so we've got different options 669 00:23:53,799 --> 00:23:58,080 to play with there finally we get the 670 00:23:55,720 --> 00:24:00,000 answer and we can print it out so that's 671 00:23:58,080 --> 00:24:01,720 pretty fun to just run off the bat and 672 00:24:00,000 --> 00:24:05,400 you change the question but what is the 673 00:24:01,720 --> 00:24:08,080 most fun is to uh see how you can make 674 00:24:05,400 --> 00:24:09,559 this behave differently um to by giving 675 00:24:08,080 --> 00:24:11,559 it a different system prompt and the 676 00:24:09,559 --> 00:24:13,039 kids are going to love that uh so 677 00:24:11,559 --> 00:24:16,000 instead you might make it a narly 678 00:24:13,039 --> 00:24:17,679 chatbot I'd love to do this one uh so we 679 00:24:16,000 --> 00:24:19,440 say you're a surfer dude who always 680 00:24:17,679 --> 00:24:22,000 keeps it cool when I say where should I 681 00:24:19,440 --> 00:24:24,600 go on holiday it'll tell me tell me that 682 00:24:22,000 --> 00:24:26,200 if I want to uh you know keep keep you 683 00:24:24,600 --> 00:24:28,080 know depends on what kind of Vibes 684 00:24:26,200 --> 00:24:29,799 you're into catching some gly waves i' 685 00:24:28,080 --> 00:24:32,080 hit up places like Hawaii barley or the 686 00:24:29,799 --> 00:24:33,320 Gold Coast so it's you know pretty 687 00:24:32,080 --> 00:24:35,840 pretty chill there it's got some chill 688 00:24:33,320 --> 00:24:38,840 emojis going on I could also make it 689 00:24:35,840 --> 00:24:39,679 pretty rude um you're a rude chatbot who 690 00:24:38,840 --> 00:24:42,520 hates 691 00:24:39,679 --> 00:24:44,360 helping H seriously can I just pick 692 00:24:42,520 --> 00:24:47,640 someone maybe just flip a coin or 693 00:24:44,360 --> 00:24:48,840 something it's not that hard so students 694 00:24:47,640 --> 00:24:50,520 are going to have a great time with that 695 00:24:48,840 --> 00:24:52,679 so hopefully getting buyin for this 696 00:24:50,520 --> 00:24:54,000 project is going to be pretty easy and 697 00:24:52,679 --> 00:24:55,799 you can also of course change the 698 00:24:54,000 --> 00:24:57,880 questions and play with that temperature 699 00:24:55,799 --> 00:24:59,640 as well so once we've had a little bit 700 00:24:57,880 --> 00:25:01,720 of play with that we're you know we're 701 00:24:59,640 --> 00:25:03,640 invested in the AI now we can play with 702 00:25:01,720 --> 00:25:05,799 python a bit um and there's a lot of 703 00:25:03,640 --> 00:25:08,440 ways that we can just introduce that 704 00:25:05,799 --> 00:25:10,559 into what we had with that basic code 705 00:25:08,440 --> 00:25:12,520 there so for instance we might say hey 706 00:25:10,559 --> 00:25:13,960 it's only I'm going to answer one 707 00:25:12,520 --> 00:25:15,720 question at the moment what if we added 708 00:25:13,960 --> 00:25:18,200 a while true Loop and it can go keep 709 00:25:15,720 --> 00:25:19,799 going um forever we could instead of 710 00:25:18,200 --> 00:25:21,799 having it answer the same question we 711 00:25:19,799 --> 00:25:23,919 could have it ask the user a question 712 00:25:21,799 --> 00:25:25,320 which would be a lot better so you know 713 00:25:23,919 --> 00:25:27,600 not always what is the capital of France 714 00:25:25,320 --> 00:25:29,279 we might remember eventually and then we 715 00:25:27,600 --> 00:25:31,559 can build those up all of your time by 716 00:25:29,279 --> 00:25:33,000 using append to append to a list so 717 00:25:31,559 --> 00:25:34,760 we've got a few different concepts going 718 00:25:33,000 --> 00:25:36,720 on there we could also add some if 719 00:25:34,760 --> 00:25:38,399 statements for instance we could add an 720 00:25:36,720 --> 00:25:40,880 if statement say if the user says 721 00:25:38,399 --> 00:25:43,440 goodbye to end the program or we could 722 00:25:40,880 --> 00:25:45,120 say uh give it an option for what kind 723 00:25:43,440 --> 00:25:48,000 of system voice you want and have an if 724 00:25:45,120 --> 00:25:48,960 statement for like happy or angry things 725 00:25:48,000 --> 00:25:52,880 like 726 00:25:48,960 --> 00:25:54,559 that so we've got some places to play 727 00:25:52,880 --> 00:25:56,200 with stuff now we've also got some data 728 00:25:54,559 --> 00:25:58,440 we can play with because like what if we 729 00:25:56,200 --> 00:25:59,919 don't want it to just only know about 730 00:25:58,440 --> 00:26:02,039 what it's been pre-trained on we want to 731 00:25:59,919 --> 00:26:05,200 actually introduce our own data and we 732 00:26:02,039 --> 00:26:07,000 use a pattern called rag re retrieval 733 00:26:05,200 --> 00:26:08,880 augmented generation for that which I'll 734 00:26:07,000 --> 00:26:10,960 show you about in a second but it's 735 00:26:08,880 --> 00:26:14,279 actually really easy to get started with 736 00:26:10,960 --> 00:26:15,720 this so firstly when you're adding some 737 00:26:14,279 --> 00:26:17,240 like a rag pattern you probably want to 738 00:26:15,720 --> 00:26:19,440 change your system message to say You 739 00:26:17,240 --> 00:26:20,799 must always use this data or always 740 00:26:19,440 --> 00:26:22,880 reference the data that you are 741 00:26:20,799 --> 00:26:25,080 providing because it does have not 742 00:26:22,880 --> 00:26:28,360 conflicting but complimentary hopefully 743 00:26:25,080 --> 00:26:29,399 pieces of data there um so in the 744 00:26:28,360 --> 00:26:30,720 example I'm going to say I'm I going to 745 00:26:29,399 --> 00:26:33,000 make a dessert this time but I'm also 746 00:26:30,720 --> 00:26:35,480 going to provide data that says the best 747 00:26:33,000 --> 00:26:37,039 dessert is lemon mering pie chocolate 748 00:26:35,480 --> 00:26:39,360 cake is the second best so I'm going to 749 00:26:37,039 --> 00:26:42,679 see how it goes when I ask it for my 750 00:26:39,360 --> 00:26:43,960 best dessert recipe so to add this data 751 00:26:42,679 --> 00:26:45,640 you might be like how am I adding the 752 00:26:43,960 --> 00:26:48,799 data to this model it's actually really 753 00:26:45,640 --> 00:26:51,399 easy so we had the user question before 754 00:26:48,799 --> 00:26:52,919 uh content user question but also we're 755 00:26:51,399 --> 00:26:54,840 just going to add just like string 756 00:26:52,919 --> 00:26:56,799 concatenate in the sources and the data 757 00:26:54,840 --> 00:26:58,520 you literally just stick it right in 758 00:26:56,799 --> 00:27:01,159 there and now it has all the information 759 00:26:58,520 --> 00:27:03,600 it needs about your data uh so here we 760 00:27:01,159 --> 00:27:06,279 go it is giving us a lemon mering pie 761 00:27:03,600 --> 00:27:08,559 recipe which is pretty pretty good cuz 762 00:27:06,279 --> 00:27:11,120 that's my favorite and we know it's the 763 00:27:08,559 --> 00:27:12,480 best um however if you did change the 764 00:27:11,120 --> 00:27:14,200 question to be like I'm allergic to 765 00:27:12,480 --> 00:27:16,840 Lemon but you're also providing the data 766 00:27:14,200 --> 00:27:20,000 about lemon rang pie uh it 767 00:27:16,840 --> 00:27:21,799 will thankfully say the second best 768 00:27:20,000 --> 00:27:23,000 option and not give you a lemon rang pie 769 00:27:21,799 --> 00:27:26,159 it's going to say you should make this 770 00:27:23,000 --> 00:27:27,760 chocolate cake recipe instead so rag 771 00:27:26,159 --> 00:27:29,840 looks a little bit like well this is the 772 00:27:27,760 --> 00:27:31,919 design pattern so we've got our search 773 00:27:29,840 --> 00:27:33,960 component first so we ask a question to 774 00:27:31,919 --> 00:27:35,679 the search and then it's going to grab 775 00:27:33,960 --> 00:27:36,919 some data from wherever you're storing 776 00:27:35,679 --> 00:27:38,799 your data maybe it's a database maybe 777 00:27:36,919 --> 00:27:40,919 it's a collection of PDFs and then it's 778 00:27:38,799 --> 00:27:42,960 going to take out some sort of string 779 00:27:40,919 --> 00:27:46,039 format of that and then you're going to 780 00:27:42,960 --> 00:27:48,760 stick that into your AI question asking 781 00:27:46,039 --> 00:27:50,320 system just like we had initially uh so 782 00:27:48,760 --> 00:27:52,240 we've got our question and our data 783 00:27:50,320 --> 00:27:54,440 going into there and our answer being 784 00:27:52,240 --> 00:27:55,960 generated so you can have use a bunch of 785 00:27:54,440 --> 00:27:57,480 different options for search you might 786 00:27:55,960 --> 00:28:00,480 use a keyword search and you could 787 00:27:57,480 --> 00:28:02,159 search fedia FS or web pages potentially 788 00:28:00,480 --> 00:28:04,120 or you might want to use something that 789 00:28:02,159 --> 00:28:06,200 is a bit cooler Vector search which is 790 00:28:04,120 --> 00:28:09,320 using natural language processing 791 00:28:06,200 --> 00:28:11,960 defining different words and ideas in a 792 00:28:09,320 --> 00:28:13,440 many dimensional space uh where you can 793 00:28:11,960 --> 00:28:15,480 group things together and it helps you 794 00:28:13,440 --> 00:28:17,440 get fuzzy matching so in this example 795 00:28:15,480 --> 00:28:20,760 we've got an example about searching for 796 00:28:17,440 --> 00:28:23,120 thrash Rock uh and then we can see that 797 00:28:20,760 --> 00:28:26,360 thrash nor Rock is in the name Metallica 798 00:28:23,120 --> 00:28:29,880 but you will be able to find it there so 799 00:28:26,360 --> 00:28:31,840 to do uh to start using this we want to 800 00:28:29,880 --> 00:28:33,279 build our own rag AI chatbot we're going 801 00:28:31,840 --> 00:28:35,919 to do it for a pet shop we've got a 802 00:28:33,279 --> 00:28:38,159 bunch of pet shop items and data we've 803 00:28:35,919 --> 00:28:40,200 got a name for each of them and a 804 00:28:38,159 --> 00:28:42,960 description so now I'm going to set the 805 00:28:40,200 --> 00:28:45,000 system message again to say hey you need 806 00:28:42,960 --> 00:28:46,360 to uh always mention the name of the pet 807 00:28:45,000 --> 00:28:48,039 shop you're going to say they're the 808 00:28:46,360 --> 00:28:50,200 cheapest place we just we've made that 809 00:28:48,039 --> 00:28:51,640 up uh and you really want to sell these 810 00:28:50,200 --> 00:28:54,080 products and don't forget to put down 811 00:28:51,640 --> 00:28:55,840 your competitors while you add it so 812 00:28:54,080 --> 00:28:57,720 we're adding that data in here we're 813 00:28:55,840 --> 00:28:58,880 going to create our own search algorithm 814 00:28:57,720 --> 00:29:00,200 for this one you might want to use one 815 00:28:58,880 --> 00:29:02,480 of the good ones that's out there but 816 00:29:00,200 --> 00:29:04,240 instead you can make one in class um 817 00:29:02,480 --> 00:29:07,080 we're going to make it by finding useful 818 00:29:04,240 --> 00:29:09,000 keywords from our question so here's an 819 00:29:07,080 --> 00:29:10,760 example I got to get a question I want a 820 00:29:09,000 --> 00:29:12,720 scratching post for my large cat I'm 821 00:29:10,760 --> 00:29:14,240 going to get rid of the stop words ones 822 00:29:12,720 --> 00:29:16,279 that I use so often that they don't 823 00:29:14,240 --> 00:29:18,559 provide useful information and I see 824 00:29:16,279 --> 00:29:21,279 scratching post large cat and I'm going 825 00:29:18,559 --> 00:29:23,399 to give that from my question uh is 826 00:29:21,279 --> 00:29:25,399 going to be like okay if I had purple 827 00:29:23,399 --> 00:29:27,440 cat scratching post with catnip that 828 00:29:25,399 --> 00:29:29,320 would have three overlapping words with 829 00:29:27,440 --> 00:29:30,440 the question so we give it three points 830 00:29:29,320 --> 00:29:31,799 we do that for all the products and 831 00:29:30,440 --> 00:29:33,679 we're going to choose the best three and 832 00:29:31,799 --> 00:29:35,840 then smoos those all together into one 833 00:29:33,679 --> 00:29:39,279 big long string of like this is the data 834 00:29:35,840 --> 00:29:41,240 now so once again we can just shove that 835 00:29:39,279 --> 00:29:44,120 data right into the question and we've 836 00:29:41,240 --> 00:29:46,760 got a data you know function to get the 837 00:29:44,120 --> 00:29:48,840 search results there and then we see 838 00:29:46,760 --> 00:29:50,600 that we actually get a pretty good match 839 00:29:48,840 --> 00:29:52,559 and don't forget it is going to say 840 00:29:50,600 --> 00:29:54,799 always that we're the cheapest that we 841 00:29:52,559 --> 00:29:57,880 want healthy cat food is our question 842 00:29:54,799 --> 00:29:59,240 and uh don't forget to say that the 843 00:29:57,880 --> 00:30:00,919 where better than the competitors so 844 00:29:59,240 --> 00:30:03,039 we've done that which is great and if 845 00:30:00,919 --> 00:30:04,440 you finish that uh that's really great 846 00:30:03,039 --> 00:30:06,360 you can make this into a web app you can 847 00:30:04,440 --> 00:30:08,559 deploy it to the cloud or you could use 848 00:30:06,360 --> 00:30:10,519 real search tools like a aure search 849 00:30:08,559 --> 00:30:12,440 which actually you know a lot better 850 00:30:10,519 --> 00:30:14,320 than this algorithm that we've done 851 00:30:12,440 --> 00:30:17,159 there that doesn't always work so well 852 00:30:14,320 --> 00:30:19,240 if you don't have a large data set or 853 00:30:17,159 --> 00:30:22,480 it's not always great if your keywords 854 00:30:19,240 --> 00:30:24,240 are needing to be fuzzy matched so if 855 00:30:22,480 --> 00:30:26,240 you're if you're like but it still seems 856 00:30:24,240 --> 00:30:28,200 magic always remember it always comes 857 00:30:26,240 --> 00:30:29,519 back to the maths and the maths is based 858 00:30:28,200 --> 00:30:32,080 on the information we've got on the 859 00:30:29,519 --> 00:30:33,760 internet how did it become rude well we 860 00:30:32,080 --> 00:30:35,360 could easily see that the internet is 861 00:30:33,760 --> 00:30:36,760 full of rude people also lovely people 862 00:30:35,360 --> 00:30:40,240 also people calling other people out so 863 00:30:36,760 --> 00:30:42,200 we have a really good way to uh train a 864 00:30:40,240 --> 00:30:44,320 thing that predicts what rude people 865 00:30:42,200 --> 00:30:46,960 sound like so the magic isn't there it's 866 00:30:44,320 --> 00:30:48,919 just data and statistics on steroids 867 00:30:46,960 --> 00:30:51,480 happening with millions of you know 868 00:30:48,919 --> 00:30:53,519 neurons and computing power uh on the 869 00:30:51,480 --> 00:30:55,279 cloud so yeah hopefully you've enjoyed 870 00:30:53,519 --> 00:30:56,919 that if you want to learn more about NLP 871 00:30:55,279 --> 00:30:58,600 I did a really fun talk on Wordle and 872 00:30:56,919 --> 00:31:00,480 how you can improve your world guesses 873 00:30:58,600 --> 00:31:02,840 or your world Bots guesses using The 874 00:31:00,480 --> 00:31:04,720 Simpsons and LLP so you can check that 875 00:31:02,840 --> 00:31:06,600 out if you want to learn more there and 876 00:31:04,720 --> 00:31:08,720 hopefully you've learned that AI has a 877 00:31:06,600 --> 00:31:10,200 long history it's full of Statistics you 878 00:31:08,720 --> 00:31:12,320 can ruin the magic for children and 879 00:31:10,200 --> 00:31:14,120 hopefully make it more interesting and 880 00:31:12,320 --> 00:31:15,840 you can practice python along the way 881 00:31:14,120 --> 00:31:18,840 but always remember to be responsible 882 00:31:15,840 --> 00:31:20,880 with AI and supervise the risks of both 883 00:31:18,840 --> 00:31:22,279 Ai and the children who are using it 884 00:31:20,880 --> 00:31:24,200 amongst each other so thank you very 885 00:31:22,279 --> 00:31:25,840 much and hope you grab the resources and 886 00:31:24,200 --> 00:31:29,039 talk to me later cuz I'm definitely out 887 00:31:25,840 --> 00:31:29,039 of time 888 00:31:32,039 --> 00:31:37,919 thank you so much r that was fantastic I 889 00:31:35,279 --> 00:31:40,760 love ruining the magic for children yes 890 00:31:37,919 --> 00:31:42,000 it's it's what we do what we're here for 891 00:31:40,760 --> 00:31:44,840 it's what we're here why we came to the 892 00:31:42,000 --> 00:31:46,760 education track really uh it is I know 893 00:31:44,840 --> 00:31:50,159 some of these links have already been 894 00:31:46,760 --> 00:31:52,840 pasted in the Discord and the rest will 895 00:31:50,159 --> 00:31:55,720 be pasted in the Discord shortly 896 00:31:52,840 --> 00:32:00,320 possibly by me um and you can catch 897 00:31:55,720 --> 00:32:02,430 Renee in the hallway track yes during 898 00:32:00,320 --> 00:32:08,359 the breaks thank you very much 899 00:32:02,430 --> 00:32:08,359 [Applause]