 First off, before I start, I'd really like to say a big thank you to the organizers of this conference, all of the sponsors and the volunteers and the beautiful city of Wellington for hosting us. Thank you very much. All right, welcome to uplifting content with AI with a focus on NLP Cloud and ChatGPT. In this presentation today, I'll be showing you how you can integrate AI services into Drupal and to do that in a scalable way. Before we jump in, I'd just like to take you through a few foundational ideas that are sitting underneath this presentation. The first one is that Drupal is a content experience platform. And by that, I mean that the content is at the center of the universe there. We're trying to bring the AI smarts into Drupal rather than copying and pasting content out to AI services. A really favorite saying of mine is that data matures like wine and applications like fish. It's nice to hear a few chuckles there. I often hear people say, oh, I think it's the other way around. But really, it's all about the content. And ideally, your content is going to be getting better over time. It's going to have higher quality. It's going to be more structured. It's going to be future-proofed and capable of serving different applications. So that's very much an idea behind the uplifting of the content that we're discussing today. Also, we're looking at tools for authors, editors, and marketers. Of course, you can write custom AI applications or integrations with Drupal. But here, we're looking at exposing those to the editors to make their day-to-day lives a little bit easier. And we want to do this in an automated way. So by that, I mean that augmentations and content uplifting can happen, say, for example, when nodes are saved automatically. So it's not just an editor working on one piece of content at a time manually. Things can be automated. And then we can scale that out as well so we can then apply this AI uplift to many content items across the whole corpus. And the aim here is to unlock productivity gains for your editors. OK, 2023. What an amazing year it's been so far for AI. Each week that goes by, there's a whole string of announcements that are made. This is the Gartner Hype Cycle for AI for last year, 2022. And on the vertical axis there, you have the expectations. And you can see there's an awful lot of technologies climbing the hill there from innovation trigger up to a peak of inflated expectations. You'll see generative AI at the top there, or nearing the top. And it's fair to say we're right at the zenith of that first hump there when it comes to generative AI, certainly with the release of chat GPT. AI is very much in the public consciousness. There are other technologies here as well. We have natural language processing, AI cloud services, and data labeling and annotation. We'll be touching on all of those today. OK, so we're going to be looking at two AI services. The first one is chat GPT. I've been talking to a couple of developers here at the conference, and many of them are using co-pilot to great effect in their day-to-day development. Chat GPT has been the fastest growing service in humankind. I think it reached a million users in the first week. And of course it's gone from strength to strength to capture the imaginations of a lot of people. The underlying engine, chat GPT-4, is a big step up from GPT-3. And it's now capable of being used on a very wide range of domains and use cases. The other service I'll be showing today is that of NLP cloud. I could have picked any number of services here, but I did pick NLP cloud because it contrasted somewhat with the approach taken by chat GPT. NLP cloud works on textual content. But it does vary from open AI's offerings in that it hosts many different models. So NLP cloud will take open models, host them on their servers, and give you access to them via APIs. So you have a lot more choice there in the APIs that you would like to use. Here are some of them. As I said, most of them are concerned with operating on text. And you can see that the models they're using are actually some of the earlier ones that open AI release back when they were open. One of the very interesting ones there is classification. And this is where we're able to classify content according to a controlled vocabulary. This is something that's harder to do with GPT-4, which will just create the next best keyword. Here we can use a controlled vocabulary, and we'll be seeing that in use later. So there are the two services we'll be looking at. We do have three Drupal modules that we'll be using to bring all of this together. The first is the Augmento model. So shout out to Naveen and Elio there who've worked on a lot of the code for that. Augmento is a system, a plugin-based system for integrating different AI services into Drupal. There are a number of services that have been implemented. The ecosystem is growing. We'll be having a look at ChatGPT, an LP cloud there. But as you can see, there are many others to try out as well. We'll also be using a module called the Event Condition Action, or ECA module. This is a very impressive module in my mind. It took me a little while to find it, but now that I have, I'm quite happy. ECA is like rules for Drupal 7. It's like a ground-up rewrite which makes use of the event APIs in Drupal and the actions API as well. And it basically allows you to orchestrate different processes in a visual way. So ECA does this through this tool called BPMN, Business Process Model and Notation. So this is ISO standard, it's a no-code visual tool for dragging and dropping and creating these processes. And it gets exported out as XML, and then that can be imported into Drupal to drive other configuration. So in this particular case, on the left we have a trigger, an event, and this one is pre-save content. So when content is being saved, just before it gets saved, that's the event that's being triggered. And then the label on that first edge there is auto-populate. That's actually a condition saying, has that auto-populate flag been set? And if so, okay, let's run the rest of it and we then have the actions which are the rectangles there. And we'll be going into those in a little bit more detail. So this is quite a simple linear one. You can, of course, create sort of more advanced ones. And it's really sort of fun to play with if you want to put together some cool logic based on your core Drupal installation. And there is another module, ECA VBO. This does what it says on the tin. It just integrates ECA interviews bulk operations. This is where the scalability comes in. So we're able to apply these augmentors and actions across the whole corpus. So that UI that you get there is you have an admin screen and you can configure up these actions now through VBO and apply them to multiple objects at a time. So bringing all of that together just so you've got it all in your head. I like to think things in Drupal are simple, but then when you lay them out like this, you do see there are quite a number of moving parts. You know, on the left you have the external services. Augmentor brings them in. Augmentor has implemented the actions API, which makes it available to ECA. And of course, ECA is integrating with these bulk operation. All the ones in green, this is where the editors can uplift the content. So Augmentor has a plug-in for the WYSIWYG. It has a field widget on the node edit screen to bring in content. And on the ECA side of things, of course, you can set up automations and bulk operations. Okay, so let us pray to the demo gods. I saw a presentation yesterday where the demo gods were not kind and I did not want to anger them today. So I did preemptively record a video. So what I'm going to do is sort of walk you through this. It's a rapid pace one, but we're just going to go through what this looks like in Drupal. Okay, so this is a demo site that I've got with Augmentor enabled. And we're going to go in and have a look at the augmentors now. Okay, so it's a plug-in system. And you can see there that we have many augmentors defined, just sort of testing out a few things. Down the bottom you can create new ones and, of course, you can create a ChatGPT one or various NLP cloud one. But we're not creating new ones today. We're just going to have a look at the ones that already exist. So we're going to go up and have a look at this Ask ChatGPT, one that we've created. This is very, very simple. You can see it's got the OpenAI connection there. We're setting a context to the system saying you're a helpful assistant. And we're just passing the input through as the prompt there. This is the simplest of all the inputs. We're basically just saying whatever the editor types, we're just going to send that through to ChatGPT and get that one back. So that's the first Augmentor very sort of simple setup. We do have another couple of ChatGPT ones here. The first one is social message. So this would be great for creating social messages for LinkedIn or Twitter. And we can prime the ChatGPT to be a helpful marketer. And we can ask it to write an engaging piece for us. And then we have summarise, very similar. We're just asking it to summarise for a second grader. So you can see you can define any prompts that you like, plug them in. So you can really define, you know, ask sort of ChatGPT what you want of it. Here's NLP Cloud. This is the blog post generator one or new article. It's very much more targeted. You don't really have to send any parameters over there. Basically, you send an input and you get the output back. And the next one is the classifier. This is an NLP Cloud classifier from a control vocabulary. In this case, the configuration screen is a bit more advanced. You can say for content audience, use that control vocabulary to classify the content. And you want to reach that threshold as a score to beat, basically. And yeah, basically, that's it for the augmenters, right? So hopefully that gives you a flavour of how we're able to configure up these different plugins. Now we're going to whiz over and have a look at ECA in the back end there. So you go to the workflow section and then you've got ECA. We've got two. One is the auto one, which will happen on node save. And the second one there is a bulk one. So we've had a quick look at this one already, but the circle represents an event that gets fired. The auto populate there is a condition. And we're checking a field on the node there, making sure that was set. And then we've got two augmenters here. So the first one is the social message one. So we're getting the title and the body out of the node that's being operated on. They're the source fields that we're getting it from. And then we have a target field of the social message. That's the field we're going to write the data in. And then we've got the augmenter down here. We're going to be using the social message one that we just saw configured. So that's the heart of what's going on here. And then we have a couple of flags that we can set on the node. So the first one is set the check. That's saying, hey, editors, you've got to check this content. It's been auto populated. Please make sure that you go in and make sure it's all OK. And then the second one there is to deselect the auto. So we just want to turn off a flag as well to make sure it's not run again. And finally, we have the message there as well. It's just a reassuring message to the user at the end so that they're all feeling comfortable that their content has been updated. Now, this is the bulk one. I'm not going to talk through all of this just now. We will have a bit more of a look at that later. But it is very similar to what we're already running. OK, so I'm going to flip over to the next one. So we've seen how the back end has been configured. So it's going to be like a site builder kind of set up there. Now we're going to have a look at what the editor experience is. So we have our trusty create article page. You're going to see three things here. We're going to be playing around in the node edit screen and giving augmenters a bit of an exercise in the node edit. We're going to see that auto populate flag kick in on node save. The bulk operation is a bit of a go as well. So let's kick this one off. So the first thing I'm going to do is I'm going to go down to the body and I'm going to paste in an article that I want to know about. It's basically about the best books for youths. Now there's that augmented drop down there in the WYSIWYG. So augmenters can be exposed into the WYSIWYG and we've selected the chat GPT one. So probably a little bit fast on that. But basically there's an Ajax call going back into the back end of Drupal. There's a private API connection made to the API at OpenAI. The wheel starts turning there and a response will be generated. This is quite a demanding operation because there's a number of relatively large response being built. That will then get sent back to Drupal and then the result will be sent through back to the front end and that's going to then be populated into this WYSIWYG. So we've now got a nice article coming back and you can see even down the bottom there it's even talking about the themes and things like that that we asked it to do in the summary. Up the top we're now doing generate headline. This is an NLP cloud augmenter and using the field widget. So NLP cloud has produced that headline and sent it back. We've now got another field widget here to summarize and this is going to be using chat GPT summarize augmenter that we saw. That's now come back. I think that's probably a really key feature there. We've also got social message and you'll remember that we asked chat GPT to pretend that it was a marketer and was going to write engaging marketing content and you'll see that the language that's coming back here is a little bit more sales-y, so to speak. And then finally down the bottom, we've got our audience sort of field here. So you remember we had that classifier one. I've clicked the button now. The content is going off to NLP cloud and it's returned, I was a bit quick on that, but just one youth field there and then we were able to populate that taxonomy field. So that's sort of stage one. It's like playing around on the node edit screen. You've seen the WYSIWYG stuff working and you've seen the field widgets going. Now we're just going to go into stage two now. Just pretend I'm a really lazy editor and I haven't written my summary or my social message and I want to auto-populate those. So that's what we're going to go in and see just now. So I'm clicking that auto-populate checkbox there and that's saying to ECA model, okay, you're going to have to run. So I'm just blanking those out. Now we're going to save and this is where the ECA model is going to kick in. You can see that it's an article. You can see that that field has been clicked and now it's going to be running those other actions. So we're going to be doing the summary, the social message and we're going to be setting those two. Okay, so that's come back. Let's have a look, see what's happened. Okay, so we can see the auto-generate flag has been turned off, so that's worked. The check has been turned on. The summary field has been filled in and also we now have a social message there as well. So that's basically a little success there for the auto-population of the content. This may be helpful if you have editors as a general practice and not filling in their summaries particularly well. The final part of the demo now is we're just going to look at the bulk populate. So we're just once again going to blank out the content and we're just going to set the checkboxes again. So we're getting rid of the check. We're doing the bulk populate one now. So this is the flag that the bulk population will be running on and we'll save that. That should save very quickly because there's no auto operations happening. We're coming over into the views, the admins section and we've got our special augment view here and you can see that we have this one action, this one VBO action that's been defined and we're able to select that and apply it to that particular item. Now this does take a little while to chug through so I'm just going to flip back here to the model. This first event is the interesting one. You can see at the top right that that was a VBO event and we're once again sort of similar pattern of having the condition there and then our sort of actions that are all operating on the various fields. With VBO there is a slight difference. You do have to set the save, right? You do have to save that entity after it's being processed. So you've got the save entity set the message. Cool, so we're going to flip back and magically that VBO has run. We've had one update. We're just going to come in and we can see now that the field has been unset, the check's field has been set and once again these fields have been unpopulated. So that is the conclusion of the demo basically. I think when you're looking at this you can hopefully see some of the possibilities that are here, especially if you have, say, sites with thousands of nodes without a summary. You can use a tool such as this to bulk populate those. Cool. All right, thank you demo gods. So what have we seen here? So hopefully there's a few cogs turning, wheels spinning there, how you might be able to use this on your site. Of course we can create contents and summarize, extract keywords from controlled vocabularies. Using tools such as chat GBT is just great for producing content outlines and skeletons. And also for fixing content as well, there's just a whole wide range of applications and using that WYSIWYG feature, you're easily able to do that. And finally it's possible to transform content as well. I haven't really shown that today, but you can do text-to-speech, speech-to-text and many others, depending on which augmenters you've implemented. There are of course a few warnings we really probably have to mention. I've got to admit a certain degree of excitement and fear when I see technologies like this. Sure, it is absolutely amazing what large language models can do these days. And I do have more than one fear, but one of the main ones in terms of content is that we're just going to see a lot of auto-generated content on the web. I think as time goes by it's going to be more difficult for us to trust what we're reading. It has a machine written that or a human. And of course with this sort of auto-generation of content, there is the danger of losing real insights, losing that tone of voice, losing real authenticity and trustworthiness. So I think as time goes by this is really going to be something that people value, that tone of voice and that human touch. It's very important to have an editor in the middle. Large language models can hallucinate. They have biases. They can sometimes just return content that you don't want. That's why you need an editor in the middle to do and edit as needed. And you'll see I had those little check boxes there telling editors that, hey, this content has been auto-populated. You really should check it. It's going to be a lot of disruption. I know that's obvious. We've seen many artists on the web complaining about how their livelihood and their ways of working have been totally destroyed by these generative models. I'm sure that's going to be the case for many content creators. We all change the way we all work. Of course, it's also going to change business models and just totally change industries and companies as well. So the trick here is to stay ahead of the curve, work out how AI can work for you and how you're able to take advantage of that to avoid the tidal wave that's coming up. Okay, so today we have seen content being produced by NLP Cloud and ChatGPT. And ChatGPT and GPT4 are the big ticket items these days everyone's talking about. But really, this is just the beginning. In the last couple of weeks, there was a Google memo that was leaked and it was titled We Have No Mote and Neither Does Open AI. And basically, the memo was talking about how Google now no longer has any intellectual property that is not widely known. And basically, the genies out of the bag, people know how to use these models and to build them. And the memo mentioned open source there, but basically by open source, I think it just means the open community building things. So more open models, they'll be more efficient, they'll be less costly, they're faster to train, and they'll be less restrained. There's many guardrails in ChatGPT. So we're just going to be seeing a whole lot more action in this space. Using tools such as Augmentary is a nice flexible way because you're able to pull in these different models as they come about. It really is an amazing time to be alive. Okay, whoops, I skipped one slide there. So the question is now over to you guys. Hopefully you've got a few ideas from the presentation today and I'll throw it back to you. How are you going to uplift your content? Thank you. I can't actually give you a number. I will say that, because I just don't have that off the top of my head, when OpenAI's GPT-3 was out, people were saying, oh yeah, it is quite expensive and then they cut the prices by 10. They're now a tenth of what they used to be. So there's certainly a lot more competitive now. But yeah, OpenAI has traditionally been seen as one of the more expensive services, but I guess they're running a lot of compute to return those. But now that Microsoft's come on and put in a lot more money, I think they're investing in their infrastructure a lot more and those prices are coming down. OpenAI also fixed up a lot of their terms of service, around privacy and things like that. So they've definitely become a lot more enterprise focus as the services become more popular. Yes, yes. My demo site was a bookshop demo and it had books about youth and adult. So I had put that in as a taxonomy, just youth and adult. And those two terms were sent off to NLP Cloud with the content and then NLP Cloud worked out, oh, this is about youth. I'm going to return that youth keyword. So I did have to fine tune up that threshold value a little bit, so it may be a bit hit and miss, but it's a pretty cool feature. That is probably not going to work in really out there domains. You've got to remember these language models are trained on a generic area. So if you had a super specific taxonomy, it may not work for you, but I think for general things, it should work. What is the intellectual property of an article like that? Good question. Now, recently there's been a court, I think, I don't know if it's in US or Europe, who said that there is no copyright in that because it's been produced by a generative AI. And I think it was around an album cover that someone had made for a band. People started copying that album cover and there was no copyright in that. OpenAI has recently changed its terms of conditions saying you do have copyright in that. There's copyright in the response and in the prompt. That's what OpenAI is saying. I don't know what the courts are going to say. They're actually at odds with what OpenAI is trying to do in their terms. So I think the law may well have to catch up in this area. Yes, I don't know the answer to that. So the question was, will auto-generated content be penalized from an SEO perspective? Yes, it is an arms race as to if you can detect what's being written by an AI or not. So who knows? Google may well do that. But I think Google may well like pushing stuff that is getting attention anyway. This is my fear. You may get all this auto-generated content that's getting attention and that will still perform very well in search engine results. So it's probably the assumption now that's going to change. Yeah. Oh, yeah, yeah, yeah. So, I mean, there's many APIs. Like, you know, of course, Dali2 has got an OpenAI API and stuff like that. We haven't implemented any of those because I think people probably going to want to play around with the image creation process and an iterative thing with the prompt. They're probably going to play with it and fine tune it and just get it the way they want. And Drupal, like a little thumbnail on Drupal is probably not the best way to do that. But we could implement that, but we haven't because I think the way people would work with that would be more visual sort of way in another system. But there's no reason why you couldn't have a thumbnail being generated in an automatic way as well on bulk. We haven't tested that yet or implemented that, but that's certainly possible. Yes, this is all pretty cutting edge. I've got to say, so I mean, we started this module a few or six months ago. Of course, like with ChatGPT, there's been a huge amount of interest. There are other ChatGPT modules out there that are sort of working in a different way. Not such a pluggable way, but just getting wired in across the Drupal interface as well and haven't looked at the attraction of those. But you know, Drees has spoken of those and I imagine they got pretty good. There's momentum there as well. So yeah, obviously very new area and we're just trying to, yeah, this stuff with ECA that we've been doing is all pretty recent. Same with ECA module as well. It's just sort of hitting and stride and the VBO one's only got 40 users or something, so it is all sort of quite a new area. Sorry, will we be able to get into GovCMS? Well, in the Drupal 7 version of GovCMS, I think rules was in there, if I'm correct. And the criteria in the early days of GovCMS was a module should be reusable and flexible and rules or ECA is an excellent candidate from that perspective. So I think there is a lot of value that can be brought into that, but that's a matter for GovCMS. You can go work on it, Jenny.