UKGovernmentBEIS / inspect_ai

Inspect: A framework for large language model evaluations
https://inspect.ai-safety-institute.org.uk/
MIT License
565 stars 96 forks source link

HTML tags stripped out in the sample viewer #49

Closed Suhas-13 closed 3 months ago

Suhas-13 commented 3 months ago

I am evaluating a model which is being asked to do chain-of-thought reasoning within a private "scratchpad" which is marked using the <scratchpad> </scratchpad> tags and I noticed that while the tags shows up in the preview of a sample they do not show up when I actually click to view a sample.

I understand this is probably done to prevent XSS vulnerabilities but I think escaping them might be a better solution than stripping them out entirely as I can think of plenty of use-cases where you would want to know that a model produced HTML code (for instance, if you are trying to see if it can produce an XSS vulnerability).

aisi-inspect commented 3 months ago

@dragonstyle does our new escaping treatment actually show the tags? (I believe it does, just want to make sure)

@Suhas-13 If I am correct, our current main has this fixed (we'll hopefully be releasing this to PyPI this weekend). In the meantime you can install from GH with:

pip install git+https://github.com/UKGovernmentBEIS/inspect_ai.git
aisi-inspect commented 3 months ago

This should be resolved with our 0.3.15 release (available on PyPI now).