promptify
Routes Promptify's structured NLP task and evaluation workflows, including NER, classification, QA, custom Pydantic schemas, and dataset-based metrics.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- promptify
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Routes Promptify's structured NLP task and evaluation workflows, including NER, classification, QA, custom Pydantic schemas, and dataset-based metrics.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/overview.md1.6 KB
- 参考文档references/repo-provenance.md1.2 KB
- 参考文档references/repo-routing-metadata.json515 B
- 参考文档references/troubleshooting.md4.1 KB
- 脚本scripts/check_promptify.py10.9 KB
03 SKILL.md 正文
Promptify
Promptify is a structured-output NLP library built on LiteLLM, Pydantic, and Jinja templates. Use this skill when a user wants to create, call, or debug Promptify task objects, build prompts, parse structured JSON output, or evaluate task outputs against labeled data.
Install and import
If you need the full library surface, install the checkout in editable mode with the evaluation extra:
python -m pip install -e '.[eval]'
If you only need the task APIs and not ROUGE or the evaluation helpers, use:
python -m pip install -e .
Minimal no-network import checks:
python -c "from promptify import NER, Classify, QA, Summarize, Task, get_cost_summary; print('core-ok')"
python -c "from promptify.eval import evaluate; print('eval-ok')"
For a safe local smoke test that does not call any provider, run:
python scripts/check_promptify.py --mode all
Read references/repo-provenance.md before deciding whether this skill matches the current checkout or should be refreshed.
What this skill covers
- Structured task creation and execution: NER, classification, QA, summarization, extraction, generation, normalization, topic extraction, and custom Pydantic tasks.
- Prompt construction, parser behavior, model configuration, async and batch execution, and cost tracking.
- Dataset loading, metric selection, and evaluation of task outputs.
- Common runtime failures such as provider auth errors, invalid JSON output, schema mismatches, template path problems, and legacy tutorial API confusion.
Route map
1. Structured task APIs
Read sub-skills/structured-tasks/SKILL.md when the request is about creating a task object, choosing built-in task classes, customizing prompts, using examples or labels, running batch or async calls, or debugging parser or provider failures.
This route also covers the shared runtime objects that support task execution, including ModelConfig, LLMEngine, Parser, PromptBuilder, get_cost_summary, and setup_logging.
2. Evaluation workflows
Read sub-skills/evaluation/SKILL.md when the request is about load_dataset, evaluate, metric selection, CSV or JSON dataset formats, ROUGE, or interpreting evaluation failures.
3. Cross-cutting references
references/overview.mdfor the current public import map and a quick orientation.references/troubleshooting.mdfor install, import, provider, parse, template, and legacy API mismatch issues.references/repo-provenance.mdfor the source snapshot and staleness baseline.
Legacy tutorial note
The repository still contains older notebook and tutorial material that mentions Prompter, OpenAI, and Pipeline. Those names are archived examples, not the current public API. Use the current task classes and the evaluation helpers documented in the sub-skills.
When to stop and switch sub-skills
- If the user asks about metrics, dataset loading, or ROUGE, switch to evaluation.
- If the user asks about prompt templates, schema-based outputs, async calls, batch processing, or provider errors, stay in structured-tasks.
- If the user only needs the installation baseline or freshness check, read
references/repo-provenance.mdand the root troubleshooting note.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).