write a medium blog post on how to program online behavioral experiments in .NET…
- User
write a medium blog post on how to program online behavioral experiments in .NET Framework that will be uploaded to MTurk as an External Question. Don;t focus on installation etc. Do focus on how to adopt the experiment website to MTurk (how to handle workerId etc. at the beginning, and how to send these details to MTurk when the experiment was completed)
Assistant
Sure, I’d be happy to help with that. The key steps are:
-
Set up a .NET Framework web application, and make sure you have installed the Amazon MTurk .NET Library, which is what you’ll use to talk to the MTurk API.
-
Add a page to the web application that will serve as the “External Question” for MTurk. This will need to have a form where workers can enter their MTurk worker ID, and a button they can click to submit the form and run the experiment.
-
Add code to the External Question page to use the Amazon MTurk .NET Library to create an assignment for the experiment, and return a URL to the assignment to the worker. The worker will then need to visit the URL to start the experiment.
-
Add code to the External Question page to use the Amazon MTurk .NET Library to submit the results of the experiment when the worker is done. The code will need to take the worker ID and any other necessary information from the form the worker submitted, and submit it to MTurk using the “SendBonus” method.
-
- User
SendBonus don't also need assignmentId?
Assistant
Yes, you're right. To send a bonus to a worker, you'll need both the worker ID and the assignment ID. The assignment ID is a unique identifier for the specific task that the worker completed, and it's used to associate the worker's results with the task.
To get the assignment ID, you'll need to use the CreateAssignment method when the worker submits the form on your External Question page. The CreateAssignment method returns the assignment ID, which you can then store along with the worker ID in a database or other persistent storage.
When the worker completes the experiment, you'll use the SendBonus method to submit the results and the worker ID to MTurk. The SendBonus method requires the assignment ID as well, so you'll need to retrieve the assignment ID from your storage and include it in the call to SendBonus.
So in summary, to program an online behavioral experiment in .NET Framework that can be uploaded to MTurk as an External Question, you'll need to:
- Set up a .NET Framework web application and install the Amazon MTurk .NET Library.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.