I wanted to bring two possible improvements related to the Connect GenAI rule, particularly around the request and response configuration, to the attention of the Pega product team.
1. Support for complex structured responses
Currently, for response mapping, we have options such as Structured – Single and Structured – List.
But what if the expected response contains a combination of both?
For example, consider extracting invoice information:
- Invoice date
- Vendor details
- Line items[]- a structured list containing multiple records
This is still a structured response, but the structure is more complex than either a single object or a simple list.
Using Unstructured doesn’t feel like the right fit here because the expected output has a clearly defined structure.
Would it be useful to support a Complex Structured response, perhaps with a configuration experience similar to a JSON Data Transform, where we could define nested objects and lists within the response structure?
I feel this could make Connect GenAI much more flexible for use cases where the LLM is expected to return richer structured data.
2. More flexibility for Document AI attachment processing
Document AI uses Connect GenAI, where we can specify an attachment field as the input. That works well when we simply want to process an attachment, but I think there could be value in providing more control over which attachments should be processed.
For example, could we support filtering based on attachment category or document type, allowing certain attachment types to be included or excluded?
Going one step further, I wonder whether Document AI could benefit from a more specialized GenAI configuration/rule type, where the attachment category and expected response structure are more closely associated.
For example:
Identity Document
→ Name, date of birth, document number, expiry date, etc.
Invoice
→ Invoice date, vendor, total amount, line items, etc.
The expected extraction structure is naturally different depending on the type/category of document being processed.
Having the ability to associate an attachment category with its own extraction/response structure could make Document AI configurations cleaner, more flexible, and easier to govern.
Interested to know whether these are already being considered on the product roadmap, or whether there are recommended patterns today for handling these scenarios.
I also feel it would be interesting to have a dedicated thread around new features, where Pega professionals working on real projects can share what may be missing or could be improved based on practical experience. This kind of real-time feedback from the field could help surface practical gaps early and give them the right attention from the product team.
Interested to hear what others think and whether you have come across similar requirements in your projects.
