Skip to content
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

Merged
merged 45 commits into from
Aug 16, 2024
Merged

probe: topic pushing #764

merged 45 commits into from
Aug 16, 2024

Conversation

leondz
Copy link
Collaborator

@leondz leondz commented Jun 28, 2024

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.

@leondz leondz added the probes Content & activity of LLM probes label Jun 28, 2024
Copy link
Collaborator

@jmartin-tech jmartin-tech left a 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 Show resolved Hide resolved
garak/probes/topic.py Outdated Show resolved Hide resolved
garak/probes/topic.py Outdated Show resolved Hide resolved
garak/probes/topic.py Outdated Show resolved Hide resolved
garak/probes/topic.py Outdated Show resolved Hide resolved
garak/probes/topic.py Outdated Show resolved Hide resolved
garak/probes/topic.py Outdated Show resolved Hide resolved
garak/probes/topic.py Outdated Show resolved Hide resolved
garak/probes/topic.py Outdated Show resolved Hide resolved
garak/probes/topic.py Show resolved Hide resolved
@leondz leondz marked this pull request as ready for review July 1, 2024 13:42
@leondz leondz requested a review from erickgalinkin July 2, 2024 18:43
garak/probes/topic.py Outdated Show resolved Hide resolved
@leondz leondz merged commit fe39011 into main Aug 16, 2024
7 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 16, 2024
Copy link
Collaborator

@jmartin-tech jmartin-tech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

def __init__(self, config_root=_config):
super().__init__(config_root)

wn.config.data_directory = _config.transient.cache_dir / "wn"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, download path looks great.

This matches the pattern used already for nltk_data, and suggests we could standardize on the resources path that is below that being garak specific resources to mirror the installed package tree and keeping to this pattern where third-party possibly common or shared files placed in the cache will be in a path specific to the providing tool.

@jmartin-tech jmartin-tech deleted the feature/topic_probe branch August 16, 2024 12:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
probes Content & activity of LLM probes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants