File size: 2,238 Bytes
638c806 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | # PromptBoost v0.1.1+
PromptBoost is the Python/FastAPI app and product line for local prompt
compilation, evaluation logging, and matrix-based prompt checks.
It reads PromptGarage examples read-only, accepts raw prompts, selects
task/harness/model rules, generates deterministic boosted prompts, runs a local
no-new-facts check, and stores boost runs in `promptboost.db`. The app also
includes a Matrix Lab UI/API and an optional agentic LLM prepass that safely
falls back to deterministic PromptBoost when the LLM is unavailable or unsafe.
The repository root TypeScript code is a separate portable V2 library and
experiment line. Its public entry point is `../src/index.ts`; this Python app
remains the product-facing web/API implementation.
## Run
```bash
uv run uvicorn promptboost.main:app --reload --port 8000
```
Open `http://127.0.0.1:8000`.
## Routes
- `GET /` β main PromptBoost web form.
- `GET /matrix-lab` β Matrix Lab UI for comparing deterministic and full-cell
prompt evaluations.
- `GET /health` β local health check.
- `POST /boost` β deterministic PromptBoost pipeline.
- `POST /boost/agentic` β optional LLM prepass plus deterministic fallback.
- `POST /api/matrix/deterministic` β deterministic matrix evaluation endpoint.
- `POST /api/matrix/full-cell` β full-cell matrix evaluation endpoint.
- `GET /api/runs` β stored boost-run history from `promptboost.db`.
- `GET /api/promptgarage/samples` β read-only PromptGarage sample access.
## Agentic mode
The deterministic `/boost` route remains the default. The optional
`/boost/agentic` route runs an OpenAI-compatible LLM prepass first, validates
the JSON task draft, then falls back to deterministic PromptBoost if the LLM is
unavailable or adds suspected new facts.
```bash
export PROMPTBOOST_LLM_API_KEY=...
export PROMPTBOOST_LLM_BASE_URL=https://api.openai.com/v1
export PROMPTBOOST_LLM_MODEL=gpt-5.4-mini
```
## Test
```bash
uv run pytest
```
## Notes
- PromptGarage is read with SQLite immutable/read-only connections.
- Paid LLM APIs are only called when agentic mode is explicitly configured and
requested.
- The no-new-facts check is conservative and deterministic; it is a warning
gate, not a semantic proof system.
|