josh-ashkinaze / plurals

Plurals: A System for Guiding LLMs Via Simulated Social Ensembles
https://josh-ashkinaze.github.io/plurals/
12 stars 2 forks source link

Enhancement: Can we make loading of the ANES dataset faster? #29

Closed josh-ashkinaze closed 5 months ago

josh-ashkinaze commented 5 months ago

@narenedara It is not an urgent thing for this week but can you think about how to make ANES dataset processing faster? Just consider this situation:

from plurals.deliberation import Chain, Ensemble, Debate

issue = "Should the United States ban assault rifle words? Answer in 20 words."
model = 'gpt-4o'

n_per_group = 20

default_conservative = [Agent(persona="A conservative voter", model=model) for _ in range(n_per_group)]
default_liberal = [Agent(persona="A liberal voter", model=model) for _ in range(n_per_group)]
josh-ashkinaze commented 5 months ago

EDIT: I am working on this now and will close. My new method loads ANES at the start using GLOBALS and then I reverted back to slicing dataframe instead of string querying. it has passed our unit tests.