garak
garak copied to clipboard
fix: encoding probes storing translated text in `pre_translation_prompt`
What This Change Does
This small change fixes #1461.
Problem: Encoding probes were incorrectly storing translated text in the pre_translation_prompt field while marking it with the source language tag in reports.
Fix: Removed early translation from EncodingMixin.__init__() to ensure prompts remain untranslated until the translation flow in Probe.probe().
Verification
- [x] Ran encoding probe tests:
python -m pytest tests/probes/test_probes_encoding.py(84 passed, 1 skipped in 1.92s) - [x] Verified that
pre_translation_promptin reports contains English text tagged as "en"