The Prompt Engineering Tool is a web-based application designed to help users experiment with and optimize prompts for various large language models (LLMs). It allows users to:
- Test prompts across multiple LLM providers simultaneously
- Save and load prompt templates
- Manage variables for dynamic prompt generation
- Save and load model configurations
- Compare outputs from different models side-by-side
This tool is particularly useful for developers, researchers, and content creators working with AI language models to refine their prompts and achieve better results.
- Support for multiple LLM providers (currently OpenAI and Anthropic)
- Global and individual prompt modes
- Variable management for dynamic prompt generation
- Save and load functionality for prompts, variables, and model configurations
- Responsive design with resizable panels
- Temperature adjustment for each model
- Node.js (v14 or later)
- npm (v6 or later)
- Clone the repository:
git clone https://github.com/Teknium1/prompt-engineering-toolkit.git
- Navigate to the project directory:
cd prompt-engineering-toolkit
- Install the dependencies:
npm install
This will install the following main libraries:
react
andreact-dom
: For building the user interface@mui/material
and@emotion/react
: For Material-UI components and stylingaxios
: For making HTTP requests to the LLM APIsreact-resizable-panels
: For the resizable panel layout
- Create a
.env
file in the root directory and add your API keys:
REACT_APP_OPENAI_API_KEY=your_openai_api_key_here
REACT_APP_ANTHROPIC_API_KEY=your_anthropic_api_key_here
- Start the development server:
npm start
- Open your browser and visit
http://localhost:3000
to use the application.
-
Configure your API keys for the LLM providers you want to use (OpenAI, Anthropic, etc.) in the "Model Configurations" section.
-
Create variables if needed in the "Variables" section.
-
Enter your prompt in the main prompt area or use the global prompt feature.
-
Click "Run Prompt" to send the prompt to the configured models.
-
View the outputs in the respective model sections.
-
Save prompts, variables, or model configurations for future use.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.```