Code for our MSc thesis, a continuation of our paper "LLMs as Proxy Survey Participants With RAG", by Elias Torjani, Airidas Brikas, and Daniel Hardt (our BSc thesis)
Check out our [abstract-length] paper on it: Market research via persona-induced Large Language Models, or see our poster below as a TL;DR

- Export your chat messages from Facebook, Instagram, and/or WhatsApp (instructions below)
- Take the surveys to constitute target responses, for the LLMs proxying you in the same surveys.
- Clone this repository
- Download
Ollama,llama.cpp+gguf-modelsvLLM [WIP for HPC] to run inference locally.- Any cloud provider is discouraged to mitigate leakage-risk of PII (sensive and private data).
- Run preprocessing script in folder w/ your exported data (zip/json). Standardized format, merge, dedup, chunk, and embed.
- Run batch survey script w/ flags for your exported data, survey questions, and LLM model of choice.
- Run analysis script to calculate fidelity and plot results.
If you are a donor here is the upload and survey link. We'll give you a specific donor ID to add to your url, which only you should use.
Export data from each platform
REQUIRED TO DO MESSENGER BEFORE FACEBOOK DUE TO ENCRYPTION-QUIRK!
- Messenger --> click on your profile picture in bottom left corner -->
Privacy & safety-->End-to-end encrypted chats-->Message storage(ensure Chat history Last backup is today's date) -->Download message storage data--> SelectAll timeandlower-quality media-->Download file. - Facebook (IG is also exported here in this url) -->
Create export--> pick account[s] -->export to device-->Customize information--> Clear all other thanMessages(GetAll time, inJSONformat, and picklower media quality). Wait for email confirming the export is ready (~3 days for "all time") --> download zip file. - Instagram Exact same process as Facebook, just pick your Instagram account instead.
- WhatsApp (via phone app) --> Settings -->
Chats-->Export chat--> pick your 1-on-1 chats to export (instant). - Optional: Use Beeper's API to continuosly export new messages. But be aware of our experiment's scope being a snapshot in time.
| 1 | 2 | 3 | 4 |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Note
This fork is a refactored version of this repository, where our original commit history is preserved. We refactored for speed, transparency, and reproducability.



