We describe the synthesis of AlPO-5 and SAPO-5 materials (AFI topology) using five different tertiary amines or quaternary ammonium ions containing one or two benzyl rings as structure-directing agents (SDAs). All of the molecules successfully direct the crystallization of AlPO-5; however, only the most efficient templates are able to crystallize SAPO-5. The observed differences in template efficiency can be rationalized in terms of the interaction energy between these molecules and the AFI framework. In ranking the template molecules, we notice that a well-defined molecular shape enhances the templating ability, but molecules that are too rigid are not able to adapt to the AlPO framework, yielding an inferior templating ability. Results of atomic-level modeling show that templates with one benzyl ring self-assemble in the main AFI channel by forming dimers with the benzyl rings parallel to each other; templates with two benzyl rings assemble instead into longer chains in which the benzyl ring of one molecule faces the ring of the subsequent one. Both mono- and dibenzyl templates show a high space-filling ability in AFI. Kinetic and thermodynamic factors that might affect the structure-directing activity of the molecules are examined.