๐Ÿ“‘Prompt-response Similarity

This module is designed to scan a prompt and that prompts response from an LLM to determine how semantically similar they are. Embeddings are generated for the prompt and response then the cosine similarity is returned.

This scanner must be enabled in the output_scanners section of the conf/server.conf configuration file, and it uses a different method of calling than the normal input scanners.

API endpoint POST /analyze/response

{
    "prompt": str,
    "response": str
}

Last updated