How to organize huge amount of input prompt programmatically for research

I am doing an experiment with ChatGPT for my research.

So I have to manage input and output for various experimental conditions.
The number of experimental conditions is many, like 100.
I need to save the prompt and input data as text and output.

Also some different experimental conditions share the same prompt and input data.

So I want to organize programmatically.

Do you know an effective way or tools?

Thank you.