How it’s Made: TextFX is a suite of AI tools influenced by Lupe Mess’s lyrical and linguistic methods– Google for Developers Blog Site


Published by Aaron Wade, Creative Technologist

Google Laboratory Sessions is a series of speculative AI partnerships with innovators. In our newest Laboratory Session we wished to check out particularly how AI might broaden human imagination. So we relied on GRAMMY ® Acclaimed rap artist and MIT Going to Scholar Lupe Mess to construct an AI experiment called TextFX

The discovery procedure

We began by hanging around with Lupe to observe and discover his innovative procedure. This procedure was usually marked by a sort of linguistic “tinkering”– that is, deconstructing language and after that reassembling it in unique and ingenious methods. A few of Lupe’s methods, such as simile and alliteration, draw from the canon of standard literary gadgets. However much of his methods are totally special. Amongst them was a smart method of producing expressions that sound similar to an offered word however have various significances, which he showed for us utilizing the word “expressway”:

reveal whey (quick shipment of dairy by-product)

reveal sway (to show impact)

ex-press method (course without news media)

These sorts of operations played a vital function in Lupe’s writing. Because of this, we started to question: How might we utilize AI to assist Lupe check out innovative possibilities with text and language?

When it concerns language-related applications, big language designs (LLMs) are the apparent option from an AI viewpoint. LLMs are a classification of artificial intelligence designs that are specifically developed to carry out language-related jobs, and among the important things we can utilize them for is producing text. However the concern still stayed regarding how LLMs would in fact suit Lupe’s lyric-writing workflow.

Some LLMs such as Google’s Bard are fine-tuned to operate as conversational representatives. Others such as the PaLM API’s Text Bison design absence this conversational component and rather create text by extending or satisfying an offered input text. Among the fantastic features of this latter kind of LLM is their capability for few-shot knowing To put it simply, they can acknowledge patterns that happen in a little set of training examples and after that duplicate those patterns for unique inputs.

As a preliminary experiment, we had Lupe supply more examples of his same-sounding expression strategy. We then utilized those examples to build a timely, which is a thoroughly crafted string of text that primes the LLM to act in a specific method. Our preliminary timely for the same-sounding expression job appeared like this:

Word: defeat
Same-sounding expression: da feet (as in ” the feet”)

Word: surprise
Same-sounding expression: Sir Reward (a knight whose name is Reward)

Word: expressway
Same-sounding expression: reveal whey (quick shipment of dairy by-product)

( … extra examples …)

Word: [INPUT WORD]
Same-sounding expression:

This timely yielded satisfactory outputs a few of the time, however we felt that there was still space for enhancement. We in fact discovered that elements beyond simply the material and amount of examples might affect the output– for instance, how the job is framed, how inputs and outputs are represented, and so on. After a number of versions, we lastly came to the following:

A same-sounding expression is a expression that sounds like another word or expression.


Here is a same-sounding expression for the word ” defeat”:

da feet ( as in ” the feet”)


Here is a same-sounding expression for the word ” surprise”:

Sir Reward ( a knight whose name is Reward)


Here is a same-sounding expression for the word ” expressway”:

reveal whey ( quick shipment of dairy by-product)


( … extra examples …)


Here is a same-sounding expression for the word “[INPUT WORD]”:

After effectively codifying the same-sounding word job into a few-shot timely, we dealt with Lupe to recognize extra innovative jobs that we may be able to achieve utilizing the exact same few-shot triggering method. In the end, we developed 10 triggers, each distinctively developed to check out innovative possibilities that might develop from an offered word, expression, or idea:

SIMILE – Develop a simile about a thing or idea.

BLOW UP – Break a word into similar-sounding expressions.

UNEXPECT – Make a scene more unanticipated and creative.

CHAIN – Construct a chain of semantically associated products.

POV – Examine a subject through various perspectives.

ALLITERATION – Curate topic-specific words that begin with a picked letter.

ACRONYM – Develop an acronym utilizing the letters of a word.

FUSE – Develop an acronym utilizing the letters of a word.

SCENE – Develop an acronym utilizing the letters of a word.

UNFOLD – Slot a word into other existing words or expressions.

We had the ability to rapidly model each of these concepts utilizing MakerSuite, which is a platform that lets users quickly construct and explore LLM triggers through an interactive user interface.

Moving image showing a few-shot prompt in MakerSuite

How we made it: structure utilizing the PaLM API

After we settled the few-shot triggers, we developed an app to house them. We chose to call it TextFX, drawing from the concept that each tool has a various “result” on its input text. Like a sound result, however for text.

Moving image showing the TextFX user interface

We conserve our triggers as strings in the source code and send them to Google’s PaLM 2 design utilizing the PaLM API, which works as an entry indicate Google’s big language designs.

All of our triggers are developed to end with an insufficient input-output set. When a user sends an input, we add that input to the timely prior to sending it to the design. The design anticipates the matching output( s) for that input, and after that we parse each arise from the design action and do some post-processing prior to lastly appearing the lead to the frontend.

Diagram of information flow between TextFX and Google's PaLM 2 large language models

Users might additionally change the design temperature level, which is a hyperparameter that approximately represents the quantity of imagination allowed the design outputs.

Attempt it yourself

You can attempt TextFX on your own at textfx.withgoogle.com

We have actually likewise made all of the LLM triggers readily available in MakerSuite If you have access to the general public sneak peek for the PaLM API and MakerSuite, you can produce your own copies of the triggers utilizing the links listed below. Otherwise, you can sign up with the waitlist

And in case you want to take a better take a look at how we developed TextFX, we have actually open-sourced the code here

If you wish to attempt structure with the PaLM API and MakerSuite, sign up with the waitlist

A last word

TextFX is an example of how you can explore the PaLM API and construct applications that take advantage of Google’s cutting-edge big language designs. More broadly, this expedition talks to the capacity of AI to enhance human imagination. TextFX targets innovative writing, however what might it imply for AI to go into other innovative domains as a partner? Developers play an important function in assisting us picture what these partnerships may appear like. Our hope is that this Laboratory Session offers you a glance of what’s possible utilizing the PaLM API and influences you to utilize Google’s AI offerings to bring your own concepts to life, in whatever your craft might be.

If you want to check out more Laboratory Sessions like this one, head over to labs.google.com


Like this post? Please share to your friends:
Leave a Reply

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: