PromptStudio is a tool to assist in engineering prompts for large language models
Instructions to install the project: To run this project, you need to have Node.js and MySQL installed.
- Create the database running the SQL script in
backend/dababase/db.sql
. - Install the dependencies
cd promptstudio
npm install
To run the project:
- You need to have a file called
credentials.json
located in the root of the project. This file contained your api keys for LLMs, and it should contains your database credentials. The format should be like this:
{
"database": {
"host": "localhost",
"user": "root",
"password": "your_password",
"database": "promptstudio",
"port": 3306
},
"api_keys": {
"OpenAI": "your_openai_api_key",
"Google": "your_google_api_key"
}
}
- You also need to have a YML file containing the configuration of the experiment you want to run.
You should place the file and all his corresponding files in the
files
folder. The file folder should have the datasets in the csv format and code files like processors and evaluators. The format of the configuration can be imported from ChainForge. - You need to be running the backend server. To do so, run the following command:
cd backend/api
tsx api.ts
- Finally, you can run an experiment with the following command:
cd headless
tsx cli.ts -c ../files/YOUR_CONFIG_FILE_NAME.yml
To start again an existing experiment you can do:
tsx cli.ts -n YOUR_EXPERIMENT_NAME