JoySafety - JD.com's open-source large-scale security framework
JoySafety is JD.com's open-source large model security framework, providing enterprises with a mature, reliable, and free large model security protection solution. The model is based on various atomic capability modules (such as BERT, FastText, Transformer, etc.)...
What is JoySafety?
JoySafety is JD.com's open-source large-model security framework, providing enterprises with a mature, reliable, and free large-model security protection solution. Based on various atomic capability modules (such as BERT, FastText, Transformer, etc.) and a flexible architecture design, the model supports high concurrency, high scalability, and dynamic policy updates, effectively blocking high-risk content and ensuring the secure and stable operation of AI applications. The model is easy to use, supporting one-click Docker startup and standardized API interfaces for convenient and rapid integration.
JoySafety's main functions
-
Content security testingBy intercepting sensitive content, providing red-line responses, and intelligent correction, we ensure that the output content complies with legal and ethical requirements, providing a safe and reliable AI interaction environment for enterprises and users.
-
Data security protection: Detect and prevent data leaks, identify and protect sensitive information in user input and model output, and ensure that data processing complies with privacy regulations.
-
Prompts for attack and defenseBased on multi-turn dialogue recognition technology, it intelligently analyzes the context, identifies and defends against malicious prompt word attacks, and ensures the security and stability of the AI dialogue system.
-
Strategy orchestration and dynamic updatesIt supports dynamic adjustment of security policies via API, enabling hot-swappable atomic capabilities, flexibly adapting to different business scenarios, and allowing updates to the detection module without service interruption.
-
High scalability and load balancingIt supports clustered deployment and enhances the system's concurrent processing capabilities through horizontal scaling and intelligent load balancing technologies to meet the needs of high-concurrency business.
-
Ease of use and integrationIt enables one-click startup via Docker Compose, provides a standardized API interface, supports multi-language calls, and facilitates rapid integration with existing systems.
JoySafety's technical principles
- Multi-model collaborative detectionIt classifies and detects input content using various pre-trained models (BERT/FastText/Transformer, etc.) to identify potential risks. It combines a sensitive word database and a red-line knowledge base to provide precise interception and proxy answering strategies.
- Asynchronous detection mechanismEmploying an asynchronous output mechanism decouples detection tasks from the main business process, significantly improving response speed and reducing user waiting time. Through multi-turn dialogue context, it intelligently identifies potential prompt word attacks or malicious guidance, ensuring dialogue security.
- Dynamic strategy updateAtomic capability hot-swapping supports dynamic updates of detection modules at runtime without requiring a service restart. A lightweight orchestration engine allows for flexible configuration of detection strategies to adapt to different business needs.
- Intelligent load balancingIt supports horizontal scaling and enhances system concurrency through load balancing technology. A windowed detection strategy strikes a balance between performance and accuracy, optimizing system resource utilization.
JoySafety's project address
- GitHub repository: https://github.com/jd-opensource/JoySafety
Application scenarios of JoySafety
-
AI Shopping GuideTo provide safe and reliable recommendation content for e-commerce platforms, avoid misleading consumers, and ensure that the recommended information complies with laws and ethical standards.
-
Logistics customer serviceIn logistics customer service scenarios, this involves intercepting inappropriate remarks and sensitive information, providing compliant customer support, and improving service quality.
-
Sales AssistantIt helps sales personnel prevent the leakage of sensitive information, protect trade secrets, and avoid legal risks when communicating with customers.
-
Medical consultationFilter out non-compliant content in medical consultations to ensure that the medical advice provided is safe, reliable, and complies with medical regulations and ethical requirements.
-
Merchant WorkbenchProtect merchants' data security on the platform, prevent privacy leaks, and ensure that merchant information complies with privacy regulations.