An assay based on a solvent-sensitive fluorogenic dye molecule, badan, is used to test the binding affinity of a library of tetrapeptide molecules for the BIR3 (baculovirus IAP repeat) domain of XIAP (X-linked inhibitor of apoptosis protein). The fluorophore is attached to a tetrapeptide, Ala-Val-Pro-Cys-NH(2), through a thiol linkage and, upon binding to XIAP, undergoes a solvatochromic shift in fluorescence emission. When a molecule (e.g., a natural protein known to bind to XIAP or a tetrapeptide mimic) displaces the dye, the emission shifts back to the spectrum observed in water. As emission intensity is related to the binding of the tetrapeptide, the intensity can be used to determine the equilibrium constant, K, for the displacement of the dye by the tetrapeptide. The results permit residue-specific analysis of the interaction. Furthermore, we show that hydrophobic effects in the fourth position are general and can effectively increase overall affinity.