Changelog¶
All notable changes to PromptGuard are documented here. The format follows Keep a Changelog and the project adheres to Semantic Versioning.
0.1.0 — 2026¶
Initial public release.
Added
PromptGuard— main classifier wrapping a fine-tuned DistilBERT model hosted on HuggingFace Hub (arkaean/promptguard-distilbert).analyze()andanalyze_batch()for single-prompt and batch classification returningRiskScore.classify()/classify_batch()for lightweight boolean classification.sanitize()andsanitize_if_malicious()withCONSERVATIVE,BALANCED, andMINIMALsanitisation strategies.SentimentAnalyzerwith VADER integration, extended aggressive-word vocabulary, and negation-aware scoring.IntentClassifierfor JAILBREAK / INJECTION / QUESTION / INSTRUCTION / CONVERSATION classification.KeywordExtractorwith optional spaCy noun-chunk extraction.AttackPatternDetectorcovering six attack categories (instruction override, role manipulation, context manipulation, prompt extraction, output manipulation, encoding/obfuscation attacks).NFKC Unicode normalisation in all analysers and the sanitiser to neutralise full-width character obfuscation.
PromptCache— O(1) LRU cache with configurable size and TTL, implemented withcollections.OrderedDict.SanitizeResponsetyped dataclass (replaces rawdictreturn).AdvancedSanitizerwith intent-aware strategy selection and alternative-rephrasing suggestions.PEP 561
py.typedmarker and__init__.pyitype stub.promptguard.utils:summarize_results,filter_by_risk_level,get_most_dangerous,export_to_csv,results_to_dataframe.Pre-commit hooks (black, flake8, mypy) and 85 % coverage requirement.
Sphinx documentation with Furo theme, auto-deployed to GitHub Pages.