Introducing ScriptLaika, a Google Docs Add-on for Co-Creating Screenplays with Artificial Intelligence
Premise
Those who are familiar with my previous work know my stance on AI in the creative fields. I don’t concern myself with what we prompt AI to do for us. Instead, my interests lie in what AI can prompt us to do.
While AI can increase productivity in creative tasks, it won’t be for the benefit of the creatives themselves, or their audiences. At the time of writing, the Writers Guild of America (WGA) is on strike, and their pattern of demands includes “regulate use of material produced using artificial intelligence or similar technologies”. As a Finnish freelance telewriter, I share their concerns. Here in Finland, screenwriting is a precarious line of work that is grossly undercompensated, especially when you consider how writing forms the entire base for the value pyramid of any product in the audiovisual entertainment market. I wouldn’t put it past my local film industry to begin replacing writers the moment it becomes technologically feasible.
As a writer, I rarely find myself wishing I had less writing to do, in fact, quite the opposite. If anything, I incorporate LLM (Large Language Model) tools to slow things down, explore unexpected avenues, and to make me truly consider what I am jotting down on the page. Paraphrasing in art-speak, I would describe my writing process as an “investigation of non-human agency through the (im)material resistance of LLM’s.”
While AI startups are a dime in a dozen these days, when I was looking for a place to intern at for my Master’s, it was difficult to find one that would share my values. Thankfully, I discovered Write with LAIKA, a Copenhagen-based company that focuses on offering a tool that encourages creativity instead of productivity. LAIKA’s product is an online text editor in which you can use your own custom fine-tuned GPT-models, or “brains” as LAIKA calls them. Brains can be trained either with your own material or texts in the public domain. Instead of doing all the work for you, brains continue your own writing. One strange fragment at a time, they take your texts to places you probably wouldn’t have visited without them.
During my internship, I took on the task of creating a screenwriting use case for LAIKA. This allowed me to build on top of my previous research on the topic and realize some of the ideas I have been toying with for quite a few years. One busy month of coding later, I have a prototype that hopefully works as a proof of concept for what an accessible generative screenwriting tool would look like.
Functionality
As I have previously discovered, GPT-2 is not great with keeping up with the intricacies of screenplay formatting. Although the newer models have made huge strides and can now, for example, generate Seinfeld episodes endlessly, another issue with this approach persists: it is artistically uninteresting to create entire screenplays. As a writer, I want finer control of what exactly I am generating.
Screenplays consist of different elements for communicating aspects of what happens on screen. Each element has a distinct formatting style to make them quickly recognizable on the page. One could say that screenplays have an organized data structure, which makes some things computationally much easier to handle than with other types of text. To give an example, if you want to extract the time of day and location of a section in a novel, you will need to perform some sort of semantic analysis, keyword search etc. With a screenplay, you just need to navigate to the scene heading, where it states: “EXT. KOLDING — DAY” or something similar.
Instead of feeding GPT entire screenplays, I decided to treat each element individually, and create custom brains for them. This way, it became also easier to manage what type of data I wanted to send to each model.
While creating the add-on, I knew it had to fill two roles:
- As a screenwriting tool, it needs to recognize what type of text each written element is, and format it automatically.
- As a text-generation tool, it needs to take into account the relevant context of the written text and continue it.
I decided to combine these functions, devising a logic like this:
Using this structure enabled me to have several specialized and tweakable AI models that the system connects to. It is possible to have your characters talk to each other by connecting brains that are fine-tuned with dialogue. The dialogue feature takes the previous line as context, so you can have, for example, conversations between Hamlet and Socrates, where the two respond to each other. Provided you have the data (minimum of 10 000 words), you can create brains for your own characters. Training a brain with your own data is an insightful experience I would wholeheartedly recommend to any writer.
I chose Google Docs as the platform for the tool because I have noticed that regardless of what screenwriting software I use, at some point someone (usually a producer) pastes it there anyway. Now I will have some screenwriting functionality to work with in Docs when it inevitably happens the next time.
Future
Currently, the feature set of ScriptLaika covers what I consider to be the bare minimum for any piece of screenwriting software, but a lot would need to be added to make it ready for bigger productions. There are also a whole heap of AI features I would like to try out; so far, only scene headings, scene descriptions and dialogue can be generated. Both the screenwriting features and the generative functionality of LAIKA can also be accessed independently, so it can also be utilized as a screenwriting tool without any AI components, or as a generative text editor without screenwriting formatting.
At the moment, I am distributing ScriptLaika as a closed test. If you wish to try it out, please get in touch. ScriptLaika requires you to have a free LAIKA account that comes with a fair amount of API tokens to get you started with your experiments . For more technical information on the features of the tool and how to get started, see the documentation.
I’ll be responsible for the tool’s further development, and I hope to continue with it if it gains traction. If enough people are interested, it might even make its way to the official Google Addons page one day.