guardian

The LLM guardian kernel

https://github.com/amk9978/guardian

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.0%) to scientific vocabulary

Keywords

chatgpt go golang guardian guardrail jailbreak kernel llm micro-kernel microservices prompt prompt-engineering prompt-injection prompt-security
Last synced: 4 months ago · JSON representation ·

Repository

The LLM guardian kernel

Basic Info
  • Host: GitHub
  • Owner: amk9978
  • Language: Go
  • Default Branch: master
  • Homepage:
  • Size: 295 KB
Statistics
  • Stars: 5
  • Watchers: 0
  • Forks: 1
  • Open Issues: 0
  • Releases: 1
Topics
chatgpt go golang guardian guardrail jailbreak kernel llm micro-kernel microservices prompt prompt-engineering prompt-injection prompt-security
Created about 1 year ago · Last pushed 11 months ago
Metadata Files
Readme Citation

README.md

DOI Go CI

LLM Guardian Kernel

A plug-and-play end-to-end LLM guardian for seamless integration. The kernel is in charge of fanning out requests to the connected security plugins based on user and collecting their responses to judge whether a prompt is malicious or benign. You can also use the kernel as a rate limiter, authentication unit, or quota management. It is the heart of the LLM Guardian System.

Features & Qualities

  • Written in Golang to be super-fast and production-ready
  • Microkernel architecture: Open to extension
  • Rate limiter
  • Supports both HTTP/1.1 and gRPC plugins with reusable gPRC clients
  • Define tasks and apply them to users/groups
  • SOLID obedient and Database agnostic (MongoDB by default)
  • Test covered, CI, linter
  • Uses Google Wire for compile-time dependency injection

Comparison with OpenShield

Test

As you can see, the Guardian Kernel beats the OpenShield under the same conditions without external calls for 60-second load tests. Unlike OpenShield, the Guardian by default relies on MongoDB (NoSQL) with denormalized data for faster retrieval. If the external plugin calls get added, the difference can become even more significant as the Guardian Kernel supports gRPC calls with reusable clients.

Get Started

Docker: git clone git@github.com:amk9978/Guardian.git docker-compose up --build -d

Architecture

The guardian system uses a micro-kernel architecture designed with the idea of extension in mind:

Architecture

Citation

If you use this application, please cite it using the "Cite this repository" above.

Contribution

I am always welcome to your contributions. Open an issue and/or open a PR accordingly. This system is designed and the central unit is developed by Amir Karimi (@amk9978).

Owner

  • Name: Amir Karimi
  • Login: AMK9978
  • Kind: user
  • Location: Iran
  • Company: @divar-ir

Software engineer, Open source lover, Startup enthusiastic!

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Karimi"
  given-names: "Amir Mohammad"
  orcid: "https://orcid.org/0009-0005-0024-1212"
title: "LLM Guardian"
version: 1.0.0
doi: 10.5281/zenodo.14211992
date-released: 2024-11-24
url: "https://github.com/amk9978/Guardian"

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2