CoolFace
Modelpublic

VerifiedPrompts/CNTXT-Filter-Prompt-Opt

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes12downloads
Model Card

๐Ÿ“˜ Model Card: CNTXT-Filter-Prompt-Opt

๐Ÿ” Model Overview

CNTXT-Filter-Prompt-Opt is a lightweight, high-accuracy text classification model designed to evaluate the contextual completeness of user prompts submitted to LLMs. It acts as a gatekeeper before generation, helping eliminate vague or spam-like input and ensuring only quality prompts proceed to LLM2.

  • โ€”Base model: distilbert-base-uncased
  • โ€”Trained on: 200k labeled prompts
  • โ€”Purpose: Prompt validation, spam filtering, and context enforcement

๐ŸŽฏ Intended Use

This model is intended for:

  • โ€”Pre-processing prompts before LLM2 generation
  • โ€”Blocking unclear or context-poor requests
  • โ€”Structuring user input pipelines in AI apps, bots, and assistants

๐Ÿ”ข Labels

The model classifies prompts into 3 categories:

LabelDescription
has contextPrompt is clear, actionable, and self-contained
missing platform, audience, budget, goalPrompt lacks structural clarity
Intent is unclear, Please input more contextVague or incoherent prompt

๐Ÿ“Š Training Details

  • โ€”Model: distilbert-base-uncased
  • โ€”Training method: Hugging Face AutoTrain
  • โ€”Dataset size: 200,000 prompts (curated, curriculum style)
  • โ€”Epochs: 3
  • โ€”Batch size: 8
  • โ€”Max seq length: 128
  • โ€”Mixed Precision: fp16
  • โ€”LoRA: โŒ Disabled
  • โ€”Optimizer: AdamW

โœ… Evaluation

MetricScore
Accuracy1.0
F1 (macro/micro/weighted)1.0
Precision / Recall1.0
Validation Loss0.0

The model generalizes extremely well on all validation samples.


โš™๏ธ How to Use

python
from transformers import pipeline

classifier = pipeline("text-classification", model="VerifiedPrompts/CNTXT-Filter-Prompt-Opt")
prompt = "Write a business plan for a freelance app in Canada."
result = classifier(prompt)

print(result)
# [{'label': 'has context', 'score': 0.98}]