JacobHuang91/prompt-refiner
🚀 Lightweight Python library for building production LLM applications with smart context management and automatic token optimization. Save 10-20% on API costs while fitting RAG docs, chat history, and prompts into your token budget.
Provides modular pipelines for cleaning, compressing, and scrubbing text data—including HTML stripping, deduplication, and PII redaction—with composable operations via pipe syntax. Includes specialized modules for AI agent workflows: `SchemaCompressor` achieves 57% average token reduction on function definitions, and `ResponseCompressor` optimizes tool outputs, targeting frameworks like OpenAI's function calling while integrating seamlessly with completion and chat APIs.
Stars
36
Forks
3
Language
Python
License
MIT
Category
Last pushed
Dec 23, 2025
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/prompt-engineering/JacobHuang91/prompt-refiner"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Higher-rated alternatives
promptfoo/promptfoo
Test your prompts, agents, and RAGs. Red teaming/pentesting/vulnerability scanning for AI....
thunlp/OpenPrompt
An Open-Source Framework for Prompt-Learning.
dair-ai/Prompt-Engineering-Guide
🐙 Guides, papers, lessons, notebooks and resources for prompt engineering, context engineering,...
bigscience-workshop/promptsource
Toolkit for creating, sharing and using natural language prompts.
promptfoo/promptfoo-action
The GitHub Action for Promptfoo. Test your prompts, agents, and RAGs. AI Red teaming,...