In Vaults using Veeva AI for Quality, Veeva QMS provides a Complaint Agent that can generate a narrative summary of the investigation or CAPA plan for a Complaint. The summary includes information from key related records, such as Investigations and Root Causes for an investigation summary, and CAPA Actions for a CAPA plan summary. The Complaint Agent can also answer questions about a Complaint record via Veeva AI Chat.

See below for definitions of terms used in this article:

  • Agent: Defines a set of Agent Actions that can be performed on a document or object record in your Vault.
  • Agent Objective: A description of the Agent’s roles and responsibilities, similar to a job description.
  • Agent Context: Defines the information an Agent knows about your Vault, allowing the Agent Action to summarize this information in a response. Agent Context can include data from an object record such as fields and object relationships.
  • Agent Actions: The actions that the Agent can perform. Agents perform Agent Actions based on the provided Objective, Context, and instructions.
  • Agent Tools: Tools are assigned to Agent Actions, and provide the structure for the Agent’s response in order to ensure a consistent output format. Agent Tools are not editable.

Supported Objects & Object Types

The Complaint Agent supports the following objects and object types:

  • Complaint: Pharma Complaint object type
  • Quality Event: Complaint object type

The Complaint Agent does not support custom objects and object types.

Your Vault may process complaints using either a standalone Complaint object or a Quality Event object of a Complaint object type. In this article, these objects are collectively referred to as Complaints. All configuration steps in this article also apply to the Complaint object type of the Quality Event object.

Supported Agent Actions

The following Agent Actions are available for the Complaint Agent on supported objects and object types:

  • Ask Questions about the Complaint: Lets users ask the Complaint Agent questions about a Complaint record via the Veeva AI Chat interface.
  • Generate Investigation Summary: Lets users summarize an investigation by clicking the Generate Summary (Narrative Summary Generation Icon) icon next to the Investigation Summary & Conclusion field on a Complaint record.
  • Generate CAPA Summary: Lets users summarize a CAPA plan by clicking the Generate Summary (Narrative Summary Generation Icon) icon next to the CAPA Plan Summary field on a Complaint record.

Configuration Overview

To configure the Complaint Agent, complete the following steps:

Activating Agents

You must activate the Agents in order to make them available for use. To activate, navigate to Admin > Configuration > Agents > Complaint Agent, and set the Status of the Agent to Active.

Configuring Object Fields

Activate the following Rich Text fields on the Complaint object and add them to the relevant object types and layouts:

  • CAPA Plan Summary (capa_plan_summary_rt__v)
  • Investigation Summary & Conclusion (investigation_summary_conclusion_rt__v)

We recommend hiding these fields via Atomic Security or layout rules in earlier lifecycle states and exposing them only during the later stages of the lifecycle, when your data is expected to be most complete for summary generation.

Configuring Actions

You can configure standard Agent Actions by adding custom context and corresponding Supplemental Instructions to let that action know that custom context exists for the action. See Configuring Context for more information about creating custom context.

You can also optionally configure new custom Agent Actions in order to extend the capabilities of the Complaint Agent to address your business needs.

Configuring Context

You can optionally configure custom Agent Context in order to define additional related records and fields for the Agents to summarize. If using custom context, we recommend including similar objects, fields, and relationships as the standard context for optimal results.

  1. Navigate to Admin > Configuration > Agents > Complaint Agent.
  2. Expand the Context section and click Create.
  3. From the Type drop-down, select Object Data.
  4. Enter a Label.
  5. Enter a Name.
  6. Optional: Enter a Description.
  7. Select an option for Always Include. This determines if the Agent always summarizes the information specified in this context.
  8. In the Configuration section, click Generate Default to populate the Object Fields box with the default context for the Agent. You can modify the related objects and fields referenced in the generated context to suit your business needs. You can also write your own context using the same syntax as in Word formatted output templates.
  9. Click Save.
  10. Navigate back to the Agent and select an Action from the Actions section.
  11. In the Available Context section, click Add.
  12. In the dialog, select the context you created.
  13. Click OK.
  14. On the Action, click Edit.
  15. Optional: Add Supplemental Instructions to let the Agent know that custom context exists for this Action.
  16. Click Save.

If you wish to only use a custom context for any of the available Agent Actions, you can inactivate the standard context by navigating to the context and setting the Status to Inactive.

Data Model Migration Considerations for Custom Context

When migrating to a standalone quality event data model, any custom context configured for the Complaint Agent must be deleted and recreated after migration is complete. Vault automatically updates the object and field references for standard context. If you are not using custom context, no action is required to reconfigure the Agents after transitioning to a standalone data model.

Limitations

The following limitations affect the Complaint Agent:

  • Summarize up to 10 related records per object relationship. For instance, the summary of an Investigation can include up to 10 related Root Cause records.
  • A summary cannot be generated in a custom target field. You must use the standard Investigation Summary & Conclusion and CAPA Plan Summary fields.
  • Generated summaries can contain up to 5,000 characters.
  • Agents cannot summarize field values on the Complaint record that have been edited without saving the record. Edits to related records made while editing the primary Complaint are included in the summary.

User Permissions

To interact with the Complaint Agent, users must have the following permissions:

Type Permission Label Controls
Security Profile Agents: Complaint Agent: Execute Ability to generate a narrative summary using the Complaint Agent.
Security Profile Agents: Super Agent: Execute Ability to ask questions via Veeva AI Chat about a Complaint record.
Security Profile Application: Vault Actions: Veeva AI Chat: Use Chat Ability to view and interact with Veeva AI Chat.
Security Profile Objects: Complaint: Pharma Complaint: Edit Ability to edit Pharma Complaint records.
Security Profile Objects: Complaint: Object Field Permissions: CAPA Plan Summary, Investigation Summary & Conclusion: Edit Ability to edit relevant fields on Complaint records.
Atomic Security Complaint Lifecycle: [state]: Atomic Security: Fields: CAPA Plan Summary, Investigation Summary & Conclusion: Edit Ability to edit relevant fields in applicable lifecycle states of the Complaint Lifecycle.

The following permissions control your ability to configure Agents:

Type Permission Access Details
Security Profile Admin: Agents: Edit Ability to edit and configure Agents.
Security Profile Admin: Tools: Edit Ability to edit Agent Tools.
Security Profile Agent Instance: Read Ability to view the Agent Instance object.
Security Profile Agent Action Execution: Read Ability to view the Agent Action Execution object.
Security Profile Admin: Objects: Edit Ability to edit and configure Vault objects.
Security Profile Admin: Permission Sets: Edit Ability to edit and configure permission sets.