public FieldValue generate(Prompt prompt, Context context) {
            var parts = Arrays.stream(prompt.asString().split(" ")).map(StringFieldValue::new).toList();
            return new Array<>(DataType.getArray(DataType.STRING), parts);
        }
Tests a common use case where an array is generated from one text input.
indexinglanguage/src/test/java/com/yahoo/vespa/indexinglanguage/GenerateExpressionTestCase.java