Spotlight is a new community series highlighting the creativity and contributions of the Wagtail community. Because AI is a topic blowing up everyone's newsfeeds, we thought it would be fun to start with a relatively new community package called wagtail-ai.
Created by Tom Usher, wagtail-ai gives you options for embedding AI tools into Wagtail. Tom took some time to answer a few of our questions about the inspiration for his package as well as the direction he's planning to take it in.
1. Tell us a bit about yourself. How did you get interested in contributing to open source?
I tend to wear many hats as an independent consultant, but I’m primarily a DevOps engineer working with clients to improve and supplement their DevOps and systems teams. I’ve been supporting and building Wagtail sites for about 7 years, and have been working with the Torchbox systems team for 5 years. I live in North Wales, UK with my wife, son, dog and cat where I spend most of my non-working time gardening or playing and hoarding board games.I ’ve used and followed open source projects for all of my working life. One of my go-to "social networks" is GitHub’s "recently active" feed for my starred repos. I love to catch up on what’s going on with my favourite projects, read over release notes and flick through pull requests. I’ve contributed here and there, but I’ve never seriously released and managed an open source project, mainly because everything I need already has an amazing open source solution!
2. Where did the idea for your package come from? What problem(s) does your Wagtail package solve for?
Whenever something that interests me shows up, I usually try to find an excuse to build something small with it just to get my head around it - that’s what happened with Wagtail AI. OpenAI released their ChatGPT API, so as a weekend project I thought I’d have a go at seeing how it could be used in Wagtail. It started out as a way to enhance the rich text editing experience by using OpenAI’s Large Language Model (LLM) APIs to allow users to generate content or make corrections to content. After conversations with others who are also excited about AI, I have plans to bring AI tools to more parts of Wagtail in future releases.
3. Your package incorporates AI, which is a very hot topic right now. How do you think AI will affect or influence content management?
It’s definitely both a hot and contentious topic. I think right now, when people think of AI and LLMs in the context of content management, they think of paragraphs of content written by a robot filling the internet up with more content farm or SEO bait than we already suffer through. I’m not sure Wagtail AI in it’s current state does much to help with that! I am hopeful that these tools can be used for good; both in improving the editor workflow by making things like similarity search, SEO metadata generation and quality control tools easier to use and implement, and improving how users experience content by providing conversational interfaces, better search and improved content recommendations. Looking to the future, I don’t think we’re far off being able to use these models to generate supplemental content like graphs or diagrams that could be used to make content easier to understand and digest.
4. Who do you think should give your package a try? Who do you think would really benefit from using it?
If you’re interested in bringing some simple AI-based improvements to your content workflow, Wagtail AI is worth trying. At the moment it’s probably most useful for small content teams that don’t have copyediting support and maybe just want to see how these tools can help in the short term. It’s also worth trying if you’re interested in AI and LLMs and want to contribute, either with your own project or with an issue/pull request to Wagtail AI. There’s lots of potential here and I’d love to see people just trying it out and providing feedback.
5. What are some features of your package you want to encourage people to try?
Custom prompts are really cool! Tom Dyson showed an example in a What’s New In Wagtail session where he configured a “Simplify this text” prompt that would make text easier to read. There’s loads of potential here; say you’re working on a site where content needs to be targeted at children; you could add a prompt to ‘ELI5’ the text, or maybe you want Wagtail AI to add an auto-generated "TLDR".
6. What are the next steps for your package? Are there ways other people can help you improve it?
Right now I’m focusing on providing tools to let users index and query content "embeddings" (vectors that represent your content in such a way that they can be compared semantically). Using these we can provide better “similar content” tools, and more excitingly, let users ask natural language questions which are answered based on content from your Wagtail site. Any sort of contributions are welcome; bug reports, code contributions or documentation improvements. I’d particularly love to hear what people would like to see from the package, either using GitHub discussions or messaging me on the Wagtail Slack.
The image for this article was generated using DALL-E and the prompt "Wagtail flying over a circuit board."