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
176 stars 18 forks source link

Prompt answer for QuestionList should have array suggestion "[]" #124

Closed zer0dss closed 2 weeks ago

zer0dss commented 7 months ago

Line 15 should be changed to [ \<list of comma-separated words or phrases >] https://github.com/goemeritus/edsl/blob/7bbc5e13e448a376d8669473a2217e2bbb95f831/edsl/prompts/library/question_list.py#L6-L22

Currently, this code is returning None responses due to failing in the answer validation process.

from edsl.questions import QuestionList

question_text = "How would you address the legal and ethical implications of  extraterrestiral colonization?"
q = QuestionList(
    question_text=f"""A person is desining a survey.
                 They are asking the following question: {question_text} 
                 What would be suitable options for this question?
                 """,
    question_name="question_options",
)
out = q.run()

out
Screenshot 2024-02-18 at 16 13 34
rbyh commented 7 months ago

QuestionList instruction needs to specify that the response should not be a single string of comma-separated items