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
97 stars 15 forks source link

EEP: Replace "combo" question __add__method and replace with true cross-question piping functionality #720

Closed johnjosephhorton closed 3 days ago

johnjosephhorton commented 1 week ago

We can't use the current question __add__ method because restricted python doesn't allow it.

johnjosephhorton commented 1 week ago

For ideas: https://www.qualtrics.com/support/survey-platform/survey-module/editing-questions/piped-text/piped-text-overview/

johnjosephhorton commented 1 week ago

It should probably work like:

q1 = Question("multiple_choice", ... question_name = "first_question")
q2 = Question("free_text", question_text = "Perviously, you said {{  first_question }} 

though we might want to require some other indicator that it's a prior question and not a scenario field.

{{ PRIOR:first_question  }} 

What's qualtrics do here? cc: @rbyh

johnjosephhorton commented 1 week ago

I think better would just be to use the question_name and then use '.' notation so the user can extract anything about that prior question if they want. Eq. they could do (in a question after q0

To the question {{ q0.question_text }} you responded with {{ q0.answer }}, giving the comment {{ q0.comment }}. 
Reflecting on your answer, do you think...

As an side, this could actually replace the existing memory module. Thoughts, @rbyh

rbyh commented 1 week ago

Yes. Ideally user can immediately reuse any component, including having q1.answer become q2.question_options or one of the options

On Fri, Jul 5, 2024 at 7:39 AM John Horton @.***> wrote:

I think better would just be to use the question_name and then use '.' notation so the user can extract anything about that prior question if they want. Eq. they could do (in a question after q0

To the question {{ q0.question_text }} you responded with {{ q0.answer }}, giving the comment {{ q0.comment }}. Reflecting on your answer, do you think...

As an side, this could actually replace the existing memory module. Thoughts, @rbyh https://github.com/rbyh

— Reply to this email directly, view it on GitHub https://github.com/expectedparrot/edsl/issues/720#issuecomment-2210721789, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMCRJDDCCJT5L5OMA7T4V63ZK2AWFAVCNFSM6AAAAABKNA5HB2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJQG4ZDCNZYHE . You are receiving this because you were mentioned.Message ID: @.***>

-- Robin Horton Co-Founder Expected Parrot https://docs.expectedparrot.com

Follow us on X https://twitter.com/ExpectedParrot Join our Discord https://discord.com/invite/mxAYkjfy9m