josh-ashkinaze / plurals

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

add a draw_graph() method for enhanced acessibility #45

Open josh-ashkinaze opened 1 month ago

josh-ashkinaze commented 1 month ago

Is your feature request related to a problem? Please describe if so! Not a problem but it would be nice if users could SEE the graph they created just to make sure they created it right.

Describe the feature you'd like! As we discussed, implement a `draw_graph' method of DAG so that users can see if they created the thing they wanted to.

End-stage behavior:

I started this awhile back here (https://github.com/josh-ashkinaze/plurals/blob/7370a4bc8c62bdee5634b16e784c5cc5a38c7438/plurals/deliberation.py#L764)

Implementation

Drawing stuff

Labels

Dict method

List Method

agents = [ Agent(system_instructions="blah"), Agent(system_instructions="blah2"]
edges = [(0,1)]

Here, the desired behavior is that we have nodes labeled 0 and 1 and edges from 0 to 1.

Dependency update

[1] https://networkx.org/documentation/stable/reference/generated/networkx.drawing.nx_pylab.draw_networkx.html#networkx.drawing.nx_pylab.draw_networkx

Unit tests

Documentation

Optional enhancements

josh-ashkinaze commented 1 week ago

@avi22bhattacharya where are we at with this?