cehrett / social_media_frame_analysis

Tools for extracting and analyzing frames/theories/narratives from social media posts.
2 stars 0 forks source link

Create a script to reduce the frame store when it grows too large #2

Closed cehrett closed 3 months ago

cehrett commented 3 months ago

Currently, over time, the frame store simply grows and grows. This eventually becomes untenable (e.g. w/r/t context window length). So, it would be good to have a script that reduces the frame store size (perhaps to a user-set number of frames), by querying an LLM to collapse the frame-clusters in the store into one another.

This script will also need to then update all the individual day frame-cluster csvs, to reflect the new cluster labels.

Cooper-Taylor commented 3 months ago

Added all functionality. LLM responses were variable and inaccurate in regards to user-set number of clusters. Assistance needed for LLM prompt to reduce inaccuracies.

Cooper-Taylor commented 3 months ago

Instead of having LLM output an exact number of dictionaries that combine two frames, I will instead prompt it to output all pairs that it thinks is semantically equivalent (so a near identical prompt to the other collapsing script), and take the first n combinations to match a user's specified number of total clusters.