A quality, clarity, and risk validation SDK for LLM inputs.
Project description
PromptClarity SDK
Guard prompts before they become bad outputs.
PromptClarity SDK is a pre-LLM validation layer that detects unclear, incomplete, risky, or low-quality prompts before they reach an AI system.
Positioning
PromptClarity SDK helps teams validate LLM inputs for:
- prompt quality scoring
- missing context detection
- ambiguity detection
- dataset metadata validation
- agent-readiness checks
- RAG-readiness checks
- cost and token waste reduction
- safer enterprise AI workflows
Enterprise tagline:
A quality, clarity, and risk validation SDK for LLM inputs.
Install
pip install promptclarity-sdk
Usage
from promptclarity import PromptClarity
guard = PromptClarity()
result = guard.validate("Analyze this data and give insights")
print(result.to_dict())
Example output:
{
"status": "needs_clarification",
"prompt_score": 42,
"risk_level": "low",
"missing_items": [
"success criteria",
"dataset details",
"business objective",
"output format",
],
"recommendations": [
"Define the success criteria for a useful answer.",
"Describe the dataset, including source, fields, and size.",
"State the business objective or decision the answer should support.",
"Define the expected output format.",
"Specify the type of analysis required.",
"Mention whether you need EDA, prediction, reporting, or recommendations.",
],
}
Package Layout
promptclarity/
|-- analyzer.py # prompt quality analyzer
|-- rules.py # rule-based checks
|-- risk.py # unsafe / sensitive / vague input checks
|-- metadata.py # dataset/file metadata analysis
|-- recommender.py # missing-detail suggestions
|-- prompt_builder.py # improved prompt generator
`-- __init__.py
Development
python -m pytest
Release Checklist
- Update the version in
pyproject.tomlandpromptclarity/__init__.py. - Run
python -m pytest. - Build with
python -m build. - Check the distribution with
python -m twine check dist/*. - Upload to TestPyPI first, then PyPI.
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 promptclarity_sdk-0.1.0.tar.gz.
File metadata
- Download URL: promptclarity_sdk-0.1.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91fd47dd690eb493537669335e4b700f7c032413ffbda4c49e083d8c9a37bf8b
|
|
| MD5 |
cec88090acfc48da25b1ffdb1b89e308
|
|
| BLAKE2b-256 |
13a469dc9ae23fc520a52bf3d57d9118e483d5bc5677b0fa3f2715af2263065f
|
File details
Details for the file promptclarity_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: promptclarity_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a74b3112d61e23f041e5e3c524dd66987a9b94e0ffed5bf62162249092c93d0
|
|
| MD5 |
bf29c7ad9c02c306a9182948161b31cb
|
|
| BLAKE2b-256 |
fc22d3f399e032c75f014244a21224b6658e407a29b5c354257a9eba9ef5669f
|