P-Adapters: Robustly Extracting Factual Information from Language Models with Diverse Prompts
Benjamin Newman, Prafulla Kumar Choubey, Nazneen Rajani
Abstract
Recent work (e.g. LAMA (Petroni et al., 2019) ) has found that the quality of the factual information extracted from Large Language Models (LLMs) depends on the prompts used to query them. This inconsistency is problematic because different users will query LLMs for the same information using different wording, but should receive the same, accurate responses regardless. In this work we aim to address this shortcoming by introducing P-Adapters: lightweight models that sit between the embedding layer and first attention layer of LLMs. They take LLM embeddings as input and output continuous prompts that are used to query the LLM. Additionally, we investigate Mixture of Experts (MoE) models that learn a set of continuous prompts ("experts") and select one to query the LLM. They require a separate classifier trained on human-annotated data to map natural language prompts to the continuous ones. P-Adapters perform comparably to the more complex MoE models in extracting factual information from BERT and RoBERTa while eliminating the need for additional annotations. P-Adapters show between 12-26% absolute improvement in precision and 36-50% absolute improvement in consistency over a baseline of only using natural language queries. Finally, we investigate what makes P-Adapters successful and conclude that a significant factor is access to the LLM's embeddings of the original natural language prompt, particularly the subject of the entity pair being queried.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers3
- GeoLLM: Extracting Geospatial Knowledge from Large Language ModelsRohin Manvi, Samar Khanna, Gengchen Mai, Marshall Burke et al.ICLR 2024 · 104 citations
- LM vs LM: Detecting Factual Errors via Cross ExaminationRoi Cohen, May Hamri, Mor Geva, Amir GlobersonEMNLP 2023 · 41 citations
- Measuring Meta-Cultural Competency: A Spectral Framework for LLM Knowledge StructuresSougata Saha, Madhur Jindal, Saurabh Kumar Pandey, Mahardika Ihsani et al.ICML 2026
Builds on5
- AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated PromptsTaylor Shin, Yasaman Razeghi, Robert L. Logan IV, Eric Wallace et al.EMNLP 2020 · 1,162 citations
- The Power of Scale for Parameter-Efficient Prompt TuningBrian Lester, Rami Al-Rfou, Noah ConstantEMNLP 2021 · 94 citations
- Robust Encodings: A Framework for Combating Adversarial TyposErik Jones, Robin Jia, Aditi Raghunathan, Percy LiangACL 2020 · 92 citations
- Prefix-Tuning: Optimizing Continuous Prompts for GenerationXiang Lisa Li, Percy LiangACL 2021
- Knowledgeable or Educated Guess? Revisiting Language Models as Knowledge BasesBoxi Cao, Hongyu Lin, Xianpei Han, Le Sun et al.ACL 2021
Related papers
- The Effect of Scaling, Retrieval Augmentation and Form on the Factual Consistency of Language ModelsLovisa Hagström, Denitsa Saynova, Tobias Norlund, Moa Johansson et al.EMNLP 2023 · 6 citations
- MoA: Heterogeneous Mixture of Adapters for Parameter-Efficient Fine-Tuning of Large Language ModelsJie Cao, Tianwei Lin, Bo Yuan, Rolan Yan et al.ACL 2026 · 2 citations
- LLaMA-Adapter: Efficient Fine-tuning of Large Language Models with Zero-initialized AttentionRenrui Zhang, Jiaming Han, Chris Liu, Aojun Zhou et al.ICLR 2024 · 174 citations
- qa-FLoRA: Data-free query-adaptive Fusion of LoRAs for LLMsShreya Shukla, Aditya Sriram, Milinda Kuppur Narayanaswamy, Hiteshi JainAAAI 2026
- Don't Start Over: A Cost-Effective Framework for Migrating Personalized Prompts Between LLMsZiyi Zhao, Chongming Gao, Yang Zhang, Haoyan Liu et al.AAAI 2026 · 6 citations
