expectedparrot / edsl

Design, conduct and analyze results of AI-powered surveys and experiments. Simulate social science and market research with large numbers of AI agents and LLMs.
https://docs.expectedparrot.com
MIT License
187 stars 19 forks source link

If a scenario has an image, it is getting passed to all questions in the survey; need way to indicate only goes to some questions #1048

Closed johnjosephhorton closed 1 month ago

johnjosephhorton commented 1 month ago

The problem is that the API call for a model includes an encoded image if that image is present in the scenario. As such, the image is send in the prompt to all questions in the Survey---not just the intended one.

Possible solutions:

  1. Require the prompt to explicitly mention image via {{ image }}
  2. Include an "image = True" parameter in the question construction

I think 1 is better because it will make it easier later to turn these into human-readable surveys.

johnjosephhorton commented 1 month ago

For an image scenario, change the repr to only show the first bit