PyRIT icon indicating copy to clipboard operation
PyRIT copied to clipboard

FEAT Export Conversations and Scores in the same JSON file

Open nina-msft opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

When conversations are added to memory, they have a specific ID. If Conversations have been scored, the ScoreEntry's prompt_request_response_id directly matches the PromptMemoryEntry id. Currently, memory_interface only has 2 functions to export the database conversations to JSON: export_conversation_by_orchestrator_id and export_conversation_by_id. This is great for getting conversations from the DB (but only for PromptMemoryEntry).

Describe the solution you'd like

Add a function to the memory_interface for DuckDB that exports conversations and their scores into a JSON file.

This may require creation of an intermediary function that exports scores by prompt_request_response_id into a JSON file. The result will be one file that has an entry per Prompt Request Response ID with conversation and score information fields.

nina-msft avatar Oct 02 '24 23:10 nina-msft

It won't let me assign you Siddhi, but thank you for opening that PR!

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

This is now included

rlundeen2 avatar Jan 04 '25 17:01 rlundeen2