GuardCorpus

class GuardCorpus(val name: String, val pairs: List<GuardPair>)

A labelled set of prompt pairs a guard can be measured against.

Build one from your own domain. That is the point, and it is the half of the measurement this library cannot do for you. The three corpora shipped here are general English; a guard about dosages, jurisdictions or settlement dates will find nothing in them, which is the right result and is exactly what makes them useful: they are how you show your guard does no harm outside its domain. Whether it does any good inside its domain is a number only your own corpus can produce.

Constructors

Link copied to clipboard
constructor(name: String, pairs: List<GuardPair>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Short name, used in the report.

Link copied to clipboard

Pairs that must never be served from cache. A guard's catches come from here.

Link copied to clipboard

The labelled pairs.

Link copied to clipboard

Pairs that must stay cacheable. A guard's false rejections come from here.

Functions

Link copied to clipboard
open override fun toString(): String