Let us have set of $n=mk$ people that have to be divided into $m$ teams, each with $k$ members. Let us denote the set of the people $S=\{1,2,\dots,n\}$ and the teams $S_i\subset S$. We consider a function $L:S\times S\to[0,1]$ where for $s,s'\in S$, $L(s,s')$ expresses for arguments how much $s$ likes $s'$. Generally $L(s,s')\neq L(s',s)$.
Task: how to form the teams so the minimal love, that is defined for given teams as $$ \min_{i=1\dots m}\left(\min_{s,s'\in S_i}L(s,s')\right), $$ is maximal?
If you relax your problem such that $L(s,s')=L(s',s)$, then it's much like undirected graph cut:
Let $\begin{pmatrix}W_{ij}\end{pmatrix}=L(s_i,s_j)$, so that $e_{n,i}^\top W e_{n,j}=L(s_i,s_j)$. Notice $e_{n,i}$ here denotes the $i$th canonical $n$-dimensional vector, for example $e_{4,2}=\begin{pmatrix}0 & 1 & 0 & 0\end{pmatrix}^\top$. If the vector $e_{n,i}$ denotes $s_i$, then a team $S_a\subset S$ is $$ f_a=\sum_{i\in S_a} e_{n,i}\tag{1}\label{1} $$
Notice that $f_i^\top W f_i$ is the amount of love within team $S_i$ and $f_i^\top W f_j$ is the amount of love between teams $S_i$ and $S_j$.
Now, your problem becomes this one : $$ \min_{f_1,\dots,f_k} f^\top W f : f_i\text{ more or less defined as in \eqref{1}}, f\perp \mathbb 1,\|f\|=\sqrt{n} $$
You can check Luxburg 2007 for more details about why the problem is like that and how to solve it.
However, know that this problem is NP-hard. You should not expect to find the optimal solution.