Exploring How LLMs Capture and Represent Domain-Specific Knowledge
By: Mirian Hipolito Garcia , Camille Couturier , Daniel Madrigal Diaz and more
Potential Business Impact:
Helps computers pick the best AI for each job.
We study whether Large Language Models (LLMs) inherently capture domain-specific nuances in natural language. Our experiments probe the domain sensitivity of LLMs by examining their ability to distinguish queries from different domains using hidden states generated during the prefill phase. We reveal latent domain-related trajectories that indicate the model's internal recognition of query domains. We also study the robustness of these domain representations to variations in prompt styles and sources. Our approach leverages these representations for model selection, mapping the LLM that best matches the domain trace of the input query (i.e., the model with the highest performance on similar traces). Our findings show that LLMs can differentiate queries for related domains, and that the fine-tuned model is not always the most accurate. Unlike previous work, our interpretations apply to both closed and open-ended generative tasks
Similar Papers
Leveraging Domain Knowledge at Inference Time for LLM Translation: Retrieval versus Generation
Computation and Language
Helps computers translate tricky medical and legal words.
Assessing the Capability of Large Language Models for Domain-Specific Ontology Generation
Artificial Intelligence
Builds smart knowledge maps for any topic.
Domain Specific Benchmarks for Evaluating Multimodal Large Language Models
Machine Learning (CS)
Organizes AI tests for different subjects.