Researchers use text, such as classroom transcripts and social media posts, to study social phenomena that are difficult to observe directly. They turn text into evidence through measurement, which assigns each case a value on a construct, and discovery, which searches for patterns such as differences between groups. In both, researchers draw on domain knowledge, but a computational method can use that knowledge only through the mechanisms it is designed with. This dissertation asks how existing computational methods use researchers' domain knowledge to measure constructs and discover patterns, where they fall short, and how they can be adapted to use kinds of knowledge they currently cannot.
The first study examines how much of experts' knowledge carries into measuring high-inference teaching practices in K–12 math classrooms and simulated teaching tasks. Language models fine-tuned on expert scores perform worse on practices that require more pedagogical interpretation, which human raters also score least reliably. When experts' judgments vary, scores learned from them inherit that variation.
The second study shows how the researcher's choice of outcome and comparison shapes what discovery can find. Studying public health experts on social media during COVID-19, we define local engagement as a rate that accounts for an expert's local reach and compare the language of posts with high and low local engagement. Engagement is higher from local users, posts that share personal experiences and emotions are associated with more local engagement, and local replies to such posts are more positive and personal.
The third study addresses a limitation of LLM-based hypothesis generation, which ranks hypotheses by how well they discriminate between outcome groups overall and gives researchers no way to specify the contexts that matter. We introduce conditional hypothesis generation, in which researchers specify contexts as covariates to find what differs after adjusting for context, within a particular context, or across contexts. In synthetic experiments, covariate-aware selection recovers targeted differences that global selection overlooks. On real datasets, experts rate hypotheses unique to the covariate-aware method as more helpful on average than those unique to the global baseline.
The dissertation closes by discussing knowledge these studies leave without a mechanism, such as the reasoning behind an expert's score for a particular case, researchers' evolving knowledge during discovery, and the interpretive lens researchers bring to a text.
Paiheng Xu is a PhD candidate in Computer Science at the University of Maryland, College Park, advised by Prof. Wei Ai. His research interests are Natural Language Processing and Computational Social Science.

