Improving LLM Output with Vector Focus (aka “How to write a creative song about politics”)
/Large Language Models hold their “knowledge” (i.e. language training) in a large “Vector Space”. That’s hard enough to understand if you’re not a mathematician, let alone visualise.
I find it helps to visualise this vector store as a 3D space with connections between all its words. In fact, this is very nicely interactively visualised courtesy of https://moebio.com/mind/
In this space one connection leads to another based on statistical likelihood. Temperature controls in the model let you control how rigid this statistical connection is: at the outer temperature settings, you can force the model to behave with complete predictability (same input = same output every time) or the complete opposite.
What’s the Problem?
Ordinarily this doesn’t cause a problem, but lately I’ve been using LLM (chatGPT and Suno) to help me craft a lot of songs - over 500 to be precise.
It was round about the 200 song mark that I really started to notice the patterns and predictability of the underlying models. My songs were becoming stylistically (both lyrically and musically) similar, with similar structures, rhyming styles and choice of vocabulary, I needed to break free.
Enter Jethro Tull
Around about age 14 I fell in love. With “Broadsword and the Beast” - at the time the latest album release from Jethro Tull with a new synth-folk-rock style. Like Paul Simon and Suzanne Vega, Ian Anderson write songs that tells poetic stories, often by allegory or metaphor. This is what I found especially captivating about the album: it transported you to another world, where all the same principles applied, but the scenery was new and captivating.
So, I got to thinking, how do I get my LLM to write like this? This is where “vector focus” comes in. By the way, this is not an official technical term, it’s a term I created to keep me minded about the structure of the vector space and to constantly think about how to get the LLM to operate in the part of that space I want it to.
In the case of songwriting, if you ask an LLM for a song about apples and a song about the breakdown of civilization, when you peel back the skin (see what I did there?) you will find a lot of similarity of structure and basic vocabulary. This stands to reason, because the statistical model is picking the most likely content, which in many respects is the “lowest common denominator” of the language. If you ask it to be “poetic” or “flowery”, you might get some variation, but ultimately you will not approach anything like the genius of Ian Anderson et. al.
Focussing in the “write” space
What we want is the LLM to work deeply in the space that typifies and characterizes the type of output we want. How do we do this? It is simply insufficient to add “in the style of <artist name>” to your prompt: 1) because it’s a very weak connection to that area of the vector space and 2) It will almost certainly trigger RAI protection to avoid copyright issues. Fair play.
What we really want is originality grounded in a particular style.
Here’s what happens if you simply prompt chatGPT with “broadsword and the best”:
We can see this contains a myriad of really unique terms that drive the LLM straight deep into the vector space for this album. This is what we want to harness for our song creation prompt. (By the way, for the Eagle Eyed, the whole “Just cry bollards” thing is a really annoying facet of the chatGPT “memory” function, which I regret turning on now. It comes from a previous song, and now chatGPT things I want to speak like that).
So, how do we get the LLM to use this knowledge as part of its song creation? It probably knows all the lyrics on the album, and I want to use all that as grounding for my new song, which is going to be about Politics (also inclined to trigger RAI if I’m not careful what I’m asking for).
How about this as a prompt:
I'd like you to act as my songwriter and absorb everything you know about the above album, including lyrics you have reference to and the musical and literary stylistic elements. Using that as your grounding, I'd like you to write a new song for that album, entitled "fairyland" which is a coded message about the state of western politics.
The result is a song which has all the stylistic elements and metaphorical references of the original album but tackles a completely new topic in a way the LLM would never normally do. Here’s the song, produced in one hit. Not only was it good enough with just one prompt, I absolutely love it and the fantastic Tull-like metaphors it has created.
**"Fairyland"**
*(Inspired by the style and themes of Jethro Tull’s "Broadsword and the Beast")*
---
**[Verse 1]**
Through the tangled brambles of the border glade,
Where whispers of treaties in twilight fade,
A lantern’s glow on the merchant’s face,
Haggling dreams for a devil’s embrace.
Silver-tongued heralds, they circle the green,
Promising crowns for the low and the lean.
The fiddler’s song on the village square —
Dance if you’re willing, but mind the snare!
**[Pre-Chorus]**
Shadows in robes of velvet and thread,
Carving their laws with a fox’s dread.
While the jester’s grin grows ever so wide,
The king’s in his counting house, eyes open wide.
**[Chorus]**
Welcome to Fairyland, oh, what a show!
With bread made of sawdust and circuses below.
The crown’s a bit tarnished, but it’s worn just the same —
By princes and paupers who’ve mastered the game.
In Fairyland, every wager’s a sin,
But you’ll never know who’s out or who’s in.
**[Verse 2]**
Past the oak’s hollow where the council meets,
Fur-lined wolves plot in their cushioned seats.
Barons of honey and Dukes of the dirt
Draft decrees on the back of a shepherd’s shirt.
The watchman’s call is a call too late,
While magpies pick at the lock of the gate.
Beggars and lords trade cloaks in the dark,
Both claim the throne but neither leaves a mark.
**[Pre-Chorus]**
Shadows in robes of velvet and thread,
Carving their laws with a fox’s dread.
While the jester’s grin grows ever so wide,
The king’s in his counting house, eyes open wide.
**[Chorus]**
Welcome to Fairyland, oh, what a show!
With bread made of sawdust and circuses below.
The crown’s a bit tarnished, but it’s worn just the same —
By princes and paupers who’ve mastered the game.
In Fairyland, every wager’s a sin,
But you’ll never know who’s out or who’s in.
**[Bridge]**
The piper’s paid in counterfeit gold,
With pockets of promises centuries old.
There’s a map on the wall with no way to the end,
Where dragons’ lairs and black ships defend.
The queen’s on the run, her spindle’s gone slack,
She’s traded her crown for a wolf’s leather sack.
**[Instrumental Break]**
*(A mix of brooding flute melody and sharp synth stabs, evoking the tension of unseen schemes.)*
**[Verse 3]**
Firefly lanterns light up the hall,
Where once stood a castle, now crumbles a wall.
Goblins in wigs hand scrolls to the crowd,
Promises whispered, but never aloud.
The miller’s daughter counts barley and wheat,
But half of her harvest is dust at her feet.
With ink-stained fingers and a thousand-yard stare,
She’s learned not to follow the call to "beware."
**[Pre-Chorus]**
Shadows in robes of velvet and thread,
Carving their laws with a fox’s dread.
While the jester’s grin grows ever so wide,
The king’s in his counting house, eyes open wide.
**[Chorus]**
Welcome to Fairyland, oh, what a show!
With bread made of sawdust and circuses below.
The crown’s a bit tarnished, but it’s worn just the same —
By princes and paupers who’ve mastered the game.
In Fairyland, every wager’s a sin,
But you’ll never know who’s out or who’s in.
**[Outro]**
So step through the archway, mind how you tread,
For kings’ whispers are louder than thunder’s dread.
In Fairyland’s glow, the night’s never done,
Where pawns move the board, but the checkmate’s begun.
LOVE IT!
The next challenge is to render this song in a style that matches what I have in my head, incorporating similar Tull-like elements. That requires a whole bunch of prompting on Suno, and if you want to hear the result, it’s here (two versions):
https://suno.com/song/8eebb0da-efe5-4d79-896b-d52103e9adef
https://suno.com/song/667f8ab3-7655-445f-bc45-aafa9b27bdaa