extract 0 0 0

secai1999/secai-chat-sanitization

published by @secai1999

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
57
Last 30 days
16
Likes
-
Size
535 KB
Created on HF
2026-08-26
Age
1 months ago

Description

SecAI — Chat Input Sanitization (VI/EN)

Dataset song ngữ Việt/Anh để huấn luyện input-sanitization guard cho chatbot An toàn thông tin:

gán nhãn câu người dùng để chặn prompt-injection & off-topic, cho câu bảo mật hợp lệ đi qua, và gắn cờ PII.

Nhãn

Cột

Kiểu

Giá trị

intent

softmax

security | chitchat | offtopic

injection

sigmoid

0/1 (prompt-injection / jailbreak)

pii

sigmoid

0/1 (lộ secret / PII)

injection/pii độc lập với intent.… See the full description on the dataset page: https://huggingface.co/datasets/secai1999/secai-chat-sanitization.

Tags

task_categories:text-classificationlanguage:vilanguage:enlicense:apache-2.0size_categories:1K<n<10Kformat:jsonmodality:tabularmodality:textlibrary:datasetslibrary:pandaslibrary:polarslibrary:mlcroissantregion:ussecurityprompt-injectionguardrailsinput-sanitizationpii-detectionvietnamese

README current version from Hugging Face


license: apache-2.0
language:

  • vi
  • en
    task_categories:
  • text-classification
    tags:
  • security
  • prompt-injection
  • guardrails
  • input-sanitization
  • pii-detection
  • vietnamese
    size_categories:
  • 1K<n<10K
    pretty_name: SecAI Chat Input Sanitization (VI/EN)
    configs:
  • config_name: default
    data_files:
    • split: train
      path: data/train.jsonl
    • split: test
      path: data/test.jsonl

SecAI — Chat Input Sanitization (VI/EN)

Dataset song ngữ Việt/Anh để huấn luyện input-sanitization guard cho chatbot An toàn thông tin:
gán nhãn câu người dùng để chặn prompt-injection & off-topic, cho câu bảo mật hợp lệ đi qua, và gắn cờ PII.

Nhãn

Cột Kiểu Giá trị
intent softmax security | chitchat | offtopic
injection sigmoid 0/1 (prompt-injection / jailbreak)
pii sigmoid 0/1 (lộ secret / PII)

injection/pii độc lập với intent.

Schema

{"text": "...", "intent": "security", "injection": 0, "pii": 0,
 "lang": "vi", "split": "train", "group": "<skeleton-id>"}

Splits

  • train 1005 · test 383 · tổng 1388 (vi 804 / en 584).
  • intent: security 885 · offtopic 386 · chitchat 117 · injection=1: 194 · pii=1: 187.
  • Chia split theo skeleton (group), ~25% giữ riêng cho test; injection stratify theo từng kỹ thuật nên cả 9 kỹ thuật + costume VI/EN đều có mặt ở test → rò rỉ train↔test = 0 (đo generalization, không phải nhớ template).

Độ phủ

security (~40 loại lỗ hổng, tra cứu CVE/CWE, secure-coding borderline, dán code/log dài >200 ký tự) · injection (9 kỹ thuật: direct, roleplay, leak, base64/hex/ROT13, split, indirect, unicode/full-width, multi-turn, tool-leak, đội-lốt-security) · pii (key/JWT/CCCD/SĐT/email, đều tổng hợp) · offtopic + hard-negative (câu chứa từ khoá bảo mật nhưng không phải yêu cầu ATTT) · chitchat · biến thể không dấu/teencode + code-mix Việt–Anh.

Dùng

from datasets import load_dataset
ds = load_dataset("secai1999/secai-chat-sanitization")

Fit head trên embedding câu (thiết kế gốc: DuyTa/sec-embedding, 1024-d), L2-normalize, tinh chỉnh ngưỡng theo nhãn (ưu tiên injection Recall ≥ 0.95). Head tham chiếu là mixed (intent = MLP 1 lớp ẩn cho ranh giới chitchat/offtopic; injection/pii = logistic class-balanced), suy luận numpy-only. build_sanitize_dataset.py sinh lại dataset tất định (seed cố định).

KPI tham chiếu (test, leakage=0; head mixed = intent MLP + injection/pii logistic)

intent acc 0.987 · macro-F1 0.986 · MỌI lớp F1 ≥ 0.98: security 0.990 · chitchat 0.983 · offtopic 0.982 · injection 0.983 (R 1.0) · pii 0.994 (R 1.0). Overfit gap intent acc ~0.013. Xem metrics.json.

Hạn chế

Đoạn SQL/exploit dán inline đôi khi bị gắn cờ injection (ngưỡng đặt thấp để R=1.0). Ngưỡng injection/pii/offtopic cấu hình được lúc chạy để đổi cân bằng precision/recall.

An toàn

Mọi secret/PII là tổng hợp (giả). Mẫu injection là phòng thủ (nhãn dương để phát hiện & chặn), phỏng theo archetype red-team công khai.

README history 2 revisions

Every night we snapshot the README of every dataset in the catalog. When the SHA changes we archive the new version and diff it against the last. This is the evolving thought record of the alignment-data field: what the author decided to say about the corpus, and how that framing shifted over time.

  1. 2026-08-26Add SecAI chat input-sanitization dataset (VI/EN) + card + metricsaab353f3.3 KB
    Loading...
  2. 2026-08-26initial commitd5774f90 B
    Loading...

Used by abliterated models none yet

No abliterated models in our catalog have declared this dataset in their YAML metadata yet. This can mean the dataset is used but not declared, is used outside abliteration workflows, or is new. The link will populate automatically as models are indexed.

Community discussions 1 thread · 1 open · 1 comments

Threads posted by the community on Hugging Face: bug reports, questions about usage, pull requests on the README, license clarifications. Click any thread to expand and read the full conversation inline. Newest first.

  1. 2026-08-27[bot] Conversion to Parquetopen1 💬#1
    Loading...

Related datasets same stage · extract

Read further

Metadata

License
apache-2.0

Repository

Download the dataset

0

Copy any of these snippets into your notebook or terminal. All three fetch directly from Hugging Face using your own credentials.

Recommended: datasets library (Python)
from datasets import load_dataset
ds = load_dataset("secai1999/secai-chat-sanitization")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="secai1999/secai-chat-sanitization", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/secai1999/secai-chat-sanitization
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration