> For the complete documentation index, see [llms.txt](https://vigil.deadbits.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vigil.deadbits.ai/overview/use-vigil/scanners/prompt-response-similarity.md).

# 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. &#x20;

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*

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