Please use this identifier to cite or link to this item: http://kmutnb-ir.kmutnb.ac.th/jspui/handle/123456789/580
Full metadata record
DC FieldValueLanguage
dc.contributorJATTUPLUEK USAKIJen
dc.contributorจัตุพฤทธิ์ อุสส่าห์กิจth
dc.contributor.advisorPONGSARUN BOONYOPAKORNen
dc.contributor.advisorพงศ์ศรัณย์ บุญโญปกรณ์th
dc.contributor.otherKing Mongkut's University of Technology North Bangkoken
dc.contributor.otherมหาวิทยาลัยเทคโนโลยีพระจอมเกล้าพระนครเหนือth
dc.date.accessioned2026-11-17T08:24:12Z-
dc.date.available2026-11-17T08:24:12Z-
dc.date.created2026-
dc.date.issued2026-11-17-
dc.identifier.urihttp://kmutnb-ir.kmutnb.ac.th/jspui/handle/123456789/580-
dc.description.abstractPrompt injection is the top-ranked risk for LLM applications. This study develops GuardRail, a policy-driven Go middleware whose rules, weights and thresholds can be changed without modifying code, and evaluates its detection performance, latency and policy flexibility. GuardRail exposes a REST API built with Gin and runs four detection layers: obfuscation decoding, Trie-based keyword matching, regular expressions and heuristics. Layer scores are combined by weighted voting under a JSON policy to allow, flag or block a prompt. On a 368-sample core test set, GuardRail achieved an accuracy of 0.68, precision of 0.81, recall of 0.51 and F1-score of 0.62, below the targets. On a 1,000-sample combined set its precision was 0.93 with a false positive rate of 0.03. P99 latency was 46.10 ms, within the 100 ms target, and database policy changes took effect without a restart. The middleware suits a low-latency first line of defense complemented by semantic detection.en
dc.description.abstractการโจมตีแบบ Prompt Injection เป็นความเสี่ยงอันดับหนึ่งของแอปพลิเคชันที่ใช้แบบจำลองภาษาขนาดใหญ่ การค้นคว้าอิสระนี้พัฒนามิดเดิลแวร์เชิงนโยบายด้วยภาษาโก ชื่อ GuardRail ที่กำหนดกฎ ค่าน้ำหนัก และค่าเกณฑ์ได้โดยไม่ต้องแก้ไขโค้ด และประเมินด้านการตรวจจับ ความหน่วง และความยืดหยุ่นของนโยบาย ระบบให้บริการผ่าน REST API ด้วย Gin มีกระบวนการตรวจจับ 4 ชั้น ได้แก่ การถอดรหัสข้อความอำพราง การจับคู่คำสำคัญด้วย Trie การจับคู่ Regular Expression และฮิวริสติก แล้วรวมคะแนนแบบถ่วงน้ำหนักตามนโยบาย JSON เพื่อตัดสินผล allow, flag หรือ block ผลการทดลองบนชุดทดสอบหลัก 368 ตัวอย่าง ได้ค่า Accuracy 0.68, Precision 0.81, Recall 0.51 และ F1-Score 0.62 ยังไม่ถึงเป้าหมาย บนชุดรวม 1,000 ตัวอย่างได้ Precision 0.93 และอัตราแจ้งเตือนผิดพลาด 0.03 ความหน่วง P99 เท่ากับ 46.10 มิลลิวินาที ผ่านเป้าหมาย และการแก้นโยบายในฐานข้อมูลมีผลโดยไม่ต้องเริ่มระบบใหม่ ระบบจึงเหมาะเป็นชั้นป้องกันแรกที่มีความหน่วงต่ำ และควรเสริมด้วยการวิเคราะห์เชิงความหมายth
dc.language.isoTHA-
dc.publisherKing Mongkut's University of Technology North Bangkok-
dc.rightsKing Mongkut's University of Technology North Bangkok-
dc.subjectPrompt Injectionen
dc.subject Policy-Driven Middlewareen
dc.subject Goen
dc.subject LLM Securityen
dc.subjectPrompt Injectionth
dc.subject มิดเดิลแวร์เชิงนโยบายth
dc.subject ภาษาโกth
dc.subject การตรวจจับเชิงกฎth
dc.subject.classificationComputer Science:Computer Science Applicationsen
dc.titleDevelopment of a Policy-Driven Go-Based Middleware for Prompt Injection Mitigation in Large Language Model Systemsen
dc.titleการพัฒนามิดเดิลแวร์เชิงนโยบายด้วยภาษาโก สำหรับการบรรเทาการโจมตีแบบ Prompt Injection ในระบบแบบจำลองภาษาขนาดใหญ่th
dc.typeIndependent Studyen
dc.typeการค้นคว้าอิสระth
dc.contributor.emailadvisorpongsarunb@kmutnb.ac.th-
dc.description.degreenameMaster of Science (M.Sc.)en
dc.description.degreenameวิทยาศาสตรมหาบัณฑิต (วท.ม.)th
dc.description.degreelevelMaster of Scienceen
dc.description.degreelevelวิทยาศาสตรมหาบัณฑิตth
dc.description.degreedisciplineDigital Network and Information Security Managementen
dc.description.degreedisciplineการบริหารเครือข่ายดิจิทัลและความมั่นคงปลอดภัยสารสนเทศth
Appears in Collections:FACULTY OF INFORMATION TECHNOLOGY AND DIGITAL INNOVATION

Files in This Item:
File SizeFormat 
s6707031857263.pdf1.88 MBAdobe PDFView/Open


Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.