Getting Started with AI21Labs for Non-Techies: Supercharge your Writing and Reading Works and Build Your NLP-Powered Services
Introduction
Introducing AI21Labs
AI21 Labs is an innovative company that focuses on developing artificial intelligence (AI) tools to improve how we read, write and interact with text. They specialize in Natural Language Processing (NLP), a field of AI that deals with understanding and generating human language.
Their flagship product, Wordtune, is a writing companion tool designed to help users rephrase their writing to convey their thoughts more accurately. They also offer Wordtune Read, an AI-powered reading service that can summarize lengthy documents for quicker understanding.
In addition to these tools, AI21 Labs provides scalable and efficient AI-powered software solutions for those who want to build custom applications. Their AI21 Studio offers large language model APIs that can be easily customized to suit your specific needs ā without requiring any NLP expertise. And if you work with sensitive data, rest assured as AI21 Labs is security compliant.
The technology behind AI21 Labs relies on advanced pattern recognition offered by cutting-edge deep language models. As they continue to develop enriched models that understand context and semantics at unprecedented levels, their services can seamlessly scale up with your growing customer base. Additionally, AI21 Labs provides resources such as demos, expert talks, and detailed information about advancements in NLP and machine learning for further learning.
Introduction to NLP
NLP, or Natural Language Processing, is a branch of artificial intelligence that focuses on the interaction between computers and humans through language. It involves programming computers to process and analyze large amounts of natural language data, which is the language that has been naturally developed by humans for communication. In the context of AI21 Labs, NLP is used to create tools that can understand and generate human language, transforming machines into thought partners for humans. This includes a writing companion tool that helps users rephrase their writing and an AI reader that can summarize lengthy documents.
Prerequisites
- Basic knowledge of prompt engineering
- Access to AI21Labs Products
- A web browser
Outline
- Browsing Through AI21Labs Offerings
- Finding Better Choice of Words with Wordtune
- Aid Your Research by Summarizing with Wordtune Read
- Trying Out the Studio
Discussion
Browsing Through AI21Labs Offerings
First things first, let's start by browsing through the AI21 Labs' website.
Such an impressive website, with a punchy, memorable opening line to boot: "When Machines Become Thought Partners". Personally, I hope that this line was created by an actual human mind, not AI. Anyway, let's start scrolling down.
Next up, we're met with the introduction to Wordtune. As a writer, one of the primary pain points of writing is finding exactly the words we want to use. Limitations such as vocabulary and reading comprehension sometimes stall me in my writing endeavor. With Wordtune, AI21 Labs promises a writing companion tool that helps us rephrase our writing to say exactly what we mean.
As we can see from the preview, we can even shorten, lengthen, rewrite our lines completely, and set the tone. With that, we won't have to rack our brains anymore each time we need to blog on LinkedIn to drive our engagements! Aren't we thrilled for that opportunity yet?
Next, we've also got Wordtune Read here. Let's be honest, sometimes during our research phase of writing ā be it for reports, reviews, or other valuable content ā we take more time than we're comfortable with. Meanwhile, deadlines loom overhead. Fortunately, with Wordtune Read, we can condense long text and even capture the main idea from the points of view that matter the most!
Finally, when we're getting an idea of what kind of services we can build that leverage NLP, there's always AI21 Studio.
With the Studio, we can test out our ideas easily, generate testable prototypes, and create ready-to-use code that developers can implement immediately in our products.
Finding Better Choice of Words with Wordtune
Let's proceed to the first of AI21 Labs' offerings: Wordtune. After we enter the Wordtune page, click the button that says "Get Wordtune, it's free".
Next, Wordtune will ask us to sign up. Let's sign up with our favorite authentication provider! After that, we should encounter this welcome screen.
The onboarding shouldn't take long. How exciting! Afterward, we're faced with two options: "Read and Summarize" or "Write and Paraphrase". Let's click the "Write better" button for now, as we'll demonstrate how AI21 Labs' writing AI assistant works.
Voila! We should see the page where we can type in our text. Above the text input field, there are several buttons, which, as we can guess, should work as they're labeled:
- "Rewrite" button to rewrite our text
- "Casual" button to set the tone of our text to casual
- "Formal" button to set the tone of our text to formal
- "Shorten" to make our text shorter
- "Expand" to elaborate more on our text
- "Spices" to enhance our writing further by continuing, explaining, emphasizing, giving examples, counterarguments, definitions, analogies, statistical facts, and even making jokes!
Let's start our text with a simple line stating a somewhat obvious opinion: "I think piracy is wrong, especially if one profits from it.".
So, what do we want to do? Let's first try setting it to a more formal tone! Click the "Formal" button.
The Wordtune editor provided us with so many options to choose from! Oh, the woe of making choices! Anyway, we need to make a choice to move on. Let's say I chose: "The act of piracy should be condemned, especially if it is profit-oriented."
So far, so good. However, in real life, we might encounter people who like to disagree, no matter how "right" our opinions are. So, how about we add more statistical data to support our argument? Click the "Spices" button and select "Statistical fact".
Impressive! Wordtune added statistical data from iii.org that states: "Zurich estimates that piracy costs the global economy $12 billion annually, and the IMB PRC reports that piracy and armed robbery numbers increased by 20% last year." It is somewhat interesting that piracy and armed robbery are mentioned in the same sentence! Maybe piracy is as heinous as robbery, after all!
Aid Your Research by Summarizing with Wordtune Read
There are many other features that we can explore, but let's move on to the next feature: Wordtune Read. Interestingly, while Wordtune Read was introduced as a separate product, it's actually integrated within the editor we used earlier. Click the button that says "Upload to summarize".
We should see the user interface for Wordtune Read. We have three options: upload PDF, paste link, or paste text. For this tutorial, let's demonstrate how good Wordtune Read is at processing PDF documents and summarizing the content. Download this text on "Intellectual Property".
After uploading the PDF file, Wordtune should take a moment to process our document.
Interestingly, Wordtune Read shows us the "Summary" of the text, as well as the original document, with some parts highlighted. It indicates which parts of the text were used to create the summary.
Moreover, we can also hover over the summary items and perform some actions on them. We can view the source of the summary (the highlighted part), copy the summary item, take the item as notes, and, if we find the summary unsatisfying, we can always choose to "Re-summarize".
This makes Wordtune Read an excellent companion service to aid us in our research, which in turn helps increase our productivity when writing by allowing us to copy the summary results into our notes for further processing.
Trying Out the Studio
Let's get a bit more technical this time! Don't worry though, as we will explore some examples offered by the service. Head to the AI21 Studio user interface.
If you find yourself saying "Task-specific APIs? Fine-tuning sets? Foundation models? Oh my!", don't fret. In this tutorial, we'll explore the available examples. Click the "Examples" menu to show the use-case examples.
Continuing with the "anti-piracy" theme from earlier, let's select the "Predict the outcome" example. If you can't find it, simply search for it using the search bar.
This is where things get interesting. Let's say we want the AI to predict the outcome if we were to pirate a book, use it to write content, and then monetize that content. To do this, replace the last action ("I put the ice cream outside for an hour") with "I made content based on a Harry Potter book, which I pirated from the internet. I got a hundred bucks from the content."
Voila! The AI predicted that we would get in trouble for pirating the book and making money from it! This should serve as a warning to respect the works of others and pay more attention to intellectual property concerns. As a bonus, we can generate code that our developers can use to develop our product if we find the prototype satisfactory. Click the "Code" button to see the image below.
Our developers can then use this code for their Python or JavaScript apps. Even if they use other programming languages, making HTTP requests to the API is simple enough, as the cURL command is also formatted neatly and ready to use.
Conclusion
Throughout this tutorial, we explored the language understanding products by AI21 Labs, which are conveniently packaged into Wordtune, Wordtune Read, and AI21 Studio. These AI writer/reader tools prove to be great aids not only for technical professionals such as programmers, but also for copywriters, marketers, legal experts, researchers, and other roles involving heavy reading, researching, and writing tasks.
We've learned that by using Wordtune, we can start writing with simple ideas or premises and expand them by prompting the AI to continue our writing, supporting our writing with quotes, statistical data, analogies, and even humor. We can also change the tone of our writing on the fly by clicking on either "Formal" or "Casual".
For research purposes, we can use Wordtune Read to process text from various sources, such as PDFs, web pages, and copied texts. Further refinements are possible to improve our summaries, allowing us to easily copy information or take notes.
Lastly, AI21 Studio enables us to test and prototype different use cases and prompts, which we can refine later. When we're ready to take our ideas into production, generating the code for sending prompts to the AI is as simple as clicking a button.
Thank you for joining me in this tutorial. I hope you've had as much fun exploring the many neat features of AI21 Labs as I did while testing and writing this tutorial. I look forward to seeing you in the next one!