Quantitative social science, finance, and computational linguistics increasingly rely on Large Language Models (LLMs) to extract latent structural variables from large corpora of unstructured text. Most current pipelines treat the LLM as an automated coder, prompting the model to project texts onto discrete, researcher-authored taxonomies. While useful when categories are known ex ante, this practice represents a substantial underuse of modern Transformer architectures when the empirical goal is discovering latent structure. Forcing an instruction-tuned model to emit discrete labels compresses high-dimensional geometric information at the unembedding bottleneck, imposes exogenous categories, and can conflate underlying structural variation with instruction-following compliance and surface register artifacts. Conversely, static contrastive embeddings yield representations largely shaped by surface nouns, domain vocabulary, and native language. We propose an alternative measurement framework: Prompt-Induced Residual Trajectory (PIRT) measurement. Rather than asking an LLM to classify texts, we give every document the exact same constrained qualification prompt and set aside the generated output tokens as the primary measurement object. Treating the LLM as a standardized computational transducer, we define each document's latent coordinates by the internal geometric trajectory traced in the model's residual stream while generating its response. We establish formal information-theoretic identification conditions, prove asymptotic equivalence for downstream two-way cluster-robust dyadic regressions alongside unsupervised diffusion maps, and illustrate the method across N = 5,672 multilingual parliamentary speeches (16,082,956 dyads).
Prompt-Induced Residual Trajectories: A Schema-Free Framework for Latent Dimension Discovery with Large Language Models
Francesco Corielli
2026
Abstract
Quantitative social science, finance, and computational linguistics increasingly rely on Large Language Models (LLMs) to extract latent structural variables from large corpora of unstructured text. Most current pipelines treat the LLM as an automated coder, prompting the model to project texts onto discrete, researcher-authored taxonomies. While useful when categories are known ex ante, this practice represents a substantial underuse of modern Transformer architectures when the empirical goal is discovering latent structure. Forcing an instruction-tuned model to emit discrete labels compresses high-dimensional geometric information at the unembedding bottleneck, imposes exogenous categories, and can conflate underlying structural variation with instruction-following compliance and surface register artifacts. Conversely, static contrastive embeddings yield representations largely shaped by surface nouns, domain vocabulary, and native language. We propose an alternative measurement framework: Prompt-Induced Residual Trajectory (PIRT) measurement. Rather than asking an LLM to classify texts, we give every document the exact same constrained qualification prompt and set aside the generated output tokens as the primary measurement object. Treating the LLM as a standardized computational transducer, we define each document's latent coordinates by the internal geometric trajectory traced in the model's residual stream while generating its response. We establish formal information-theoretic identification conditions, prove asymptotic equivalence for downstream two-way cluster-robust dyadic regressions alongside unsupervised diffusion maps, and illustrate the method across N = 5,672 multilingual parliamentary speeches (16,082,956 dyads).I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.


