Language Same Scanner
(Output scanner)
Last updated
(Output scanner)
Last updated
This scanner evaluates and checks if the prompt and output are in the same language.
It then checks whether both detected languages are the same. If they are not, it indicates a potential language discrepancy.
Language Same Detection: If the text is classified as Language Same, the Language Same score corresponds to the model's confidence in this classification.
Threshold-Based Flagging: Text is flagged as Language Same if the Language Same score exceeds a predefined threshold (default: 0.5).
Language Same Detection Policy for AI Chatbot
Create a new policy as same as shown in LLM Guardrails Policy, for Language Same detection select output scanner Language Same.
Optionally, perform a test to ensure the policy is functioning as intended. Check that Language Same is detected and blocked as specified.