Consider smooth projective varieties over a finite field. If a curve "looks like" an elliptic curve (i.e. has genus $1$) then it can be made into an elliptic curve. Is there something similar in higher dimensions, i.e. if we fix the values of some invariants can we guarantee that the variety admits an algebraic group structure? What is sufficient for threefolds?