  Scott showed that for every countable structure $\mathcal{A}$, there is a
sentence of the infinitary logic $\mathcal{L}_{\omega_1\omega}$, called a Scott
sentence for $\mathcal{A}$, whose models are exactly the isomorphic copies of
$\mathcal{A}$. Thus, the least quantifier complexity of a Scott sentence of a
structure is an invariant that measures the complexity "describing" the
structure. Knight et al.~have studied the Scott sentences of many structures.
In particular, Knight and Saraph showed that a finitely generated structure
always has a $\Sigma^0_3$ Scott sentence. We give a characterization of the
finitely generated structures for whom the $\Sigma^0_3$ Scott sentence is
optimal. One application of this result is to give a construction of a finitely
generated group where the $\Sigma^0_3$ Scott sentence is optimal.
