AI Prompt Evaluator
This project is an AI-powered prompt evaluation tool built with Next.js. It analyzes user prompts and provides structured feedback to help improve clarity, groundedness, tonality, and overall effectiveness. The evaluation is performed using Google’s Gemini LLM and context management via AlchemystAI.Features
- Enter a prompt and receive an instant evaluation.
- Visualize prompt quality across multiple criteria (relevance, intent match, groundedness, fluency, conciseness, reference alignment, tonality).
- Get actionable suggestions and an improved version of your prompt.
- Interactive charts and UI components for clear feedback.
How It Works
- Enter your prompt in the input box.
- Click Evaluate.
- The backend sends your prompt to a Gemini LLM, using context from previous evaluations via AlchemystAI.
- The LLM returns a JSON evaluation, which is visualized and displayed in the UI.
Running Locally
Prerequisites
- Node.js (v18+ recommended)
- npm, yarn, pnpm, or bun
Environment Variables
Create a.env.local
file in the root directory and add:
Install Dependencies
Start the Development Server
Dependencies
- Next.js
- React
- @google/generative-ai
- @alchemystai/sdk
- @tanstack/react-query
- d3 (for charts)
- Tailwind CSS (for styling)
- Lucide React (icons)
- uuid
- axios
Project Structure
app/
- Next.js app directory (main pages and layout)components/
- UI componentslib/
- API utilities and context managementsrc/
- Types and config.env.local
- Environment variables (not committed)