A Python package for building effective chat prompts from vague user ideas.
Project description
prompt-recipe-smith
prompt-recipe-smith is a small Python package for building effective chat prompts
from vague user ideas.
It is designed for people who may not know AI, software, or prompt engineering terms. The package helps turn a rough thought into a clearer prompt by applying a reusable prompt-building procedure.
PromptTemplate vs PromptRecipe
A PromptTemplate is a fixed prompt form with variables:
from prompt_recipe_smith import PromptTemplate
template = PromptTemplate("Explain {topic} for a beginner.")
print(template.render({"topic": "email security"}))
A PromptRecipe is more than a template. It can include steps, defaults,
examples, clarification ideas, and up to three simple branches. A
PromptBuilder applies the recipe to a user's rough input and returns a
PromptResult.
Installation
Install from PyPI:
uv add prompt-recipe-smith
Minimal Example
from prompt_recipe_smith import PromptBuilder
from prompt_recipe_smith.output import to_json, to_plain_text
from prompt_recipe_smith.recipes import clarify_idea_recipe
recipe = clarify_idea_recipe()
result = PromptBuilder().build(recipe, "I want to write a polite follow-up email")
print(to_plain_text(result))
print(to_json(result))
Plain Text Output
Help me turn this writing idea into a clear request:
I want to write a polite follow-up email
Ask up to three plain-language clarification questions, then draft an improved prompt.
JSON Output
{
"prompt": "Help me turn this writing idea into a clear request:\nI want to write a polite follow-up email\n\nAsk up to three plain-language clarification questions, then draft an improved prompt.",
"recipe_name": "clarify-idea",
"user_input": "I want to write a polite follow-up email",
"selected_branch": "writing",
"steps": [
"Restate the user's rough idea.",
"Ask for the missing context only if it matters.",
"Produce a practical prompt the user can paste into chat."
],
"provider": "chatgpt"
}
Development
uv sync
uv run pytest
uv run ruff check .
uv run mypy src
uv build
Scope
The first version supports plain text and JSON output. JSONL, Gemini, Anthropic, and Django integrations are future extension targets. The provider layer does not call external APIs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prompt_recipe_smith-0.1.0.tar.gz.
File metadata
- Download URL: prompt_recipe_smith-0.1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad43094a872fc111e46a1f8b5d7a3367a1d7f03fd0bb882f15db2d5b257d3fdb
|
|
| MD5 |
cd06ece7572baae167ce5802d19dd515
|
|
| BLAKE2b-256 |
2d87a224918832306ddf28c94a25849ec2f031e68778777559d5e750dbdc96be
|
File details
Details for the file prompt_recipe_smith-0.1.0-py3-none-any.whl.
File metadata
- Download URL: prompt_recipe_smith-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d8881966ed4393427e1c5decd9cdeb767b91377df3eca6964ee5458d2244bb4
|
|
| MD5 |
887523de4e4d956924863eb549585d61
|
|
| BLAKE2b-256 |
dcdf58065d953b9e75988c0f99082acb5a02c3e207cefcfa9108c2c1b80c5c8b
|