-
Notifications
You must be signed in to change notification settings - Fork 485
FEAT: CBT-Bench Dataset #888
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
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
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.
Please also look at api.rst (I think that's the name) because it should list this dataset along with the others from the datasets module. There may be some missing there, so if you want you can compare and fill in the gaps. Thank you!
Fetch CBT-Bench examples for a specific configuration and create a SeedPromptDataset. | ||
|
||
Args: | ||
config_name (str): The configuration name to load (default is "core_fine_seed"). |
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 should tell us about the other options and the type should be Literal[...] with the individual options listed.
SeedPrompt( | ||
value=item["situation"], # Use 'situation' as the main prompt text | ||
data_type="text", | ||
name=f"CBT-Bench-{item['id']}", |
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.
Would these overlap between the datasets (based on config value)? If so we need to distinguish
data_type="text", | ||
name=f"CBT-Bench-{item['id']}", | ||
dataset_name="CBT-Bench", | ||
harm_categories=item.get("core_belief_fine_grained", []), |
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.
What are the values for this? I just want to make sure they make sense as harm categories
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.
@romanlutz you can see them here FYI
But they look like this:
[
"I am powerless, weak, vulnerable",
"I am needy",
"I am out of control"
]
I am not certain if they exactly align with our harm categories
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.
These ones certainly don't.
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 would say these broadly fall under psycho-social harms. @jbolor21 was that what you thought when you added the item?
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.
Yes! I was thinking broadly under psycho-social harms!
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.
The labels they have are very specific to CBT and not quite aligned with our categories so just lumping them under psycho-social harms would probably make the most sense!
Co-authored-by: Roman Lutz <[email protected]>
|
||
seed_prompts = [ | ||
SeedPrompt( | ||
value=item["situation"], # Use 'situation' as the main prompt text |
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.
After looking at the dataset, I would say the situation + thoughts together should be the prompt. Let's ask @jbolor21 who suggested adding the dataset to chime in 🙂
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.
Yes I think adding the thoughts is important to the situation since these two are what are extracted from the original text!
@sravan0446 are you still interested in addressing the issues? 🙂 |
CBT-Bench Dataset Integration for PyRIT
This pull request introduces support for the CBT-Bench dataset in PyRIT. The CBT-Bench dataset is a benchmark designed to evaluate the alignment and therapeutic safety of Large Language Models (LLMs) in the context of Cognitive Behavioral Therapy (CBT). By integrating this dataset, PyRIT can analyze psychotherapy-related prompts and identify potential risks, including cognitive distortions, harmful self-beliefs, and other vulnerabilities.
Key Changes
fetch_cbt_bench_dataset
to fetch and process the dataset.situation
,core_belief_fine_grained
) to PyRIT'sSeedPrompt
model.core_fine_seed
) with support for other configurations.Related Issue
Closes: #865
Tagging @romanlutz for review.
Tests and Documentation
References
Citation