Skip to main content

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

  1. Enter your prompt in the input box.
  2. Click Evaluate.
  3. The backend sends your prompt to a Gemini LLM, using context from previous evaluations via AlchemystAI.
  4. 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:
GOOGLE_API_KEY=your-google-generative-ai-key
ALCHEMYST_API_KEY=your-alchemystai-sdk-key

Install Dependencies

npm install
# or
yarn install
# or
pnpm install

Start the Development Server

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 in your browser.

Dependencies

Project Structure

  • app/ - Next.js app directory (main pages and layout)
  • components/ - UI components
  • lib/ - API utilities and context management
  • src/ - Types and config
  • .env.local - Environment variables (not committed)

I