If we do the Lewis structures for both compounds we have;

BF3

NH3

An interesting observation is that BF3 does follow the octet rule...ANOTHER EXCEPTION! In Group IIIA boron does not always follow the octet rule. In some of its chemistry it is 'happy' with three pairs of electrons. So who are we to argue. SO what would the molecular geometry be for BF3? Since it has no lone pairs and three bonding groups on the central atom it is trigonal planar. Since all the terminal atoms are identical and there are no lone pair on the central atom BF3 is nonpolar.

How about NH3? In this case the molecular geometry is trigonal pyramidal. The central nitrogen atom has a lone pair of electrons on it, therefore is NH3 polar.