Skip to content
Insight on digital media from the team at LexBlog, Inc.

A Look Behind the Scenes of Lou’s Technology

November 9, 2023

LexBlog’s new AI assistant Lou is a powerful addition to the post editor experience, allowing our users to use AI tools in every step of the post writing experience, from coming up with a title, to summarizing a cited article, or drafting a tweet about the post after you’re done. But what’s powering all this behind the scenes? Read on for a closer look at how Lou helps simplify the use of AI for newer users while also still providing a powerful freeform experience for the vets!

Powered by OpenAI API

At the highest level, Lou is powered by the OpenAI API, the same API that powers the most well-known AI client out there, ChatGPT. Every time you make a request to Lou in the WordPress post editor, we are sending a request to OpenAI behind the scenes to power Lou’s response. But how that request looks varies a lot based on which of Lou’s tools you are using, and that’s where our expertise comes in.

Each request we make as part of Lou contains a specific prompt that LexBlog has fine tuned in order to get the best results for our users. For example, here’s what the prompt looks like for the “post ideas” section:

I am going to provide you with a general subject I want to blog about. I want you to respond by providing 5 blog post titles that’d serve as creative ideas for the post. The titles should be of varying styles and on varying specifics.
My idea will be delimited between tags like this: ===START=== and ===END===

We take that prompt, along with the user’s input in the “Give us a subject or phrase to start” box, and send it along to get the post ideas back.

Tone and Format Options

Our clients blog on a wide variety of subjects, and write with a wide variety of tones from casual to very professional. Built into Lou is the ability to change the writing style of the entire post, or draft your tweet / social media post in a few different tones. We turn those choices into prompts behind the scenes, which we send along with the full post in the editor to get our requested summary. Here’s what that looks like in the prompt from the “Summarize Article” section, if you were to select “professional”, and “paragraph”:

Instructions on tone: Your tone should be professional, appropriate in a corporate setting
Instructions on length and style: Write one medium length paragraph.

We’ve fine tuned the prompts as we’ve worked on Lou, and have the ability to easily update these moving forward if we need to dial anything in in order to get better results.

Built Natively in the WordPress Block Editor

If you’re a LexBlog customer, you are probably familiar with the block editor (aka Gutenberg), WordPress’ newest post editing experience. Over the last few years we’ve switched all of our client sites to the block editor, and Lou would definitely not be possible without it. The block editor is built in React, a powerful JavaScript framework that allows for real-time interaction between the user and the page more like an app, rather than having to have the page reload in order to show a change.

We’ve built Lou using native Gutenberg tools so it fits right in with the rest of the post editor experience, leading to seamless interaction. Some of the tools we used to build Lou include adding a PluginSidebar, creating several new Blocks, and also creating some BlockControls. It’s been a great learning experience for the LexBlog development team to get to work in React and Gutenberg, and it will lead to a knowledge base that allows for more awesome features in the post editor in the future!