Saved in:
Bibliographic Details
Main Authors: Heo, Juyeon, Heinze-Deml, Christina, Elachqar, Oussama, Chan, Kwan Ho Ryan, Ren, Shirley, Nallasamy, Udhay, Miller, Andy, Narain, Jaya
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2410.14516
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915217810653184
author Heo, Juyeon
Heinze-Deml, Christina
Elachqar, Oussama
Chan, Kwan Ho Ryan
Ren, Shirley
Nallasamy, Udhay
Miller, Andy
Narain, Jaya
author_facet Heo, Juyeon
Heinze-Deml, Christina
Elachqar, Oussama
Chan, Kwan Ho Ryan
Ren, Shirley
Nallasamy, Udhay
Miller, Andy
Narain, Jaya
contents Instruction-following is crucial for building AI agents with large language models (LLMs), as these models must adhere strictly to user-provided constraints and guidelines. However, LLMs often fail to follow even simple and clear instructions. To improve instruction-following behavior and prevent undesirable outputs, a deeper understanding of how LLMs' internal states relate to these outcomes is required. In this work, we investigate whether LLMs encode information in their representations that correlate with instruction-following success - a property we term knowing internally. Our analysis identifies a direction in the input embedding space, termed the instruction-following dimension, that predicts whether a response will comply with a given instruction. We find that this dimension generalizes well across unseen tasks but not across unseen instruction types. We demonstrate that modifying representations along this dimension improves instruction-following success rates compared to random changes, without compromising response quality. Further investigation reveals that this dimension is more closely related to the phrasing of prompts rather than the inherent difficulty of the task or instructions. This work provides insight into the internal workings of LLMs' instruction-following, paving the way for reliable LLM agents.
format Preprint
id arxiv_https___arxiv_org_abs_2410_14516
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Do LLMs "know" internally when they follow instructions?
Heo, Juyeon
Heinze-Deml, Christina
Elachqar, Oussama
Chan, Kwan Ho Ryan
Ren, Shirley
Nallasamy, Udhay
Miller, Andy
Narain, Jaya
Artificial Intelligence
Computation and Language
Instruction-following is crucial for building AI agents with large language models (LLMs), as these models must adhere strictly to user-provided constraints and guidelines. However, LLMs often fail to follow even simple and clear instructions. To improve instruction-following behavior and prevent undesirable outputs, a deeper understanding of how LLMs' internal states relate to these outcomes is required. In this work, we investigate whether LLMs encode information in their representations that correlate with instruction-following success - a property we term knowing internally. Our analysis identifies a direction in the input embedding space, termed the instruction-following dimension, that predicts whether a response will comply with a given instruction. We find that this dimension generalizes well across unseen tasks but not across unseen instruction types. We demonstrate that modifying representations along this dimension improves instruction-following success rates compared to random changes, without compromising response quality. Further investigation reveals that this dimension is more closely related to the phrasing of prompts rather than the inherent difficulty of the task or instructions. This work provides insight into the internal workings of LLMs' instruction-following, paving the way for reliable LLM agents.
title Do LLMs "know" internally when they follow instructions?
topic Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2410.14516