Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Building a Secure LLM Proxy with Fine‑Tuned Gemma 3 for Production Applications

Описание и применение

AEGIS — это легковесный прокси, защищающий LLM‑эндпоинты от утечки PII, атак на ввод и вредоносных файлов, используя проверку MIME, OCR, PII‑сборку, классификатор Gemma 3 и очистку веб‑контекста.

Задача

Freelance developers and small agencies need a low‑cost, lightweight security layer to protect client‑facing LLM endpoints from accidental PII leakage, prompt injection, and malicious payloads in documents or web context.

Результат

AEGIS provides a drop‑in security proxy that sanitizes PII, neutralizes prompt injections, de‑weaponizes uploaded documents, and filters web context, enabling independent developers to offer a compliance layer on modest budgets.

Рабочий процесс

  • Receive untrusted payload (text, PDF, image, web search)
  • Layer 1: Magika deep MIME & polyglot verification
  • Layer 2: Dual‑stream OCR & hidden text extraction
  • Layer 3: Context‑aware Presidio + regex PII scrubber (redacts <EMAIL>, <PHONE>, <API_KEY>)
  • Layer 4: Fine‑tuned Gemma 3 / LoRA safety classifier (detects prompt injections & malicious payloads)
  • Layer 5: Sanitized web retrieval via SerpApi (filters poisoned knowledge)
  • Forward clean, verified context to target LLM
  • Return response to user

Доказательства

AEGIS is a lightweight, drop‑in security proxy that developers can place in front of their LLM endpoints.

Источник

It acts as an intermediary gateway that sanitizes personal data in real time, inspects and OCRs uploaded documents, evaluates prompt safety using an open‑source fine‑tuned Gemma 3 model, and provides sanitized web retrieval through SerpApi.

Источник

The gateway handles inbound requests across multiple input types. Plain text prompts are stripped of credentials and personal identifiers before being evaluated by the safety classifier.

Источник

For file uploads undergo deep MIME verification and visual OCR to detect obscured text before text extraction proceeds.

Источник

  • Дата записи: 2026-10-18T08:41:06.633Z