 Mike, good. Yes. Hi everyone. I'm James. I have a little bit of housekeeping myself for those of you who've just arrived There is an interactive portion of this to the latter half If you want to join in on your laptop, please follow those instructions I'll leave them up for a couple for a minute or so still Also, if you are connecting to the Wi-Fi and you want to take part in the interactive session I would suggest strongly that you switch to a mobile hotspot just so that we don't don't all clobber chat.openia.com from the openai.com from the same IP address because we will be rate limited Right Let me know Okay, let me know if anyone still needs this up Okay, cool. Yes, doesn't sorry go Just had that. Yeah, this Docker image doesn't work on the on the M1 silicon on the new Apple chips It is just you can just download the standard WordPress thing and look at the Docker compose file the important bit is that you have amounts for the plugin direct for the WP content directory and Pretty much yeah And out of preference I put my database in a separate container Right anyone else Great Sweet, okay, so and I need Stan yes the mic The name my talk how I learned stop worrying and love my new AI overlords Any chance I get to channel Peter Sellers and the Simpsons at the same time I'm down So my name's James. I'm a software developer. I'm a wannabe maker carpenter Electronic person who sold is incredibly badly I'm a tabletop enthusiast board games role-playing etc. And I am an armchair opinionator Which is pretty much my entire set of credentials for this talk. I? Graduated with a BSC in computer science from the University of Newtown, South Africa Got an MSc and bioinformatics from the University of Stellenbosch in South Africa I've done stints as a teacher and a lecturer in programming. I've done some proteomic analysis on mass spec machines I have sold my soul and done health insurance data analysis. I'm sorry and I've also worked on the very early generations of the biosensors to do pulse blood pressure, etc. And watches I Worked for WP engine. I grew up in South Africa and I moved to Ireland about five years ago when I joined WP engine Ah Some disclaimers and just to set some expectations for this talk. I'm not a wordpress developer I have tangentially helped my wife out on occasion with some wordpress Plugins, I do know PHP reasonably well from the 2000s. So I'm a little out of date on the PHP there I'm not an AI expert, but in my defense as part of bioinformatics I did do a lot of machine learning stuff So I have a reasonable idea and a fair grasp of what's going on under the hood as much as anyone does Who isn't actually deeply involved in modern? Large language models. I'm not a business expert. So I'm not going to be able to help you sell your stuff All my opinions are my own and entirely AI generated all hail of new Ava AI overlords So that's who I am I'd like to get a sort of show of hands as talk has sort of pitched it a bunch of different people and a bunch of different a Bunch of different personas in the community So can I get a show of hands who here uses wordpress as a blog as a content generator on a sort of Individual basis or for a small business Okay, so that's sort of about a 30 you yeah that tracks, okay Who here works for an agency marketing users wordpress is that? Okay, and I see some of those hands have been raised twice. Okay, who here develops plugins or works on the core? Okay, right a Third a third a third with a little bit of Venn diagram mixing in the middle that yeah, all right. So this talk is for everyone here, I hope a little bit less so for the agency folks I think but We'll see how we get along Right, so I like an interactive audience feel free to interrupt with questions If that disturbs the recording because we have to pass a mic around let me know, okay. Thanks Ideally don't save him to the end that being said we are on a time limit. So I may pull out the old line Talk to me after the show for that Pre-requisites like I said, please have Docker Installed and ready to go pull those images if you're on an M1 do what you need to do and I Suggest that you get those pulls going if you haven't already whilst I talk at you for the next 10 to 15 minutes Right so My talk broadly is going to cover My opinions and they are mostly my opinions on how AI Specifically generative AI is large language models chat GBT bar, etc are going to be Influencing and changing the WordPress community over the next year to five years So Who here feels nervous? Why is this not in slideshow mode? Oh Sorry Who here feels nervous that AI is coming for their job if you are in the sort of content creator blogging side of things show hands No one Okay, one or two one or two. All right Spoiler you're not wrong To those people who didn't raise their hands, I think we should be okay, so For content creators what we've got is AI is probably not going to again my opinion significantly influence your jobs In the next year or two that might change in the next five years things are moving very quickly in the field But specifically if you're already doing the job if you're already taking money from clients or in an agency And you are generating content on the day on the day today You have probably already used chat GPT to give me a list of 10 things to do in Athens whilst I'm at a conference And I think AI use correctly will increase your productivity the question is is the market going to expand because Everyone can go to chat GPT and generate a list of 10 things to do in Athens and how many of those are we gonna see? so I Mean we saw it in magazines when the internet became a thing You know fluff magazines on travel magazines on planes went away because the internet took over So for me, I think the big question here is Is the market going to expand to meet the supply of Content generation because content generation is going to be massively accelerated And I suspect your jobs you'll know better than me probably will mostly transform into more of a sort of sub-editing or fact-checking role And I I need to stress the fact-checking role I'm sure if you have used chat GPT or any of the other ones you've realized how they can go spectacularly wrong and more importantly confidently spectacularly wrong But with that the competition for eyeballs is only going to get fiercer so I think that quality will out Outpace not outpace outmatch quantity eventually For those of you who are developers who are actually working in the WordPress code base or working on plugins who here feels nervous about AI replacing their jobs No, what one hand two hands three hands. Okay. All right Spoiler alert again. I think people with hands down. You're right because we will learn by the end of this We're okay Oh Sorry, yes. I Wanted to point out this so all of the images I have done are generated with Darley. I've got the prompts at the top there One of the reasons that I'm confident that humans aren't being replaced is that it took me Several dozen attempts to get decent images out of that for what I wanted And for some reason Darley thinks humans on ladders have three arms Right so developers Is AI coming for my job probably not I think is my answer Uh What developer tasks is AI good at? Small specific and solved I mean anyone who's used it already will probably know, you know, I want to transform this markdown table into HTML or vice versa Spot on fantastic a three gigabyte table done in a minute. Fine I want to take that markdown table and integrate it into this other page that you've been working on that I have given you several hints about the content and context of and Now you've just gone and forgotten that context because you start a working on a different problem And I got past the maximum token stream. I like Okay, that's not helpful so where where I found that AI systems large language model systems tend to fall down when You have lots a large amount of context that it needs to juggle and you are juggling on specific bits I'm switching between them and it just kind of it kind of focuses in on the thing that you did most recently and doesn't integrate it Properly with the thing that you did before Again what it's good at boilerplate refactoring Advanced linting. Hey, can you double-check this double-check my code and make sure that it's up to the WordPress coding standards fantastic Let me not say fantastic pretty good Where is it not so great? So I Don't know how many of you get deep into SQL, but there is something that you can do an SQL called ranking So you have a bunch of stuff and you've got a bunch of teams and a bunch of players in the teams And you want to get the top player by goal in the season for the team That used to be a really gnarly difficult query modern SQL I think from about eight onwards has some convenience functions added that make ranking substantially simpler Chat GPT knows about my SQL 8 and up you ask chat GPT It gives you a nice little thing you try to run it on a certain hosting companies thing who doesn't have an up-to-date My SQL and they won't allow you to update my SQL and you get random error Well, not random you get weird my SQL errors you tell chat VP GP about those errors and chat GPT goes I don't know here's the same thing again because chat GPT was never trained on pre my SQL 8 documentation So it doesn't give you the solution and when you tell it I can't use higher than my SQL 5.8 or whatever Even then it goes. I'm sorry. I don't know anything about before my SQL 5.8 Maybe that's improved in the last six months, but that was one of my one of my issues with With it the other thing is new technologies Here's a singer which we will encounter later on chat GPT doesn't know about the latest version of itself That's not surprising But when you're trying to use chat GPT to write a plug-in to contact chat GPT It is a bit of a surprise And then like I said the composing of small solutions into larger systems Tends to get it very confused so Here's my take on it AI is going to transform developers jobs You're gonna need to learn to use AI to increase your productivity to keep up with your teammates and your competitors You need to understand the AI results and learn how to be able to tweak them. You can't just take what it gives you for granted The skills that you're gonna need to develop if you haven't got them already are how to compose separate Specific tasks that chat GPT or another AI system has solved Into a more complicated system and work on those integrations and right now most of those integrations are going to be manual tweaking It's still on you to keep up to date with the latest mice with the latest mice QL Version and all other new technologies and also if you're developing cobalt or some other really old technology then Yeah, you're still on your own and the banks will pay you a huge amount. I'm sure So For those of you that had your hands up originally when I asked if you're nervous has your opinion changed at all Anybody anybody sticking with their guns. It's still nervous that AI is coming for you. No one. Okay. Yay. My job is done So there is a threat from AI though and really that that It's subtle and it's probably At least to me. It took me a while to kind of like process it in my head and figure it out Like I said AI is good at small specific tasks. It's coming for you low for the low hanging fruit first For those of you who are writing content for a living when your boss is going to be asking you for a thousand words By the morning on a trip to Athens and what to do Yeah, sure they can just go and ask AI So that aspect of your job is honestly probably under threat For the developer side when your team lead needs you to make the plug and call to an API that injects the results into a page Chat GPT small specific task Probably easy to do The trick is going to be in knowing what to ask for and I was having this conversation with one of you last night And you need to know where you're going. You need to know what you want the results to be in order to effectively use the tools Sorry, I'm a little too close to the mic and boomie there and Like there's a there's a thing called prompt engineering coming out That's not what I mean prompt engineering is more about the how and like the actual language that you use To to communicate with chat GPT I'm talking more about the actual you need to know the context and the thing that you're trying to do and the result that you're trying to achieve in order to Essentially validate what chat GPT gives back to you So that unfortunately requires experience and it generally means that to get that experience You have to have done the job yourself at least once or twice to kind of know what's meant to happen And it you know that means that you need a deep understanding of the basics So this is why I say that the threat is subtle those of us in this room who already have jobs and who are already working in the field and Already active in the WordPress community The stuff that we do chat AI systems are going to help us do our jobs But for people new to the community for the junior in your job who's coming in fresh graduate from university or something They're the people who are not going to get the learning opportunities Because their tasks is going to be go do this go ask AI chat GPT Bard to do this thing Come back to me with a thousand words or a function that does X and that's not a learning experience anymore So again This is a darling image This is probably the one that I had the most trouble with to be honest I Like I said the number of times I got three armed people climbing up ladders I don't know where that came from But we we need to be careful that we don't pull the ladder up behind us We know we don't want to chop off that bottom rung and raise the barrier to entry to getting into our community So how do we leave the ladder down and how do we help others up? Sorry, I jumped ahead of slide Yeah, we need to start incorporating the idea of using AI tools for educating in our community For doing our jobs whatever those jobs may be and for teaching people Actively when they are using those tools the bits that those tools don't cover for them Provide the learning experience that we had banging our heads against the wall trying to do things And and that's not as simple as don't use an AI tool because people need to learn how to use them We just need to be I think more cognizant and more focused on the idea that we need to get the groundwork the basic concepts across to people who are new and to do that in a way that allows them to leverage AI systems without Using them and relying on them exclusively How we do that that's a discussion. We need to have I don't know Yeah, okay, so I think I've already asked have I made you less nervous Now have I made you more nervous with that? Does anyone have any comments or ideas on this? Like I said, I'm looking for some interactivity here Any other opinions fight me? Nope. Okay Right so now for the practical fun stuff What we're gonna try and do is we're gonna try and use chat GPT to make a plug-in Contacts chat GPT to replace the selected text in the block editor with some chat GPT generated content Taking what the selected text was as a prompt Expectation setting chat GPT is random. There is no guarantee. In fact, I think there's the opposite I guarantee that I'm not gonna get the results that I got when I was preparing for this We may not get to a working plug-in There is a link at the end of this to Google Drive folder where you got the docker compose file from Which has the working solution? I Didn't get there solely with chat GPT And I don't think anyone could no matter how random it got precisely because it doesn't know about the latest version of itself And especially like I put some screencasts up about how far I got with chat GPT But there are multiple gigs and you should probably watch them at five times speed because watching me type and chat GPT scrolls quite boring All the links are at the slide on the end at a slide on a slide at the end Okay, I suppose let's get into it So feel free to follow along on your laptops Chat.openia.com is what you're looking for Sorry, let me enhance Um, what? Right, so I've cleared my chat history If any of you have worked with this before you will know that it learns from what you've done So I don't want to be influenced by the stuff that I've done already I'm gonna start with a new chat that chat is gonna be So I'm gonna give chat GPT a persona to work as so you are a WordPress developer Do my best to assist you. Thank you. Great. Um, I'm I wait here wait I Want to write a plug-in That calls chat GPT to replace Selected text in the block editor Edit or edit or With Chat GPT Generated content Let's see how this does so it's Telling us what to do Yes, requires a good understanding of JavaScript WordPress, etc. So we can have a look at this But let's be honest. I'm lazy and I want to see some code. So I'm gonna say I'm Okay JS file, great Okay, I can already spot a couple of problems here, but let it finish Yeah, roughly speaking are you guys getting the same responses so far? For example, how many of you have got a file that doesn't have a separate JavaScript bit split off into a separate file Yeah, one two a couple of you. Yeah, okay Wait till you confuse it later when you ask it to use WordPress coding standards. Sorry. Yes a question. I Think that this is for yes, sorry, this would be for at the moment. I'm on paid So some of you will also not be getting the same responses if you are on free accounts Thanks for the reminder Okay, so what do we got we got a php file that looks about right plug-in In queue my script I See that it's picked my plug-in name is just chat GPT. So I want to change that Fair warning. Yeah, sorry. Yes, go. Oh, okay. Oh, yes, right good point. Huh? Why don't I pick my login up? Oh, well, it is what it is Yeah, I must have oh, right. Sorry. Yes, I paid on my work account and this is my personal account Expensing and all that right so sorry. Yes, this is this is three point five my bad Thank you for picking that up. Um, so It in queue some scripts Registers the API endpoint Yes, okay Chat GPT it gets some text It once a chat GPT API key. Yes, that's looking good. It sends it with an authorization bearer Sends it with a prompt max tokens. Ah, okay. So here's the thing This bit here The DaVinci codex is no longer a model or It's gone that they have replaced it so that URL doesn't work anymore. That was the one bit that I ran into Where you know it was chat GPT doesn't know about the latest you API endpoints for itself So we'll have to update that manually. We'll get there Yep prompts is the input text max tokens 50. Oh, you're cheaping out on me. It used to be a hundred Make the WP remote post. Oh, so the first time I tried this the it didn't use WP remote post it used curl and Only after I asked it to do WP WordPress coding standards did it change it and now it seems to have remembered that at least in my personal account Error checking so that looks pretty good to me the JavaScript is where I tend to get nervous so Data subscribe selected text, you know what? Let's give it a shot so I'm gonna copy that wait. Has it actually told me what to do with this. Yes create a file and It doesn't tell me what to do with this so I should ask oh Wait, it finished up learned doesn't tell me right so I'm pretty sure that there is a plug-in already called chat GPT content generator Which I didn't know the first time I tried this and when I did it tried to tell me that there was an update for my plug-in locally So I'm gonna say I Want to call my Plug-in smart Mouthed Robot from getting Simpsons into the title. I'm getting Futurama into into the workshop Okay, so now So that's the odd thing there. It seems to have Not picked up the change for our JavaScript file. Okay cut and paste time Is that big enough no probably not hang on is that big enough for folks to read? Let's go have a look at the Here it is Robot plug-in very URL That looks about right. Okay, is everyone following along, you know why I'm replacing this piece of scripts because I changed the plug-in name Great All right Let us see how we are doing All right, I should have done this before but I've downloaded everything Right. What are you listening on? Oh wait? Static Docker compose file. Sorry the first time I tried this I tried to make the Docker compose file using chat GPT 2 and it also Kept changing the the port 8000 so We hit Local host 8000 we get a fresh WordPress install We get a fresh WordPress install. That's Good Don't judge me very weak. Why are you not giving me install word? Oh confirm the use there we go Judge me fine Am I doing for time? Okay? We'll see how far we get. All right. So if we hop over to plugins It hasn't picked our cut picked up our plug-in Wait, that is because I haven't saved the plug-in No, that's because I put the plug-in in the wrong place my bad I'm just making a plug-in directory and I'm gonna move all my smart mouth robot stuff To WP content plugins robot And I'm gonna do a refresh boom Okay, so first obvious thing it did not update the name of the plug-in Sorry, if it's not obvious you are not obliged to use them personal preference. I'm a masochist Never tell that to any max person Yeah, that'll do Yes, okay, we're gonna activate that and We are gonna go and create a new post and see how it has done something for us Add a new post. I'm not actually seeing this working. That's not a surprise So let me go back to the code and see how it expects this to work What's it hooking into? So data WP data, sorry, let me highlight the line here WP data select Core editor get selected block attributes content. Yes But it seems so oh, it's subscribing Okay, somebody who is more familiar with WordPress in the block editor This is a new one. I haven't seen this particular Generation from chat GPT before WP data dot subscribe. Does anyone know what that's gonna do? Nope. Yes, okay Okay, but it won't trigger when I actually select text Yeah, okay. All right, so then I'm gonna try this again I Would like the plug-in to Create okay, I'm jumping ahead here just in the interests of time post meta Button that the user can click to initiate the Text replacement and scroll down Almond. Yes meta box. Okay. This is starting to look more familiar So what's it saying? Create a post meta box use you can click. Okay, that's what I asked you to do Here's an updated version Yeah, it's in queuing a style now. That's new Didn't ask for that but thanks in queue block editor assets. Yeah. All right API endpoint make the call register. Rest root. Yes That's mostly unchanged So this is all PHP though It has added a meta box, right can you update the JavaScript to Trigger on the click of the post meta button Okay, at least it's It deals with auto corrupt. So what do we got now? Okay, we got a function to handle a button click and We have a on click The button call the function right This is going to WP data select call get the attributes content. Yeah, okay I'm going Okay, you're welcome to take what you've got copied in and try it out locally I know this isn't gonna do what I wanted to do So I'm just gonna jump ahead the reason that I know it's not gonna do what I wanted to do is Because it's not gonna actually get the selected text. It's going to get it's gonna expand itself to get all the text in the block Where text is selected at least that's what it did previously So I'm gonna ask can you Can you Ten minutes. Okay. All right. Ah, okay. All right. Um, good to know All right Selected text trim. Yes, this is looking better This is new to me, but I'll take it All right, I'm just gonna copy this and pop it into and where was the last PHP section This may break or at least this may look weird without the CSS. We'll figure it out. Okay, right That error message is going past way too quickly Right, okay, I don't know what has gone wrong here Back to the code Kill the style I'm happy to take pair programming advice here if you spot the error, please let me know I would if I could see the error message But actually yeah, why not Sorry, I do I have an API key and a text file that I will add We haven't even got to the point where we can initiate the click though Like as I said like the point of this was not to get to a working plug-in The point of this was to show how hard it is to get to a working plug-in That's my story and I'm sticking to it Okay No How am I for time? five minutes, okay, ah Sorry, we didn't get as far as I would have liked I'm gonna call I'm gonna call it here. I do have a working example on the Google Drive That is linked in the slides which I will get back to now So One I hope that this is for those of you who haven't done this before I hope it gives you an idea of the workflow of using chat GPT we have reports that chat GPT for is better So maybe chat GPT for when installed in the robot chasing you it will actually catch up to you There's the link You should have the slides available on the website to download where that link is clickable And you don't need to type that horrible monster out There's also a screenshot a screencast two and a half hours long of how I generated the docker file And I will upload a screencast of my initial fights with this But it's more than two hours long and several gigabytes So I have not uploaded it over the how to hotel Wi-Fi or this Wi-Fi I'll put that up when I get back to the office on Monday I have a couple of other things for those of you who actually want to learn more about the the image of Large language models. I can highly recommend Steven more from chat GPT write-up link link there bite bite goes Deep dive video is very good as well For those of you who just want to like get some cool ideas about how to use chat GPT Chances are that they were listicles generated by chat GPT themselves But hell's world has like I think it's 21 ways to use chat GPT And then for those people who are concerned about AI and the general threats to humanity I highly recommend the alignment newsletter podcast It really dives into the It really does a deep dive into the alignment problem for those of you who know what that is who don't know what that is That's we train AB that that is the problem that AI's don't necessarily solve the problem We think we're training them to solve because we don't really Fundamentally have an understanding of how they learn and so there is this whole sort of meta field of AI research about how do we inspect AI models to understand how they work and how do we Validate prove work with and constrain AI's to work within various boundary ethical boundaries legal boundaries, etc really It's meaty. It's a lot to chew on there, but I highly recommend it Thank you very much It's been fun Thank you