PyRIT icon indicating copy to clipboard operation
PyRIT copied to clipboard

FEAT: Export Conversations and Scores in the same JSON file

Open Siddheshwari19 opened this issue 1 year ago • 5 comments

FEAT: Add Function to Export Conversations and Scores to JSON

Description

This pull request introduces a new feature to the memory_interface that allows for exporting both conversations and their associated scores into a JSON file. The export_conversations_and_scores function groups conversations by their original prompt IDs and attaches corresponding scores to each conversation, exporting the combined data to a JSON file.

  • Resolves issue: #422

Changes

  • Added export_conversations_and_scores function to export conversations and their scores.
  • Updated relevant code areas to support the feature.

Siddheshwari19 avatar Oct 04 '24 18:10 Siddheshwari19

@microsoft-github-policy-service agree

Siddheshwari19 avatar Oct 04 '24 18:10 Siddheshwari19

Thanks for your first PR @Siddheshwari19 ! Let us know if you have any questions on feedback - thank you @rdheekonda for the thorough review 🦝

nina-msft avatar Oct 04 '24 21:10 nina-msft

Great work, @Siddheshwari19 . Let us know if you have any questions/comments.

rdheekonda avatar Oct 04 '24 21:10 rdheekonda

Thank you for the feedback @rdheekonda and @nina-msft. I'll work on it and let you know if I have any questions.

Siddheshwari19 avatar Oct 04 '24 21:10 Siddheshwari19

We also definitely need unit tests for this.

romanlutz avatar Oct 07 '24 03:10 romanlutz

@Siddheshwari19 just checking in :-) any help needed from us?

nina-msft avatar Oct 15 '24 19:10 nina-msft

@nina-msft I got caught up with some work so couldn't dedicate much time for this. Will work on this as soon as possible and I will definitely let you know if I need help. Thanks for the checking in.

Siddheshwari19 avatar Oct 15 '24 20:10 Siddheshwari19

@Siddheshwari19 Hi! Just checking in on this - I'd like to get this work merged in, so if it helps, I can add unit tests and resolve the comments. If you have any additional changes, please push them to the branch and I can help get this through. What do you think?

eugeniavkim avatar Oct 23 '24 20:10 eugeniavkim

Hi @eugeniavkim, Thank you for following up! I haven’t had the chance to make any additional changes. I really appreciate your offer to help with the unit tests and resolving the comments. If you’re able to take it from here, that would be great!

Siddheshwari19 avatar Oct 23 '24 20:10 Siddheshwari19

@Siddheshwari19 thanks for your contribution! We merged it from here (so we could avoid conflicts): https://github.com/Azure/PyRIT/pull/517

rlundeen2 avatar Nov 02 '24 02:11 rlundeen2