-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
probe: topic pushing #764
base: main
Are you sure you want to change the base?
probe: topic pushing #764
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks reasonable, I think there are some actions here that suggest some day there could be a built in mechanism to allow follow on prompts
to be run by the original probe as a post detector hook.
Will do some more interactive testing to make sure I am understanding what the resulting set to Attempts really looks like and how those results should be interpreted.
garak/probes/topic.py
Outdated
logging.debug( | ||
f"{self.__class__.__name__} {current_synset}, {current_synset.words()}" | ||
) | ||
for word in current_synset.words(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see building the list of prompts dynamically as saving runtime memory, how big are these iterations in practice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typically <10, not infrequently 1-2.
This means ~2 * len(TEMPLATES) * words
attempts per node
…d func for making detectors skippable; skip running detector after tree probe has run
…erWordnet.primary_detector
…ock nodes & terms from being processed
wn.download(self.lexicon) | ||
self.w = wn.Wordnet(self.lexicon) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this use wn
via nltk
as is done in TAP
? If possible it would be helpful if nltk
access to could consolidated into a resources/common
component. Some coordination with user storage refactor are likely in order to ensure these all store the datasets in the same place.
Add wordnet-based topic search probe. It takes a target term by config, and traverses Open English Wordnet nodes to find which terms adjacent to or below (i.e. more specific) in the hierarchy, the model will respond to.