PromptCraft is an NLP-powered web application that analyzes, understands, and enhances user prompts for improved AI interactions. It leverages Google's free Gemini API for semantic embeddings and prompt enhancement, and provides before–after comparisons with linguistic feedback.
- NLP pipeline: tokenization, lemmatization, stopword removal, readability analysis
- Intent detection and prompt classification (creative, academic, technical, conversational)
- Prompt enhancement via Gemini API tailored for selected target model (Gemini, ChatGPT, Perplexity)
- Metrics: readability, length, semantic similarity, and structured improvement summary
- Simple web UI with side-by-side comparison
-
Set your Gemini API key in environment:
- Windows PowerShell:
$env:GEMINI_API_KEY="YOUR_API_KEY"
- Windows PowerShell:
-
Create a virtual environment and install dependencies:
python -m venv .venv .\.venv\Scripts\python.exe -m pip install --upgrade pip .\.venv\Scripts\python.exe -m pip install -r requirements.txt
-
Run the server:
.\.venv\Scripts\python.exe -m uvicorn server.main:app --host 127.0.0.1 --port 8000 --reload
-
Open the app in your browser at
http://127.0.0.1:8000/.
- If
GEMINI_API_KEYis not set, the app will still run but prompt enhancement and embeddings will return a graceful error instructing you to set the key. - The NLP pipeline uses
nltkand will download required corpora (punkt, wordnet, stopwords, averaged_perceptron_tagger) on first run.