Skip to content

Commit

Permalink
added some content to overview and how-to
Browse files Browse the repository at this point in the history
  • Loading branch information
lmilan committed Sep 2, 2024
1 parent ec004bf commit 8704d78
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/_hub/kong-inc/ai-semantic-prompt-guard/_changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

### {{site.base_gateway}} 3.8.0.0

* Introduced the new **AI-Semantic-Guard** plugin.
* Introduced the new **AI Semantic Prompt Guard** plugin.
17 changes: 17 additions & 0 deletions app/_hub/kong-inc/ai-semantic-prompt-guard/how-to/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
nav_title: Using the AI Semantic Prompt Guard plugin
title: Using the AI Semantic Prompt Guard plugin
---

The AI Semantic Prompt Guard configuration takes two arrays of objects: one for `allow` prompts, and
one for `deny` prompts.

## Prerequisites

First, as in the [AI Proxy](/hub/kong-inc/ai-proxy/) documentation, create a service, route, and `ai-proxy` plugin
that will serve as your LLM access point.

You can now create the AI Semantic Prompt Guard plugin at the global, service, or route level, using the following examples.

## Examples

25 changes: 24 additions & 1 deletion app/_hub/kong-inc/ai-semantic-prompt-guard/overview/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,27 @@
nav_title: Overview
---

The Semantic Guard Plugin
The AI Semantic Prompt Guard plugin is an enhancement of the AI Prompt Guard plugin; it lets you to allow or block prompts based on a list of similar prompts, to guard against misuse of `llm/v1/chat` or `llm/v1/completions` requests.

It does this by scanning all chat messages for the specific expressions set.

You can use a combination of `allow` and `deny` rules to preserve integrity and compliance when serving an LLM service using {{site.base_gateway}}.

{:.note}
> This plugin extends the functionality of the [AI Proxy plugin](/hub/kong-inc/ai-proxy/), and requires AI Proxy to be configured first.
Check out the [AI Gateway quickstart](/gateway/latest/get-started/ai-gateway/) to get an AI proxy up and running within minutes!

## How it works



## Get started with the AI Prompt Guard plugin

* [AI Gateway quickstart: Set up AI Proxy](/gateway/latest/get-started/ai-gateway/)
* [Configuration reference](/hub/kong-inc/ai-semantic-prompt-guard/configuration/)
* [Basic configuration example](/hub/kong-inc/ai-semantic-prompt-guard/how-to/basic-example/)
* [Learn how to use the plugin](/hub/kong-inc/ai-semantic-prompt-guard/how-to/)

### All AI Gateway plugins

{% include_cached /md/ai-plugins-links.md release=page.release %}

0 comments on commit 8704d78

Please sign in to comment.