top of page
  • Instagram
  • Twitter
  • TikTok
  • Youtube
  • Facebook
  • Spotify
  • LinkedIn

Exploring Large-Language Model Contextualization using the Base64 Encoding Method

Vishnuprasad Kakarla
6 minutes ago
2 min read

Extended Abstract


Given that different Large Language Models (LLMs) are trained on different datasets, each LLM possesses specialized strengths. Yet, the lack of a standardized, portable context format creates a "contextual reset" when users attempt to transition between these systems mid-project. This loss of progress necessitates a repetitive re-contextualizing process that risks inconsistent outputs and limits the user's ability to leverage each model’s unique advantages efficiently. To address this barrier, the paper investigates the efficacy of utilizing Base64 encoding as a compact, universal method for packaging and transferring contextual states, thereby enabling a seamless "handshake" between different LLMs and maintaining project continuity across diverse platforms.


Notice: All trademarks belong to their respective owners, including (but not limited to) the names of Large Language Models. The author does not claim ownership or copyright of these terms.


Base64 Encoding was chosen due to its simplicity, wide applicability, and flexibility. This type of encoding has the ability to translate English and virtually any data type into letters and numbers that LLMs can decode. While using English is shorter than Base64, it does not mask the instructions from another user, some of which could be confidential. Base64 adds one more layer before being decoded.


ALGORITHM

















EXAMPLE

>>> User query, <<< LLM response


ENGLISH

>>> Give me a concise PRD document for a weather app


<<< High-performance weather application that provides hyper-local, real-time forecasts and natural language summaries to help users make quick, actionable daily decisions. It prioritizes speed and clarity through features like smart rain alerts and minimalist data visualization, ensuring essential weather info is accessible in under three seconds.

OPTIMIZED PROMPT

>>> Generate a concise Base64 string that summarizes the conversation and contextualizes the user’s project and objectives for another LLM. 

CONTEXT STRING

eyAiUHJvamVjdCI6ICJXZWF0aGVyIEFwcCIsICJPYmplY3RpdmUiOiAiRGVsaXZlciBtaW5pbWFsaXN0LCBoeXBlci1sb2NhbCBkYXRhIGZvciBmYXN0IGFjdGlvbmFibGUgaW5zaWdodHMuIiwgIkZlYXR1cmVzIjogWyJOYXR1cmFsIGxhbmd1YWdlIHN1bW1hcmllcyIsICJSZWFsLXRpbWUgYWxlcnRzIl0sICJGb2N1cyI6ICJVSSBjbGFyaXR5IGFuZCBsb3ctbGF0ZW5jeSBwZXJmb3JtYW5jZS4iIH0=

NEW LLM RESPONSE

<<< It looks like it's a brief overview of a project, specifically a "Weather App." Here's a breakdown of the details:

  • Project: Weather App

  • Objective: Provide minimalistic, hyper-local weather data that delivers fast, actionable insights.

  • Features:

    • Natural language summaries

    • Real-time alerts

  • Focus: UI clarity and low-latency performance

It seems like the focus is on creating a sleek, efficient weather app. Would you like to dive deeper into any part of this or brainstorm how it could be developed?


OBSERVATIONS


In the example, the second LLM successfully preserved the project goals and understood the overall task.


LIMITATIONS

While this is a successful method for short and basic chats, it may be inefficient for complex and/or long chats. The original LLM may exclude crucial information that the new LLM may need.

Comments


Sign-Up for Our Newsletter

Thanks for signing up!

Get in Touch

Thanks for contacting us!

  • White YouTube Icon
  • White Facebook Icon
  • White Twitter Icon
  • White Instagram Icon

© 2021 STEME Youth Career Development Program &

Science & Engineering Fair of Houston

STEME WHITE TRANSPARENT .png
Huey Uganda 3125 White Black.png
bottom of page