Python Program for JSON Dataset Creation

Job ID: 38701278

Budget: $30 – $250 USD

Create a python program that will take a word list and use a sequence of pre-defined prompts for Microsoft Copilot to generate a JSON format dataset. For development and testing purposes we will use a list of Scottish distilleries and datapoints of interest. You must have access to the paid version of Microsoft Copilot for testing. The deliverable is the source code for a program that meets the below description and includes comprehensive comments.

1. Open a text file containing a return separated list of words (note list items might have more than one word separated by spaces or punctuation). Expect this program to be used for a list of 500 items.
2. Create JSON array where each item in the list is a new object. Each object will be complex with multiple keys and nested arrays. Save the JSON array to an external file.
3. Count and report the total number of objects in the array (ie number of items).
4. Prompt Microsoft Copilot with a pre-defined sequence of prompts and extract content from the responses, eg https://github.com/vsakkas/sydney.py OR https://pypi.org/project/talkingheads/ Specify the conversation style as "precise". Exclude citations.
5. Each object in the array will have a sequence of prompts, each prompt will be to complete a value in the object. It should be easy to add and remove specific prompts from the sequence. Count the total number of prompts in the sequence. Expect this program to be used to complete 100+ data points per list item, in a variety of data types including nested arrays.
6. Extract the object values from each response and save it to the JSON file. Copilot usually returns some introduction and conclusion content that is not necessary but the prompts will specify output in JSON format that should be readily identifiable and extractable from the rest of the response due to the bracketing and format.
7. Reset the Copilot conversation after completing each object in the array, ie new conversation for each object.
8. Report the current object out of the total (eg Object 1 of 30).
9. Report the current prompt number out of the total number of prompts in the sequence (eg Prompt 1 of 15).
10. Able to stop and resume the process from the last completed prompt. Note that Microsoft CoPilot will max out at 300 prompts/day. Must be able to recognise when the maximum number of prompts has been reached and stop the process. The process needs to be resumable the next day when the prompt limit is reset.
11. Able to perform a second, third etc tranche of prompts for each object, expanding the previously generated JSON by adding new keys and values in each object.