{"id":{"repo_id":"eastern-wash","oai_identifier":"oai:dc.ewu.edu:theses-2042"},"canonical_url":"https://search.ndltd.org/etd/eastern-wash/oai:dc.ewu.edu:theses-2042","repository":{"repo_id":"eastern-wash","name":"Eastern Washington University","base_url":"https://dc.ewu.edu/do/oai/"},"display":{"title":"Mitigating Prompt Injections in LLM Applications: A Detection and Filtering Framework","abstract":"As Large Language Models (LLMs) become increasingly popular and are integrated into autonomous agent systems, this has led to a rise in new security threats. These security risks exploit natural-language interfaces to override system controls, manipulate tool usage, bypass security policy, or provide unauthorized information. As we become more dependent on LLM-driven applications, these vulnerabilities become greater as models gain access to external tools, Application Programming Interfaces (APIs), and workflow automation. This research investigates these vulnerabilities by examining current defense strategies and developing a modular filtering system that identifies a wider range of prompt-injection patterns that traditional rule-based systems may miss. This was accomplished by designing a multi-layer detection architecture consisting of four components: banned-word matching, regex pattern detection, an LLM-based contextual system, and Prompt Guard - a model specifically tailored for identifying prompt injections. Testing on 700 maliciously crafted prompts achieved 97-100\\% detection rates, with performance varying across multiple artificial intelligence models, including Grok, Gemini, DeepSeek, Claude, Llama, and Cogito, via different API providers such as OpenRouter and TogetherAI. Evidence suggests that although rule-based detectors are highly effective at identifying known patterns, machine learning and LLM components provide the ability to analyze a prompt in context, resulting in a higher detection rate. The current implementation focuses on a single conversational agent with the plan to expand the filtering system to different deployment contexts. Future work will focus on creating an agent-specific filter configuration for each agent, taking into consideration the different risk profiles and interaction behaviors.","abstract_html":"As Large Language Models (LLMs) become increasingly popular and are integrated into autonomous agent systems, this has led to a rise in new security threats. These security risks exploit natural-language interfaces to override system controls, manipulate tool usage, bypass security policy, or provide unauthorized information. As we become more dependent on LLM-driven applications, these vulnerabilities become greater as models gain access to external tools, Application Programming Interfaces (APIs), and workflow automation. This research investigates these vulnerabilities by examining current defense strategies and developing a modular filtering system that identifies a wider range of prompt-injection patterns that traditional rule-based systems may miss. This was accomplished by designing a multi-layer detection architecture consisting of four components: banned-word matching, regex pattern detection, an LLM-based contextual system, and Prompt Guard - a model specifically tailored for identifying prompt injections. Testing on 700 maliciously crafted prompts achieved 97-100\\% detection rates, with performance varying across multiple artificial intelligence models, including Grok, Gemini, DeepSeek, Claude, Llama, and Cogito, via different API providers such as OpenRouter and TogetherAI. Evidence suggests that although rule-based detectors are highly effective at identifying known patterns, machine learning and LLM components provide the ability to analyze a prompt in context, resulting in a higher detection rate. The current implementation focuses on a single conversational agent with the plan to expand the filtering system to different deployment contexts. Future work will focus on creating an agent-specific filter configuration for each agent, taking into consideration the different risk profiles and interaction behaviors.","abstract_has_math":false,"creators":["Stewart, Mikayla"],"institution":null,"degree_name":"Master of Science (MS) in Computer Science","degree_level":"Thesis: EWU Only","degree_discipline":"Computer Science and Electrical Engineering","degree_department":null,"school":null,"contributors":["Sanmeet Kaur","Chris Cain","Lynnae Daniels"],"advisors":[],"committee_chairs":[],"committee_members":[],"year":null,"date_issued":"","date_published":null,"updated_at":"2026-11-27T02:58:36Z","subjects":["prompt injection","LLM security","multi-layer detection","input filtering","guardrails"],"languages":[],"rights":["Access restricted for 2 years to EWU users with an active EWU NetID"],"rights_urls":["https://creativecommons.org/licenses/by-nc-nd/4.0/"],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"https://dc.ewu.edu/theses/1035","outbound_label":"Repository record","outbound_source":"dc:identifier","record_url":"https://dc.ewu.edu/theses/1035","record_label":"Repository record","record_kind":"record","record_source":"dc:identifier","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Aeastern-wash%3Aoai%3Adc.ewu.edu%3Atheses-2042","prefix":"oai_dc"},"source_record":{"url":"https://dc.ewu.edu/do/oai/?verb=GetRecord&metadataPrefix=oai_etdms&identifier=oai%3Adc.ewu.edu%3Atheses-2042","prefix":"oai_etdms"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor","label":"Contributor","values":["Sanmeet Kaur","Chris Cain","Lynnae Daniels"]},{"key":"dc:creator","label":"Author","values":["Stewart, Mikayla"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.available","label":"Dc Date Available","values":["2028-10-07T07:00:00Z"]},{"key":"dc:date.created","label":"Dc Date Created","values":["2026-01-01T08:00:00Z"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Computer Science and Electrical Engineering"]},{"key":"thesis:degree_level","label":"Degree Level","values":["Thesis: EWU Only"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Science (MS) in Computer Science"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["prompt injection","LLM security","multi-layer detection","input filtering","guardrails"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:rights","label":"Dc Rights","values":["Access restricted for 2 years to EWU users with an active EWU NetID"]},{"key":"dc:rights.license","label":"Dc Rights License","values":["https://creativecommons.org/licenses/by-nc-nd/4.0/"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["https://dc.ewu.edu/theses/1035"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["As Large Language Models (LLMs) become increasingly popular and are integrated into autonomous agent systems, this has led to a rise in new security threats. These security risks exploit natural-language interfaces to override system controls, manipulate tool usage, bypass security policy, or provide unauthorized information. As we become more dependent on LLM-driven applications, these vulnerabilities become greater as models gain access to external tools, Application Programming Interfaces (APIs), and workflow automation. This research investigates these vulnerabilities by examining current defense strategies and developing a modular filtering system that identifies a wider range of prompt-injection patterns that traditional rule-based systems may miss. This was accomplished by designing a multi-layer detection architecture consisting of four components: banned-word matching, regex pattern detection, an LLM-based contextual system, and Prompt Guard - a model specifically tailored for identifying prompt injections. Testing on 700 maliciously crafted prompts achieved 97-100\\% detection rates, with performance varying across multiple artificial intelligence models, including Grok, Gemini, DeepSeek, Claude, Llama, and Cogito, via different API providers such as OpenRouter and TogetherAI. Evidence suggests that although rule-based detectors are highly effective at identifying known patterns, machine learning and LLM components provide the ability to analyze a prompt in context, resulting in a higher detection rate. The current implementation focuses on a single conversational agent with the plan to expand the filtering system to different deployment contexts. Future work will focus on creating an agent-specific filter configuration for each agent, taking into consideration the different risk profiles and interaction behaviors."]},{"key":"dc:title","label":"Title","values":["Mitigating Prompt Injections in LLM Applications: A Detection and Filtering Framework"]}]}],"canonical_facts":{"dc:contributor":["Sanmeet Kaur","Chris Cain","Lynnae Daniels"],"dc:creator":["Stewart, Mikayla"],"dc:date.available":["2028-10-07T07:00:00Z"],"dc:date.created":["2026-01-01T08:00:00Z"],"dc:description.abstract":["As Large Language Models (LLMs) become increasingly popular and are integrated into autonomous agent systems, this has led to a rise in new security threats. These security risks exploit natural-language interfaces to override system controls, manipulate tool usage, bypass security policy, or provide unauthorized information. As we become more dependent on LLM-driven applications, these vulnerabilities become greater as models gain access to external tools, Application Programming Interfaces (APIs), and workflow automation. This research investigates these vulnerabilities by examining current defense strategies and developing a modular filtering system that identifies a wider range of prompt-injection patterns that traditional rule-based systems may miss. This was accomplished by designing a multi-layer detection architecture consisting of four components: banned-word matching, regex pattern detection, an LLM-based contextual system, and Prompt Guard - a model specifically tailored for identifying prompt injections. Testing on 700 maliciously crafted prompts achieved 97-100\\% detection rates, with performance varying across multiple artificial intelligence models, including Grok, Gemini, DeepSeek, Claude, Llama, and Cogito, via different API providers such as OpenRouter and TogetherAI. Evidence suggests that although rule-based detectors are highly effective at identifying known patterns, machine learning and LLM components provide the ability to analyze a prompt in context, resulting in a higher detection rate. The current implementation focuses on a single conversational agent with the plan to expand the filtering system to different deployment contexts. Future work will focus on creating an agent-specific filter configuration for each agent, taking into consideration the different risk profiles and interaction behaviors."],"dc:identifier":["https://dc.ewu.edu/theses/1035"],"dc:rights":["Access restricted for 2 years to EWU users with an active EWU NetID"],"dc:rights.license":["https://creativecommons.org/licenses/by-nc-nd/4.0/"],"dc:subject":["prompt injection","LLM security","multi-layer detection","input filtering","guardrails"],"dc:title":["Mitigating Prompt Injections in LLM Applications: A Detection and Filtering Framework"],"thesis:degree_discipline":["Computer Science and Electrical Engineering"],"thesis:degree_level":["Thesis: EWU Only"],"thesis:degree_name":["Master of Science (MS) in Computer Science"]},"updated_at":"2026-11-27T02:58:36Z"}