The flags SF, ZF, AF, PF, and CF are copied to AH bits 7, 6, 4, 2, and 0, respectively. The contents of the remaining bits 5, 3, and 1 of AH is generally accepted as undefined. This is true if you look at the older instruction sets, for example the 80386 one.
However the more recent IA-32 Intel® Architecture Software Developer’s Manual Volume 2: Instruction Set Reference spells out explicit bit states for LAHF:
Operation
AH ← EFLAGS(SF:ZF:0:AF:0:PF:1:CF);