The Premise
In the vast and ever-growing digital ecosystem, the rise of generative AI has unleashed a boundless creative potential. Startups are popping up, much like mushrooms sprouting after a spring rain, each eager to carve out their niche and flourish in this technological renaissance. While we stand on the cusp of AI's potential, the pinnacle of Artificial General Intelligence (AGI) remains just beyond our grasp. This leaves a myriad of roles, tasks, and endeavors that still require the human touch.
However, with titans like ChatGPT and the emerging Bard dominating the technology landscape, the competitive arena for startups has drastically shifted. These AI powerhouses offer immense potential, but with this comes the risk that smaller innovations might find themselves overshadowed or even subsumed. The arena now resembles a bustling market square where every vendor vies for attention. Startups feel the pinch. What used to be their closely-guarded innovations can now be replicated with ease due to the democratizing force of generative AI — Evaluating city livability becomes as simple as comparing two fruits. Creating digital memoirs feels as easy as flipping through an old album, and crafting a logo design becomes as breezy as a doodle. But this newfound accessibility presents a challenge: how can the developers of these useful tools distinguish themselves in such an oversaturated market?
Not only the time-tested ideas but also the fresh ones, unlocked by generative AI face this scrutiny. Envision a world where blending the elegance of Sumi-e with the nuances of impressionism is as casual as daydreaming. Want a course in linear algebra or Python, flavored with a unique teaching zest? It's akin to rearranging a familiar song, with GPT-4 providing the melody. Transforming prose into a pictorial representation feels like doodling on a notebook's margin. The opportunities are vast, but the challenge remains — navigating a congested race.
There's another nuance to consider: while some have the tools to unleash AI's power, others with incredible creative visions lack access. We see tech experts with the latest tools often not maximizing AI's creative potential. On the other hand, a basic idea from a school student can go viral 🚀 on the internet. What if we could democratize generative AI based development beyond mere prompt engineering, placing creators, not just developers, at the heart of this revolution?
Perhaps the answer to these challenges lies in a paradigm shift...
Imagine a scenario where building AI-powered tools feels less like traditional coding and more akin to drafting lecture notes. Envision a language that seamlessly converts ideas into dynamic apps, reminiscent of how LaTeX crafts documents or markdown creates webpages. Such a transition could drastically reduce development times, allowing creators not only to keep up but to lead innovatively, without the prolonged commitment often demanded in a highly competitive environment.
Caveats of Generative AI
If one embarks on a journey to create such a new higher-order language, they will quickly realize several constraints:
Token Limitations: One of the fundamental hurdles is navigating the token limitations inherent in AI models. For the uninitiated, tokens represent chunks of information, and their count often determines the depth and breadth of AI responses.
Laggy Inferences: To counteract slow inferences, there's an imperative need for automatic parallel processing of API calls. This ensures efficient handling of vast amounts of data and swift feedback.
Preserving Cost-Intensive Output: It's crucial to safeguard expensive AI output, ensuring that even if a program runs intermittently over several days, the generated data remains intact and retrievable.
Model Integrations: The sea of available AI models presents integration challenges. A higher-order language must be versatile enough to interact seamlessly with a diverse range of models.
Extensive Parsing Requirements: The AI's ability to generate outputs is vast, spanning from natural languages to data serialization formats, and even to distinct programming languages that a Large Language Model (LLM) can produce. An effective interface should deftly parse and interpret this myriad of outputs.
Central to these challenges is the imperative of user-friendliness. The core goal is to empower creators, enabling them to harness the potential of generative AI without drowning in its complexities. It's about seamlessly melding technological prowess with human creativity. This is the frontier of opportunity to be at the forefront of the next big wave in digital creativity.
Crafting a New Higher-Order Language
Let us try to imagine a language deeply integrated with the generative AI framework. One that allows a creator to transform a simple AI prompt into a monetizable application within mere hours, making AI's promise more tangible and accessible to all. What would it look like? Keeping user-friendliness as the core principle, perhaps something like a templated markdown? That idea might not be too far off.
With excitement, I offer a glimpse into an attempt at such a language. Here's a quick preview:
To truly get a feel for this language, experiencing it is key. Sign up for this newsletter now and be notified of the video lectures I'll be releasing soon.
User Friendly Design
Visualize a world where with just a few crisp lines:
[display]
markdown = # Welcome to the Haiku App!
[ask.name]
description = What would you like to be called?
You instantly breathe life into an intuitive user interface:
Want GPT-4 to craft a personalized haiku for the user? Command it with precision and simplicity:
[prompt.generate_haiku]
model_name = gpt-4
system_role = You are a haiku generator
message = Please generate a haiku for the following name: {{input.name}}
Note:
- Write it in markdown blockquote format.
- Don't use quotes.
display_option = markdown
The result? A tailored poetic masterpiece for your user:
Envision a language where your tasks are limited to writing prompts, displaying content, and seeking user inputs. Yet, within this framework, you can craft an app as intricate as a full-length Machine Learning course, complete with visualizations, videos, graphs, tutor, and tests — all while adhering strictly to the language's boundaries.
Could there be a more declarative approach to app creation?
Unleashing the Full Potential of Generative AI
GPT-4 can produce data that can be instantly turned into formats like graphs, UI components, or diagrams. But what if we don't tap into this capability? Can we truly build outstanding apps?
To get GPT-4 to generate synthetic patient data in a JSON format, simply indicate output_type
:
[prompt.generate_synthetic_data]
model_name = gpt-4
system_role = You generate synthetic patient data in JSON format.
message = A case of Rheumatoid arthritis (RA), with `name` (str), `age` (int), `symptoms` (str), `current_medications` (str) fields in the JSON. Keep it very short and to the point.
output_type = json
Then use the generated data as an object to extract and display any detail you need:
[display]
markdown = # Example symtoms and medication for an RA patient
---
A person named {{response.generate_synthetic_data.name}}, aged {{response.generate_synthetic_data.age}} came in and presented with the following symptoms.
## Symptoms
{{response.generate_synthetic_data.symptoms}}
## Current Medications
{{response.generate_synthetic_data.current_medications}}
Here's how it looks:
Picture a language equipped with a comprehensive templating grammar, built-in safeguards against hallucinations leading to parsing errors, and expertly tailored to harness the structured-output prowess of LLMs!
Dynamic Adaptability
Picture this: You're building a feature to generate a logo based on user input. The user provides substantial information – Project Name, Theme, and Project Description. You craft a logo and present it to them, only to receive a straightforward "No" in response. A well-designed application wouldn't force the user to start the entire process anew.
Imagine a setup where the distinction between user input and logo creation is clear, and the system supports retries based on user feedback for specific modules. Here's a glimpse:
retrier =
{
"module": "create_logo_and_ask_user",
"input_injections": {
"project_name": "{{input.project_name}}"
"project_description: "{{input.project_description}}"
},
"condition": "user_liked_it",
"max_retries": "10",
"on_exhausted_retries": "continue"
}
In this configuration, if a user is unsatisfied with the logo, the system would craft alternatives, up to a maximum of 10 iterations, without pestering the user for repeated project description. Envision a language with this level of built-in adaptability and user-centric design!
Efficient Run-Time via Automatic parallel processing
Consider the following scenario: You're constructing a video based on a user's selected topic. Having already produced the textual content, you're now crafting each video scene separately. Without employing automatic parallel processing for image and audio generation tasks, the time to render the entire video could increase, risking the user's attention drifting elsewhere.
Here's a snapshot of this in action:
And More...
Combat Token Limitations: Imagine being able to create differently-primed GPT-4 agents for different tasks, that have their own token management, with ease. Moreover, imagine being able to import a complete tried and tested sub-workflow with its own token management inside your app promoting a modular design that can counter token limitations.
Bedrock of generative-AI based primitives: What to add a caption to an image, or combine two that you have generated, or create a video out of some images? Imagine a language, primed for DSL centric generative AI world, where these capabilities come built-in.
Thoroughly integrated: A language that is always up to date with the latest models available. One where you can not just process generated content but also send it with ease to channels like Zapier or Pipedream which then integrates with your favorite app like Google Spreadsheet.
Documentations at your fingertips: A language with intelligent editor that can teach you all you need to know about AI models from within the editor. Just hover over a model and documentation will pop-up.
Auto saving costly AI generated content: AI-driven outputs, while innovative, come with substantial costs. Costs can escalate dramatically at scale. Imagine a language which saves AI-outputs automatically to a built-in database and let the user recover their work anytime.
Staying ahead: Want to use Langchain for document QnA? Why not, a language that not just integrates but brings latest generative AI techniques to the masses with ease.
Rate limits: A language with automatic key rotation capabilities allowing creators to deal with rate limit error with ease.
Clean Design Philosophy: A language that keeps business logic and UI decoupled — creators manage the logic, while the engine translates events generated at run-time by the logic into intuitive interfaces.
Try it out yourself!
For the lack of a better name, we are currently calling this language PSL, and it's hosted at PromptSpace.App:
I'll end with a link to this run of a complete course implemented entirely in PSL: Basic Linear Algebra
If you're intrigued by our concept, please help us spread the word! We're eager to further develop and refine PSL, and for that, we need your support and adoption. There's so much potential to unlock!
UPDATE: The first tutorial on PSL is available now: YouTube Link