Let $G$ be a finite non-abelian group, and lets randomly choose two elements of $G.$ It seems quit well known that the probability that they commute is at most $\text{Pr}(G)\le\dfrac{5}{8}.$ Here is a nice reference if you like to know more about this cute result. Equality holds if and only if $G/Z(G)\cong\mathbb{Z}_2\times\mathbb{Z}_2$ ( Klein four-group). Further the equality implies that each non-central conjugacy class is of order $2$ and $8\big{|}|G|.$ Smallest non-ablalian groups with this divisibility property, namely $D_8$ (dihedral group of order 8) and $Q$ (quaternion group), achieve the equality.
Next, I looked at the next possible case $G/Z(G)\cong S_3,$ and proved that here $$\dfrac{4}{9}\le\text{Pr}(G)\le\dfrac{7}{12}.$$ For example: we have $\text{Pr}(S_3)=\dfrac{1}{2}.$ But still wasn't able to find two groups that can achieve this upper and lower bound. Is it possible to reach these bound? If so, what are the examples? Otherwise, can we improve theses bounds? In general, how far can we recover a group using only inner automorphism group?