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

chore(redteam): enhance metadata tracking for iterative provider #2482

Merged
merged 4 commits into from
Dec 21, 2024

Conversation

mldangelo
Copy link
Member

Summary of Changes

This update enhances the metadata tracking for the iterative provider in the Redteam module.

Key Modifications

  • Introduced previousOutputs array to store prompt, output, score, and topic relevance for each iteration.
  • Added finalIteration to track the last iteration executed.
  • Updated the metadata object to include finalIteration, highestScore, previousOutputs, and redteamFinalPrompt.

Implementation Details

  • The previousOutputs array is populated during each iteration with the current iteration's data.
  • The finalIteration variable is set when a high-score condition is met, indicating the iteration at which the loop terminated.
  • Metadata returned now includes detailed information about the iteration process for better traceability and debugging.

Testing Considerations

  • Ensure the updated metadata structure is correctly populated and returned.
  • Validate that the previousOutputs array accurately reflects all iterations.
  • Confirm the finalIteration value corresponds to the correct iteration.

Breaking Changes

  • None expected, as the changes are additive to the metadata structure.

@mldangelo mldangelo merged commit 12af9b2 into main Dec 21, 2024
24 checks passed
@mldangelo mldangelo deleted the iterative-meta branch December 21, 2024 03:59
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