Update README.md
Browse files
README.md
CHANGED
|
@@ -1,39 +1,18 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
Trained on a curated dataset of 200,000 prompts using Hugging Face AutoTrain with LoRA disabled. Class balance and curriculum learning were applied: fully positive prompts first, followed by negative and vague examples.
Key parameters:
-
|
| 10 |
-
|
| 11 |
-
The model achieved perfect scores on the evaluation set:
-
|
| 12 |
-
|
| 13 |
-
Using the `transformers` library:
```python
from transformers import pipeline
classifier = pipeline("text-classification", model="VerifiedPrompts/CNTXT-Filter-Prompt-Opt")
result = classifier("Write an advertising plan for an eco product in Canada.")
print(result)
# → [{'label': 'has context', 'score': 0.97}]
```
|
| 14 |
-
|
| 15 |
-
This model should be deployed at the start of any user-to-AI interaction system. It works alongside:
- OpenAI’s Moderation API (for abuse/harm filtering)
- LLM2 (like GPT-3.5 or Mistral) which executes generation if context is valid
- Prompt optimizers, feedback systems, or analytics dashboards
|
| 16 |
-
|
| 17 |
-
MIT License — freely reusable for research, commercial, or operational deployment.
Developed and owned by VerifiedPrompts.
|
| 18 |
-
|
| 19 |
-
loss: 0.0
|
| 20 |
-
|
| 21 |
-
f1_macro: 1.0
|
| 22 |
-
|
| 23 |
-
f1_micro: 1.0
|
| 24 |
-
|
| 25 |
-
f1_weighted: 1.0
|
| 26 |
-
|
| 27 |
-
precision_macro: 1.0
|
| 28 |
-
|
| 29 |
-
precision_micro: 1.0
|
| 30 |
-
|
| 31 |
-
precision_weighted: 1.0
|
| 32 |
-
|
| 33 |
-
recall_macro: 1.0
|
| 34 |
-
|
| 35 |
-
recall_micro: 1.0
|
| 36 |
-
|
| 37 |
-
recall_weighted: 1.0
|
| 38 |
-
|
| 39 |
-
accuracy: 1.0
|
|
|
|
| 1 |
+
📘 Model Card: CNTXT-Filter-Prompt-Opt
|
| 2 |
+
🔍 Model Overview
|
| 3 |
+
CNTXT-Filter-Prompt-Opt is a lightweight, high-accuracy text classification model designed to evaluate the contextual completeness of prompts submitted to large language models (LLMs). It serves as the first gatekeeper in a multi-stage moderation and optimization pipeline. Built on `distilbert-base-uncased`, it classifies prompts into three context categories, allowing or blocking them before LLM2 generation is triggered.
|
| 4 |
+
🎯 Intended Use
|
| 5 |
+
This model is used as a real-time filter in AI-powered systems to:
- Block unclear or vague prompts
- Identify missing key information (e.g., platform, audience, budget)
- Allow only context-rich prompts to pass to downstream models (LLM2)
|
| 6 |
+
🔢 Labels & Meanings
|
| 7 |
+
The model is trained to classify prompts into the following classes:
- `has context` — prompt is clear, actionable, and well-defined
- `missing platform, audience, budget, goal` — prompt lacks structural clarity
- `Intent is unclear, Please input more context` — prompt is vague or spam-like
|
| 8 |
+
📊 Training Details
|
| 9 |
+
Trained on a curated dataset of 200,000 prompts using Hugging Face AutoTrain with LoRA disabled. Class balance and curriculum learning were applied: fully positive prompts first, followed by negative and vague examples.
Key parameters:
- Model: distilbert-base-uncased
- Max sequence length: 128
- Batch size: 8
- Epochs: 3
- Optimizer: AdamW
- Learning rate: 5e-5
- Mixed precision: FP16
- Accuracy: 100% (training + validation)
|
| 10 |
+
✅ Evaluation Metrics
|
| 11 |
+
The model achieved perfect scores on the evaluation set:
- Accuracy: 1.0
- F1 Score (macro/micro/weighted): 1.0
- Precision & Recall: 1.0
This reflects perfect generalization within the prompt context classification task.
|
| 12 |
+
⚙️ How to Use
|
| 13 |
+
Using the `transformers` library:
```python
from transformers import pipeline
classifier = pipeline("text-classification", model="VerifiedPrompts/CNTXT-Filter-Prompt-Opt")
result = classifier("Write an advertising plan for an eco product in Canada.")
print(result)
# → [{'label': 'has context', 'score': 0.97}]
```
|
| 14 |
+
🧱 Role in AI Pipeline
|
| 15 |
+
This model should be deployed at the start of any user-to-AI interaction system. It works alongside:
- OpenAI’s Moderation API (for abuse/harm filtering)
- LLM2 (like GPT-3.5 or Mistral) which executes generation if context is valid
- Prompt optimizers, feedback systems, or analytics dashboards
|
| 16 |
+
⚖️ License & Ownership
|
| 17 |
+
MIT License — freely reusable for research, commercial, or operational deployment.
Developed and owned by VerifiedPrompts.
|
| 18 |
+
🗓️ Last updated: May 27, 2025
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|