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

[FEAT] Add Scoring to PromptSendingOrchestrator #262

Merged

Conversation

nina-msft
Copy link
Contributor

@nina-msft nina-msft commented Jun 27, 2024

Description

This change adds scoring to the PromptSendingOrchestrator to allow users the option to provide scorers to score the prompts they are sending at the same time. Scores are stored in the database with reference to the PromptMemoryEntry by prompt_request_response_id.

Changes variables for Scorer classes to all be self._score_category or self._score_categories for consistency.

Tests and Documentation

Two new unit tests added to check functionality of get_score_memory() function and the addition of scoring to the orchestrator.

Jupytext was run for the addition to the existing demo for send all prompts.

Copy link
Contributor

@romanlutz romanlutz left a comment

Choose a reason for hiding this comment

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

Very cool!

pyrit/orchestrator/prompt_sending_orchestrator.py Outdated Show resolved Hide resolved
tests/mocks.py Outdated Show resolved Hide resolved
pyrit/score/self_ask_meta_scorer.py Outdated Show resolved Hide resolved
pyrit/score/human_in_the_loop_scorer.py Outdated Show resolved Hide resolved
pyrit/memory/memory_interface.py Outdated Show resolved Hide resolved
pyrit/memory/memory_interface.py Outdated Show resolved Hide resolved
pyrit/memory/memory_interface.py Show resolved Hide resolved
pyrit/orchestrator/prompt_sending_orchestrator.py Outdated Show resolved Hide resolved
pyrit/orchestrator/prompt_sending_orchestrator.py Outdated Show resolved Hide resolved
tests/orchestrator/test_prompt_orchestrator.py Outdated Show resolved Hide resolved
tests/orchestrator/test_prompt_orchestrator.py Outdated Show resolved Hide resolved
@nina-msft nina-msft merged commit e57699f into Azure:main Jul 8, 2024
4 checks passed
@nina-msft nina-msft deleted the users/nina-msft/2694-add-scoring-default branch July 8, 2024 18:54
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.

3 participants