Zing Forum

Reading

Automating Dream Content Coding with Large Language Models: AI Implementation of the Hall/Van de Castle System

The llm_dream_coder project demonstrates how to semi-automate the Hall/Van de Castle dream coding system using the Claude large language model. While retaining human review, it increases coding efficiency severalfold, providing a reproducible AI toolchain for psychology and cognitive science research.

梦境研究Hall/Van de Castle大语言模型Claude心理学认知科学文本编码机器学习人机协作开源工具
Published 2026-05-14 13:23Recent activity 2026-05-14 13:29Estimated read 5 min
Automating Dream Content Coding with Large Language Models: AI Implementation of the Hall/Van de Castle System
1

Section 01

Introduction: Breakthrough in AI Semi-Automated Dream Coding

The llm_dream_coder project uses the Claude large language model to semi-automate the Hall/Van de Castle dream coding system. Through a human-machine collaboration model (AI initial coding + human review), it increases coding efficiency severalfold, providing a reproducible open-source toolchain for psychology and cognitive science research.

2

Section 02

Background: Quantification Bottleneck in Dream Research

Dream research requires converting subjective experiences into quantifiable data. The Hall/Van de Castle (H/VdC) framework is the current standard, but manual coding is time-consuming and labor-intensive (each report takes dozens of minutes), and coders need professional training, which limits the development of large-scale, cross-cultural dream research.

3

Section 03

Methodology: Design and Implementation of llm_dream_coder

llm_dream_coder is an open-source toolkit developed by the Cognitive Communication Science Lab, featuring a modular design (covering dimensions such as roles and social interactions) with "human-machine collaboration" as its core. Technically, it uses the H/VdC manual as system prompts + a small number of examples to call Claude, leverages API caching to reduce costs, and uses attribute-level F1 scores for evaluation (calculating partial credit by decomposing coding attributes).

4

Section 04

Evidence: Coding Performance Close to Human Level

In validation on standard datasets, the overall F1 score for role coding reached 0.873 (0.889 for non-family members); among role attributes, quantity (0.915), gender (0.850), and age (0.910) performed excellently, while identity recognition (0.719) was a challenge. Other dimensions: social interaction aggression (0.769), friendliness (0.787), sexual behavior (0.968); success/failure F1 scores 0.91/0.89; average emotion F1 score 0.935.

5

Section 05

Application Scenarios: Dual Value in Academia and Clinical Practice

Academically, it accelerates the construction of large-scale dream databases, supporting cross-cultural comparisons and longitudinal tracking; clinically, it can assist therapists in analyzing patients' dream emotion patterns and psychological conflicts; the open-source modular design is easy to extend and customize (adding dimensions or adjusting rules).

6

Section 06

Limitations and Future Directions

Limitations: Weak in handling content that requires the dreamer's background knowledge; only validated on English reports. Future directions: Explore more advanced models (e.g., Claude 3.5 Sonnet); develop an interactive correction interface; build multilingual dream datasets.

7

Section 07

Conclusion: A New Paradigm for AI-Assisted Humanities Research

llm_dream_coder is a model example of AI application in humanities and social sciences. Combining large language model semantic understanding with rigorous academic methods, the human-machine collaboration model can be extended to tasks such as interview analysis and diary research, providing a reproducible reference for computational social science.