Analysis and Testing of Malicious Content Filters in the Large Language Models

Thesis title: Analýza a testování filtrů škodlivého obsahu ve velkých jazykových modelech
Author: Hranická, Natálie
Thesis type: Diplomová práce
Supervisor: Chudán, David
Opponents: Kliegr, Tomáš
Thesis language: Česky
Abstract:
Tato diplomová práce se zabývá analýzou a testováním bezpečnostních mechanismů velkých jazykových modelů (LLMs) se zaměřením na jejich schopnost filtrovat škodlivý obsah a odolávat jailbreakovým útokům. V teoretické části jsou popsány principy fungování LLMs, metody bezpečnostního tréninku (alignment), architektura guardrails a taxonomie jailbreakových technik. Experimentální část testuje osm modelů (čtyři komerční: GPT-5.2, Claude Sonnet 4.5, Gemini 3, DeepSeek-V3 ; čtyři open-source: LLaMA-4-Scout-17B-16E-Instruct, Gemma-3-27b-it, Mixtral-8x7B-Instruct-v0.1, Qwen3.5-397B-A17B) na sadě 70 unikátních promptů v českém jazyce. Práce definuje sadu hodnotících metrik: míru odmítnutí a úspěšnost jailbreaku vycházející z literatury, dále index bezpečné transformace a konzistenci odpovědí jako vlastní doplňkové metriky, a zejména míru tématické relevance založenou na embeddingové podobnosti, která představuje hlavní metodologický přínos práce. Výsledky ukazují, že všechny modely jsou výrazně zranitelnější vůči kontextově manipulovaným jailbreakovým útokům než vůči přímým rizikovým dotazům. Vícekrokový chaining se ukázal jako nejúčinnější útočný vektor. Mezi komerčními modely vykazují nejvyšší odolnost GPT a Claude, zatímco Gemini je překvapivě zranitelný. Mezi open-source modely dominuje Qwen, jehož bezpečnostní profil je srovnatelný s komerční špičkou, zatímco Mixtral je extrémně propustný. Statistické testy (McNemar, binomický, Mann-Whitney, korelace) potvrdily robustnost klíčových zjištění. Práce přináší originální data z českého prostředí a metodologický přínos v podobě výše uvedených metrik.
Keywords: jailbreak; Qwen; Gemma; Gemini; GPT; filtrace škodlivého obsahu; generativní umělá inteligence; velké jazykové modely; moderace obsahu; bezpečnostní mechanismy; detekce toxicity; Mixtral; LLaMA; DeepSeek; Claude
Thesis title: Analysis and Testing of Malicious Content Filters in the Large Language Models
Author: Hranická, Natálie
Thesis type: Diploma thesis
Supervisor: Chudán, David
Opponents: Kliegr, Tomáš
Thesis language: Česky
Abstract:
This thesis analyzes and tests the safety mechanisms of large language models (LLMs), focusing on their ability to filter harmful content and resist jailbreak attacks. The theoretical part describes the principles of LLMs functioning, safety training methods (alignment), guardrails architecture, and the taxonomy of jailbreak techniques. The experimental part tests eight models (four commercial: GPT-5.2, Claude Sonnet 4.5, Gemini 3, DeepSeek-V3 ; four open-source: LLaMA-4-Scout-17B-16E-Instruct, Gemma-3-27b-it, Mixtral-8x7B-Instruct-v0.1, Qwen3.5-397B-A17B) on a set of 70 unique prompts in the Czech language. he thesis employs standard metrics Refusal Rate and Jailbreak Success Rate and introduces original metrics: Safe Transformation Index, Refusal Consistency and Semantic Relevance Score based on embedding similarity, which represents the main methodological contribution of the work. The results show that all models are significantly more vulnerable to context-manipulated jailbreak attacks than to direct risky queries. Multi-step chaining proved to be the most effective attack vector. Among commercial models, GPT and Claude exhibit the highest resilience, while Gemini is surprisingly vulnerable. Among open-source models, Qwen dominates with a safety profile comparable to the commercial top tier, whereas Mixtral is extremely permissive. Statistical tests (McNemar, binomial, Mann-Whitney, correlation) confirm the robustness of the key findings. The thesis provides original data from the Czech language environment and a methodological contribution in the form of the above metric.
Keywords: large language models; generative artificial intelligence; LLaMA; Gemma; DeepSeek; Gemini; content moderation; harmful content filtering; safety mechanisms; toxicity detection; Qwen; GPT; Claude; Mixtral; jailbreak

Information about study

Study programme: Znalostní a webové technologie
Type of study programme: Magisterský studijní program
Assigned degree: Ing.
Institutions assigning academic degree: Vysoká škola ekonomická v Praze
Faculty: Faculty of Informatics and Statistics
Department: Department of Information and Knowledge Engineering

Information on submission and defense

Date of assignment: 8. 10. 2025
Date of submission: 3. 5. 2026
Date of defense: 8. 6. 2026
Identifier in the InSIS system: https://insis.vse.cz/zp/93890/podrobnosti

Files for download

    Last update: