PromptCraft AI 如何將粗略構想轉化為可直接使用的提示詞
How I built PromptCraft AI: turning rough ideas into ready-to-use prompts
PromptCraft AI 網頁應用程式會分析一句構想中已交代及缺少的資訊,並生成四種不同、附有質素評分的詳細提示詞。在涵蓋 18 個構想的基準測試中,離線引擎生成的提示詞平均得分為 95/100,高於原始構想的 49 分和人工擴寫的 52 分。它支援多種模型及相容 OpenAI 的 API;沒有 API 金鑰時,離線引擎仍可生成四種提示詞。
A web app that takes a one-line idea, works out what it means and what is missing, and writes four different, detailed prompts for it, each scored for quality. Classical NLP does the understanding, any LLM you choose does the writing, and an offline engine takes over when there is no API key.
The problem
Most people ask an AI tool for something in one vague line, like "make an e-commerce website", and get a generic answer back. The details that make a prompt useful (platform, scope, stack, design, constraints) are missing, and people don't know what they left out.
What the research found
- On a benchmark of 18 ideas across categories, PromptCraft's prompts averaged 95/100, against 49 for the original idea and 52 for a manual expansion, using the offline engine with no LLM.
- Completeness rose from 0 to 96 and specificity from 2 to 100: the gains come from filling in what the idea never said, not from rewording it.
- Intent was detected correctly for all 18 ideas, and 89% of generated prompts passed every validation check.
Decisions that shaped it
Understand first, then write. spaCy and a TF-IDF and logistic-regression intent classifier, backed by keyword rules, work out intent, domain and platform, and separate what you said from what is missing. Missing details are stated as assumptions, not quietly invented.
Four genuinely different strategies, not four rewordings: a lean MVP, a full production build, a design-focused version and an AI-enhanced one, with a diversity check that rejects near-duplicates.
Quality is a number, not a feeling. Every prompt is validated and scored on clarity, completeness, specificity, consistency, intent preservation, actionability and diversity.
Works with any model: Gemini, OpenAI, Claude, Groq, OpenRouter, Ollama or any OpenAI-compatible API, with keys kept on the server. With no key at all, an offline template engine still writes all four prompts.
Refine by talking. "Make the second prompt more detailed and use PostgreSQL" changes only that card, with a word-level compare of versions and one-click restore.
Built with
Next.js, TypeScript, Tailwind CSS, FastAPI, Python, spaCy, scikit-learn, SQLAlchemy
Originally published at niranjand.in.
來源:DEV Community · dev.to