Skip to content

Normalize PromptIntel string filters before requests#1496

Open
biefan wants to merge 1 commit intoAzure:mainfrom
biefan:normalize-promptintel-string-filters
Open

Normalize PromptIntel string filters before requests#1496
biefan wants to merge 1 commit intoAzure:mainfrom
biefan:normalize-promptintel-string-filters

Conversation

@biefan
Copy link
Contributor

@biefan biefan commented Mar 17, 2026

Summary

  • normalize validated severity and categories string filters during PromptIntel dataset initialization
  • add regression coverage for string-based severity and category filters

Problem

_PromptIntelDataset validates string filter values such as severity="critical" and categories=["manipulation"], but it stores those values unchanged. _fetch_all_prompts() later assumes both fields are enums and accesses .value, which raises AttributeError before the request is sent.

This makes documented, validated string inputs fail at runtime instead of producing the expected API request.

Testing

  • .venv/bin/pytest tests/unit/datasets/test_promptintel_dataset.py -q

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant