private static String buildGroupInsertText(String name, List<FunctionSignature> group) {
        StringBuilder snippet = new StringBuilder()
            .append(name)
            .append("(");

        int startIndex = 0;
        if (group.size() > 1) {
            snippet.append("${1|")
                   .append(String.join(",", group.stream().map(signature -> 
                           ((KeywordArgument)(signature.getArgumentList().get(0))).getArgument()).toList()))
                   .append("|}");
            startIndex = 1;
        }

        for (int i = startIndex; i < group.get(0).getArgumentList().size(); ++i) {
            if (i > 0)snippet.append(", ");

            Argument current = group.get(0).getArgumentList().get(i);
            snippet.append("${")
                   .append(i+1);

            if (current instanceof EnumArgument) {
                snippet.append("|")
                       .append(String.join(",",((EnumArgument)current).getValidArguments()))
                       .append("|}");
            } else {
                snippet.append(":")
                       .append(current.displayString())
                       .append("}");
            }
        }
        snippet.append(")");
        return snippet.toString();
    }
Some signatures are identical except differing in the first KeywordArgument,
for example closeness(field, name) and closeness(label, name).
This function makes groups based on that.
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/lsp/schema/completion/provider/RankingExpressionCompletion.java