A protein complex known as the T-cell receptor (TCR) is present on the surface of T cells and has a key role in the body's immune response. Peptide fragments of proteins known as antigens form a complex with proteins of the major histocompatibility complex (MHC) family. If a TCR binds an antigen not normally present in the body, this can trigger a defensive immune response. Dash et al.1 and Glanville et al.2 investigated the relationship between TCR sequence and the specificity of TCR antigen binding, because it is difficult to predict the antigen to which a TCR will bind. The authors isolated T cells from mice and humans that could bind to known antigens and analysed the DNA sequences of the genes that express the TCRs present on these cells, enabling them to determine the corresponding TCR protein sequences. TCR sequence motifs that are associated with binding to antigens of interest are enriched compared with other sequences, and could thus be identified. This information could be used to predict whether a specific T cell would bind to a given antigen on the basis of its TCR sequence.