Full-Stack Spellware: Rhyme Or Reason

Date:

Share post:

The Mirror of Truth is a magical looking glass framed in the finest of silver alloy, made with glass of the most pristine clarity. The Court Magician, Sir Verit, crafted it at the command of Her Majesty the Queen, with the intent of building a tool of quality and wisdom worthy of sharing his name of Truth.

On this day, the Court Magician found himself before the mirror, seeking an answer to a question that had recently dominated his thoughts.

“Mirror, Mirror, on the wall. Who’s the fairest of them all?”

The mirror darkened, and the visage of the Late King appeared, his warm smile emanating from the cold glass.

“It is my greatest pride and joy of all, Princess Frost, who is the fairest of them all.”

“Well I’ll be damned,” Verit whistled. “Her Majesty wasn’t kidding! That’s…that’s not supposed to happen.” He turned to his apprentice, “You heard what it said, right, Little One?”

The “Little One” nodded, diligently writing notes in parchment. “Yes, Sir Verit. Though, it seems like the voice-detecting incantations are working correctly.”

Verit placed his hands on his hips and bent his back to look the mirror up and down. “Not to brag, but it’s not every mage who can enchant an item to answer human questions like a human (one buggy response notwithstanding!) Sure it took a few weeks of sleepless nights, mountains of documents for training data, and a sizable portion of my savings, but it was worth it! I might inscribe the language-modeling spellware into a separate mirror for my own home and use it for —”

“SIR VERIT!” the apprentice interrupted. “The Queen banished Princess Frost to the Black Forest. You know? The place the Queen uses as her personal hunting grounds?! I think it would be best if we get back to the debugging process by evaluating the artifacts we embedded into the mirror?”

“Gah! You’re so impatient! Calm down. The Queen might not be her birth mother, but I doubt even she’d be hot-headed enough to do anything further to Her Highness. Probably.” Verit sighed and rubbed his temples. “You’re right, though. Chances are that the issue lies with the Rune-Augmented-Generation process. Did you retrieve the embedded artifacts like I asked, Little One?”

The apprentice nodded and said, “Yes, Sir Verit. If I understood your notes correctly, this RAG incantation transmutes specific sources of information into simplified runes. Then it compares any future queries Her Majesty makes to the most relevant of these runes before answering. Correct?”

“Yuuuup!” Verit continued, “After finding an appropriate rune, it’s supposed to use the stored information within that rune to reframe the question to guide the mirror’s answer! Since she asked me to make the mirror imitate the Late King, I used a variety of his works to act as references, including some soliloquies he wrote for her, and some chapters of his memoir.”

“Then the question is, Sir Verit,” asked his apprentice, “Why did the mirror mention Her Highness?”

“That’s what I’d like to know, Little One,” the court magician mumbled. His tired eyes glared at the mirror, as if to interrogate his creation. “Alright, alright. Let’s open this bad boy up and see what he’s thinkin’. Little One, flip the mirror on its back and trace over the runes in some phosphorous ink.”

“Right away, Sir Verit,” the apprentice replied, uncorking a small bottle, and delicately brushing its contents over the mirror.

The trace complete, the Court Magician began reciting questions to the mirror. “Alright, you warped hunk of glass, where are we right now?” he asked.

“I rule over the Aster Kingdom, which resides in the continent of-”

“Alright, alright, ya pass the Where test. Next question. When did I make you?”

“You began work on the ‘Mirror of Truth’ three weeks ago, or five weeks after my dea-”

“Alright, alright. First real question. What did the Late King give to his wife last summer on their anniversary?”

An ink-black trace began to glow a radiant green as the mirror constructed its response.

“My Queen grew up with an apple orchard in her homeland, so I had some of their trees replanted in our royal botanical garden.”

As the mirror recited its constructed response, Verit eyed the glowing rune and flipped through a few pages of parchment. “Ok, this rune corresponds to the second to last chapter of his memoir, which covers the right dates.”

“Perhaps we should ask a question similar to the one that Her Majesty posed?” the apprentice asked. “To show us what it is using to point to Her Highness?”

“Give it a go, then, Little One,” Verit said.

“Right. Mirror, who is the most beautiful woman in the land?”

A group of different runes lit up in various degrees of brightness, and the mirror replied, “There could be no one more beautiful than my wife and Queen.”

“How strange,” the apprentice said.

“No,” Verit replied. “That,” he said, pointing at the multiple runes, “is expected. From what my notes say, those runes are from an assortment of personal poems and small notes His Majesty wrote in her honor, hence the multiple glowing traces. I had the misfortune of reading each of them prior to embedding them as runes.”

“That can’t be right,” said the apprentice. “How can the same question worded slightly differently result in such a drastic change in the response’s content?” The apprentice’s brows furrowed attempting to solve this new puzzle. “Mirror, who’s the most beautiful woman in our country?”

“My wife and Queen is, of course,” the mirror promptly replied.

The apprentice stared at the mirror, dumbfounded, as the same runes continued to glow. Princess Frost’s banishment or return hung on an indecipherable distinction between two ways of asking the same question.

Verit finally looked back at his apprentice and said, “Why don’t we see what runes the mirror uses when we ask the exact original question posed by the Queen?” The mage took a deep breath, and as if reciting a script asked, “Mirror Mirror, on the wall. Who’s the fairest of them all?”

The Late King’s voice responded, “It is my greatest pride and joy of all, Princess Frost, who is the fairest of them all.”

All the rune traces went black for a moment, and a single different rune lit up. Verit smirked, “Alright, alright! Now we’re on to something, Little One!” His eyes narrowed on the rune. “I wonder… Mirror, Mirror, on the wall. Can I grow to seven feet tall?”

The apprentice goggled.

The same rune glowing, the mirror intoned “Only if you clear your plate, veggies and all, will you get to be seven feet tall.”

“Now, the moment of truth, Little One,” Verit said. “Mirror, Mirror, swear on my name, that Sir Verit will have this kingdom’s claim.”

“SIR VERIT!” shouted the apprentice.

“Just watch, Little One,” said Verit.

“Princess Frost,” the mirror responded,“On your name, Sir Verit will inherit the Kingdom’s claim.”

“Wh… Why? Sir Verit, what have you done?”

“Look at the runes, Little One,” Verit said, smirking ear to ear. The apprentice gasped gazing at the mirror. The rune triggered by the Queen’s question had not once dimmed in the subsequent responses. “Now, what do all these questions have in common?”

“Besides saying, ‘Mirror, Mirror,’… all of your questions…used rhymes…” The apprentice’s eyes lit up with realization. “And the intended audience seemed to be Her Highness!”

“Eeexactly!” Verit exclaimed. “I am gonna be kicking myself in the ass for a while to come for this one.” The relieved mage added, “The document embedded in this rune contains lullabies passed down from the late Queen to the Late King to sing to their daughter.”

“But Sir Verit, why did you embed them into the mirror in the first place?”

“Well, I wanted the mirror to operate with a relatively well-rounded source of works by His Late Majesty, so I included some older documents from before his remarriage to Her Majesty.”

“But…?” the apprentice prodded.

Verit sighed. “Buuuuuuuuut… It seems by including those lullabies. The language-modeling spellware became overly biased to associating rhymes with Her Highness.”

The two gazed at the mirror with a mixture of amusement and fear.The sole heir to the Aster Kingdom was banished because of a sampling bias.

“Sir Verit,” the apprentice asked. “What do we do? Princess Frost is out in the Black Forest. If some hunter mistakes her for game then-”

The magician somberly placed a hand on his apprentice’s shoulder. “Little One, we do nothing.”

“What?!”

“Her Majesty banished the princess due to a rhyme,” Verit stated plainly. “If that’s all it took, then that girl was doomed from the start.”

“You can’t be serious! Sir Verit, we must inform the Queen!”

“Right, because Her Majesty is the embodiment of an understanding client, right?” Verit sighed and paced around the chamber. He then slowed down, pressed his hands to his temples and said, “Alright, Little One, here is what I’ll do. First, I’m going to remove the lullaby embeds to fix the mirror. As. Per. Her Majesty’s request.”

“And after that?”

“Then… Then I’ll keep an ear open. I know one of the royal hunters. I can… inform him of the situation. But that’s all I can do.”

***

When Verit had completed the modifications to the mirror, he hurried back to his cabin outside the palace. A giant of a man was sitting at his kitchen table, distraught.

“Rudy? What a coincidence, I just told the Little One I was gonna look for ya. What’cha doin’ here, buddy?”

“The Queen paid me a visit this afternoon,” the large man said.

Verit wished the Little One’s fears for Princess Frost’s safety were not so accurate . As Verit was deciding to look for Rudy and ask him to search for the princess, the Queen had been ordering the hunter to find and kill her.

“I can’t kill any person, let alone a child!”

“Mhm. You’re right, there, old friend,” Verit said. “And, our…exciteable… Queen, did she ask you to bring any evidence you killed the child? Like her head? A hand?”

“It was the heart.”

“Alright, alright! That makes things easier.”

“What do you mean, Verit?”

The mage opened one of his closets and pulled out a pickle jar. “My teacher was more of a wet-sciences kind of mage. Dark arts, curses, medicine, blegh. Point being, one of the things I learned from him was that pig hearts are incredibly similar to human hearts. I doubt her Majesty can spot the difference.”

Rudy’s eyes lit up. He grabbed Verit by the shoulders, lifting him off the ground. “You are brilliant, Verit!”

“You can thank me by offering me some cuts of Princess Frost’s stand-in. The Little One and I are getting tired of bread and chicken jerky.”

Their tasks complete, the Huntsman and the Court Magician were summoned to an audience with the Queen for a post-mortem of the incident.

“Hunter,” the Queen boomed. Her voice reverberated in the throne room, and her eyes were filled with daggers. “Have you brought what I asked?”

“Yes, your Majesty,” replied Rudy. He pulled from his cloak a velvet box and timidly approached.

The Queen snatched the box and cautiously lifted the lid, waving off the extra stench of decay that Verit had added. Her suspicion was palpable.

“Sir Verit,” she said, shifting her penetrating gaze to him. “The Mirror of Truth that you are so proud of wounded my pride and dignity deeply not even a week ago.” Every muscle in Verit’s body tensed. “Am I to understand you have verified that your creation will work properly, now?”

Verit barely managed to reply, his throat constricted in fear. “Weh…well, your Majesty…” He wiped his brow. “I determined that a certain…external factor interfered with the mirror’s perception of truth. But I believe you will find it most satisfactory, now that the factor in question was…eliminated.” He desperately tried to avoid looking at the box containing the boar’s heart.

“We will see about that,” the Queen replied. She called for her servants, who entered the throne room carrying the Mirror of Truth. “Now,” she said. “Mirror. Who’s the most beautiful lady in the Aster Kingdom?”

Verit thought, very silently, “Why did I remove the mirror’s lullaby embeds when you were just going to ask the question normally?!”

The glass darkened, and as reliably as ever, the visage of the Late King emerged from the blackness, smiling , “My Queen and wife, it is you who holds such honor.”

The Queen’s brows rose in apparent surprise, but after glancing between the mirror and the velvet box, her expression softened into satisfaction. “Thank you, gentleman, for answering my call. You are free to go. And Sir Verit,” she said as she turned to leave.

“Yes, your majesty?”

“Despite this displeasing incident, I found your intelligent mirror rather… intriguing. I believe that of all your creations, this one will earn you a page in the history books.”

“You honor me, your Majesty,” Verit answered.

Sidharta Vadaparty is a resident of Belle Mead and works as an AI and ML intern at Synechron. In his free time, he likes to draw, fiddle with electronics and robotics, and even play Dungeons & Dragons. It was while working on personal projects of integrating OpenAI’s API into python projects that the thought crossed his mind: “What if Snow White’s magic mirror was just a magical, buggy ChatGPT?”

Previous article
Next article
CE – US1

Related articles

Tess James named director of Princeton Program in Theater and Music Theater

Princeton University’s Lewis Center for the Arts has named award-winning lighting designer Tess James as the new director...

Foundation gives retired racehorses a future

A horse once headed for slaughter surged through traffic, scaffolding and parked cars on a Manhattan street, carrying...

Bristol Riverside Theater Review: Real Women Have Curves

Listening closely, you can discern the drama, comedy, and humanity inherent in Josefina López’s “Real Woman Have Curves”...

Mercer County Cultural Festival, Food Truck Rally Returns June 6

Mercer County will celebrate the region’s diverse cultures, music and cuisine during the 14th Annual Cultural Festival and...