The [SITE] Framework for LLMs — Part 3: Transforming

Curtis Savage
AI for Product People
6 min readAug 31, 2023

Table of Contents

  1. [S]ummarizing
  2. [I]nferring
  3. [T]ransforming
  4. [E]xpanding

Introduction

This is Part 3 in a series exploring the potential of Large Language Models (LLMs) and how Product Managers can leverage this technology to drive new features and products. Understanding how to optimize prompts and how to integrate API calls to LLMs becomes an invaluable skill set for any Product Manager leading an AI product.

In a previous post we looked at First Principles of Prompt Engineering. With First Principles covered, we’ll dive deeper into the four primary capabilities of LLMs. Those capabilities are 1) Summarizing 2) Inferring 3) Transforming 4) Expanding.

Knowing how to effectively leverage these capabilities can be a really powerful framework for integrating and leveraging LLMs into your apps. I refer to this as the “SITE” framework for LLMs.

Today’s post focuses on the third capability: Transforming.

[T]ransforming

Large language models, such as ChatGPT, excel in taking a piece of text as an input and transforming it into different formats. This capability makes these models versatile tools for a range of applications, from simple grammar correction to advanced tasks like language translation and format transformation.

Language Translation

A key feature of LLMs is their ability to translate text into different languages. These models are trained on a wide array of texts from the internet, a repository of countless languages. This training gives models the ability to translate input into hundreds of languages

Basic Translation

ChatGPT is trained with sources in many languages. This gives the model the ability to do translation.

French pirate: ```Je veux commander un ballon de basket```
Spanish pirate: ```Quiero pedir una pelota de baloncesto```
English pirate: ```I want to order a basketball```

Universal Translation

Perhaps a more interesting use case beyond basic translaiton is the ability to build a universal translator which can take multiple input languages and translate to any number of output languages.

For example, imagine you’re in charge of IT at a large multinational e-commerce company. Users are messaging you with IT issues in all their native languages. Your staff is from all over the world and speaks only their native languages. You need a universal translator!

Using a basic loop we can loop through all of the user messages and make an API call to translate any language into both English and Korean (or virtually any other language) making this an extremely powerful tool for international customer support teams:

Original message (French): La performance du système est plus lente que d'habitude.
English: The system performance is slower than usual.
Korean: 시스템 성능이 평소보다 느립니다.

Original message (Spanish): Mi monitor tiene píxeles que no se iluminan.
English: My monitor has pixels that do not light up.
Korean: 나의 모니터에는 불이 켜지지 않는 픽셀이 있습니다.

Original message (Italian): Il mio mouse non funziona
English: My mouse is not working
Korean: 내 마우스가 작동하지 않습니다

Original message (Polish): Mój klawisz Ctrl jest zepsuty
English: My Ctrl key is broken
Korean: 내 Ctrl 키가 고장 났어요

Original message (Chinese): 我的屏幕在闪烁
English: My screen is flickering.
Korean: 내 화면이 깜빡입니다.

Tone Transformation

Large language models like ChatGPT can not only understand the nuances of different tones but can also adapt input text to match a required tone. This adaptability allows you to cater to specific audiences.

For example, here’s a great example of going from very informal to formal. I call this the ‘dude-to-sir’ prompt!

Dear Sir/Madam,

I am writing to bring to your attention a standing lamp that I believe may be of interest to you.
Please find attached the specifications for your review.

Thank you for your time and consideration.

Sincerely,

Joe

Proofreading

ChatGPT is increasingly being used as a proofreading tool. It is remarkably proficient in taking grammatically imperfect text as input and providing a corrected version as output. This feature, backed by the model’s powerful training and sophisticated algorithms, can be leveraged to streamline the proofreading process, making it more efficient and accurate.

Spell Check and Grammar Correction

For example, ChatGPT can function as a spell checker and grammar corrector. This utility comes in especially handy when working in a non-native language, making it a valuable asset for global teams and organizations.

Here are some examples of common grammar and spelling problems and the LLM’s response.

To signal to the LLM that you want it to proofread your text, you instruct the model to ‘proofread’ or ‘proofread and correct’.

Original version:
The girl with the black and white puppies has a ball.
No errors found.
It's going to be a long day. Does the car need its oil changed?
Their goes my freedom. There going to bring they're suitcases.

Corrected version:
There goes my freedom. They're going to bring their suitcases.
You're going to need your notebook.
That medicine affects my ability to sleep. Have you heard of the butterfly effect?
This phrase is to check ChatGPT for spelling ability.

Transforming Formats

Finally, one of the most powerful transformation capabilities of LLMs is transforming one format into another. For example, LLMs can convert a Python dictionary or JSON data into an HTML table with column headers and a title (or vice versa). This can simplify the process of visualizing data or help you preprocess the data for subsequent tasks in your application workflow.

<table>
<caption>Restaurant Employees</caption>
<thead>
<tr>
<th>Name</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<tr>
<td>Shyam</td>
<td>shyamjaiswal@gmail.com</td>
</tr>
<tr>
<td>Bob</td>
<td>bob32@gmail.com</td>
</tr>
<tr>
<td>Jai</td>
<td>jai87@gmail.com</td>
</tr>
</tbody>
</table>

Final Thoughts

The transformative capabilities of large language models like ChatGPT are revolutionizing the way we handle text, offering Product Managers, app developers, and tech leaders a powerful tool to optimize their products and operations. As we continue to explore and refine these models, the opportunities for transformation are boundless. So whether it’s refining your company’s communications, breaking language barriers, or transforming data formats, embracing this technology could be your first step towards a more efficient and innovative product offering to better serve your users and organization.

In the next post we will cover the final capability in the [SITE] Framework for LLMs: Expanding.

If you enjoyed this post please check more in my blog series AI For Product People.

--

--