Skip to main content

Production-grade prompt engineering toolkit. Score, optimize, and generate prompts.

Project description

PromptForge Pro ๐Ÿ”ฅ

Production-grade prompt engineering toolkit for ChatGPT, Claude, Gemini, and every LLM.

Stop writing bad prompts. PromptForge Pro scores, optimizes, and generates battle-tested prompts from a library of 50+ templates โ€” entirely from your terminal.


What's Inside

Module What it does
Scorer Rates any prompt 0โ€“100 across 6 dimensions with specific fix suggestions
Optimizer Rewrites weak prompts โ€” auto-injects roles, format specs, constraints
Templates 50+ ready-to-fill prompt templates across 15 categories
Compare A/B tests two prompt variants with scoring
Batch Optimize 20+ prompts in one command
API Full REST API โ€” deploy to RapidAPI, Render, or your own server

Installation

pip install -r requirements.txt

No API keys needed for the core toolkit. Everything runs locally.


CLI Usage

Score a prompt

python -m promptforge.cli score "Write a blog post about AI"
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  PROMPT SCORE: 51.0/100  [D โ€” Weak]
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  Clarity        โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 10.0/10
  Specificity    โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘  5.0/10
  Context        โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  4.0/10
  Format         โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  4.0/10
  Constraints    โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  4.0/10
  Completeness   โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  2.0/10
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  ISSUES:
  โš  No role assigned to the AI
  โš  No output format specified
  โš  Prompt is extremely short
  SUGGESTIONS:
  โ†’ Add 'You are a [role]...' to anchor behavior
  โ†’ Specify format: list, JSON, paragraphs, etc.
  โ†’ Expand with context and constraints
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Optimize a prompt

python -m promptforge.cli optimize "Write a blog post about AI"
Score: 51.0 โ†’ 65.0  (+14.0 improvement)
Changes:
  โœ“ Added role: 'You are an expert content strategist'
  โœ“ Added format hint: 'Structure your response with clear sections'
  โœ“ Added conciseness instruction

Compare two prompts

python -m promptforge.cli compare "Tell me about Python" "You are a Python expert. Explain Python's GIL in 150 words with a practical example."

Browse templates

python -m promptforge.cli templates
python -m promptforge.cli templates --category coding
python -m promptforge.cli search "email"

Fill a template interactively

python -m promptforge.cli fill blog_outline
Template: Blog Post Outline Builder
Required variables:
  ยท topic
  ยท keyword
  ยท word_count
  ยท level

Enter values:
  topic: How to use AI for freelancing
  keyword: AI freelancing
  ...

Batch optimize from file

python -m promptforge.cli batch --file prompts.txt --output results.json

Start the REST API

python -m promptforge.cli serve
# โ†’ http://localhost:8000
# โ†’ http://localhost:8000/docs

Template Categories (50+ templates)

Category Templates
AI / Prompt Engineering Prompt optimizer, System prompt architect, Few-shot builder, CoT builder
Business Email composer, Executive summary, Cold pitch, Meeting agenda
Marketing Product descriptions, Ad copy, SEO meta, Brand voice
Coding Code review, Bug fix, API docs, Unit tests, Refactor
Content Blog outlines, YouTube scripts, Newsletters, Twitter threads
Data Data analysis, SQL generator, Report narrator
Education Lesson plans, Concept explainer, Quiz generator
Creative Story outlines, Character profiles, Poem generator
Productivity Task breakdown, Decision framework, Weekly planner
HR Job descriptions, Performance reviews
Finance Financial summaries, Investment thesis
Support Customer responses, FAQ generator
Legal T&C drafter, Privacy policy sections
Health Fitness plans, Meal planners
Research Literature review, Hypothesis builder

Python API

from promptforge.scorer import score_prompt
from promptforge.optimizer import optimize_prompt
from promptforge.templates import fill_template, search_templates

# Score
result = score_prompt("your prompt here")
print(result.total)        # 0-100
print(result.grade)        # "A โ€” Strong"
print(result.suggestions)  # list of improvements

# Optimize
opt = optimize_prompt("write a poem about cats")
print(opt.optimized)       # improved prompt
print(opt.improvement)     # +N points

# Use a template
prompt = fill_template("code_review", {
    "language": "Python",
    "code": "def add(a,b): return a+b"
})

# Search templates
results = search_templates("email")

REST API Endpoints

Method Endpoint Description
POST /score Score a prompt
POST /optimize Optimize a prompt
POST /compare Compare two prompts
POST /batch-optimize Batch optimize up to 20
GET /templates List all templates
GET /templates/{key} Get single template
POST /templates/fill Fill a template
GET /categories List categories
GET /search?q= Search templates

Full Swagger docs at /docs when running locally.


Deploy to Render (Free)

# render.yaml is included โ€” just connect your repo
# Free tier: 750 hours/month, spins up on request

License

MIT โ€” use it, sell it, build on it.


Built with Python 3.10+ ยท No external AI APIs required ยท Works offline

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

promptforge_pro-1.0.0.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

promptforge_pro-1.0.0-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file promptforge_pro-1.0.0.tar.gz.

File metadata

  • Download URL: promptforge_pro-1.0.0.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for promptforge_pro-1.0.0.tar.gz
Algorithm Hash digest
SHA256 eafdcf8ee3e907d654cbd40ff1cbc2d37032bfaf937fb2d0c06eaea2a33110c2
MD5 7225ec3c9d76955ba1b4d39ab25de862
BLAKE2b-256 3a29682e694c381add48cab2029aff7e4badd152bd600c6ab97509668d959efc

See more details on using hashes here.

File details

Details for the file promptforge_pro-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for promptforge_pro-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e360c53446a8fb9fdbedc1c6d85c1dfa140d30fc29f4c330936c99cd39c91d6f
MD5 364aa3b226976f8a0f932aaed87fd20d
BLAKE2b-256 f173c6fcc9ec654ad022b9ea0179b8d83ae2bf2413f3620f27caab51d18909f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page