Promptact is an interactive game designed to help users learn and master the art of prompt engineering. Players are challenged to reverse-engineer system prompts by observing AI conversations and crafting their own prompts to match the target behavior.
- ๐ฎ Interactive learning experience
- ๐ฏ Multiple levels with increasing complexity
- ๐ก Helpful hints and feedback
- ๐ Real-time similarity scoring
- ๐ Instant AI response testing
- Node.js 18+
- npm or yarn
- OpenAI API key
- Clone the repository:
git clone https://github.com/detextit/promptact.git
cd promptact
- Install dependencies:
npm install
- Create a
.env.local
file in the root directory and add your OpenAI API key:
OPENAI_API_KEY=your_api_key_here
- Run the development server:
npm run dev
- Open http://localhost:3000 in your browser to start playing!
- Each level presents you with a target conversation between a user and an AI
- Your goal is to figure out the system prompt that generated the AI's response
- Write your system prompt and test it
- Get a similarity score of 50% or higher to reveal the target prompt
- Progress through levels to master different prompt engineering techniques
- Next.js 14
- TypeScript
- Tailwind CSS
- OpenAI GPT-4
- React Markdown
promptact/
โโโ src/
โ โโโ app/ # Next.js app router
โ โโโ components/ # React components
โ โโโ data/ # Game levels and prompts
โ โโโ types/ # TypeScript definitions
โโโ public/ # Static assets
โโโ scripts/ # Level generation scripts
- Google Arts & Culture for UI/UX inspiration