Prompt Engine Overview
Run any prompt and get the optimal model to execute it without worrying about GPUs, tokens, or rate limits—it just works effortlessly.
Introduction
JigsawStack Prompt Engine is a powerfult API built from the ground up to execute any prompt or instruction seamlessly. It intelligently selects the best model from a cluster of state-of-the-art models, allowing you to focus on results without worrying about GPUs, tokens, or rate limits.
The Prompt Engine takes in three things: the prompt, dynamic variables, and the output structure you expect every single time you run the prompt. The last two are optional. The Prompt Engine automatically enhances the initial prompt to improve accuracy, reduce token usage, and prevent output structure breakage.
The Prompt Engine can be utilized in two ways:
- Creating and running a reusable prompt (recommended)
- Executing a prompt directly
For better reliability and prompt optimization, it is recommended to first Create a Prompt and then Run the Prompt
The Prompt
This is the instruction that should be executed. It can be of two forms:
- Basic prompt: Has no dynamic variables. i.e Tell me about the leaning tower of Pisa!
- Dynamic prompt: Has dynamic variables. i.e Tell me about
{ item }
Prompt return type
The Prompt Engine supports 3 types of return types:
String
Array<object>
Object
Dynamic Inputs
These are variables that can be used within the prompt to add data dynamically.
Here is an example:
key
: This is the name of the variable.optional
: Controls whether the variable is optional.initial_value
: This is the initial value of the variable.
How to use inject an input while running the prompt:
Was this page helpful?