Overview of Agent Generation Validation

Pricefx Copilot can generate an Agent from a natural-language prompt or from an existing Agent plan. Before Copilot creates or updates an Agent, it validates the requested configuration against the metadata of the underlying Datamart. If the requested fields, groupings, or measures do not match the Datamart metadata, Copilot stops the generation process and returns a validation error instead of creating an incomplete or incorrect Agent.

Validation errors can occur both when you first create an Agent from a prompt and when you request an update to an existing Agent plan.

Why Validation Errors Occur

Agent Generation validation errors occur when the configuration that Copilot derives from your prompt does not exist in, or is not compatible with, the Datamart that backs the Agent. Common causes include:

  • Misspelled or renamed fields – The field name in your prompt does not match a field name defined in the Datamart.

  • Unsupported grouping fields – A field you asked Copilot to group by is not configured as a groupable dimension in the Datamart metadata.

  • Incompatible joins – A series references a Datamart that cannot be joined to the other series using the available key fields.

How Validation Errors Appear in Application

Pricefx Copilot shows validation error details in two places, so you can understand and resolve the issue without contacting Support:

  • Toast notification – A red banner appears at the top of the screen with the error summary and a View less or View more toggle for the full message.

  • Copilot chat response – The Copilot response in the chat panel repeats the validation details in plain language and, in some cases, proposes a resolution.

Toast messages and Copilot chat responses show the same underlying validation information. Read the Copilot chat response first, because it often includes more context than the toast notification.

Common Validation Error Types

Field Not Found in Available Fields

This error occurs when a field referenced in the Agent plan, such as a metric or dimension name, does not exist in the Datamart the Agent uses.

Agent creation failed: Could not generate agent json: Agent generation failed: Field 'InvoiceQuantity' not found in available fields Field 'NetSales' not found in available fields

This error means the prompt referenced field names, such as InvoiceQuantity and NetSales, that do not match any field configured in the Datamart used by the Agent.

Grouping Field Not Supported by Datamart Metadata

This error occurs when you ask Copilot to group or aggregate data by a field that the Datamart metadata does not support for grouping in that series.

I was unable to apply the update to the agent plan due to validation errors. Specifically, the field 'ProductName' cannot be used for grouping in the series 's1' and 's2' based on the datamart metadata.

In this case, Copilot identified that ProductName cannot be used for grouping in series s1 and s2, based on the Datamart metadata.

Agent Generated But Failed Validation

This error occurs after Copilot successfully generates the Agent JSON, when a later validation step determines the generated Agent does not meet requirements.

Agent creation failed: Agent generation failed: Agent generated but failed validation

How Copilot Helps Resolve Validation Errors

In some cases, Copilot does not only report the validation error. It also proposes a resolution based on available Datamart metadata. For example, when a grouping field was rejected, Copilot added a new series and explained the change:

However, I have added a third series (s3) from the "Competition Data" (178.DM) datamart using the ProductId for the join. This addition includes the following measures: Competitor Price, Price vs Competition ratio, Competition Gap.

Copilot then asks you to confirm the change before proceeding:

Would you like to adjust the dimensions to resolve the validation errors or proceed with deploying the agent?

Limitations

Automatic resolutions proposed by Copilot are based only on the fields and joins available in the referenced Datamarts. Copilot does not know your full business requirements, so an automatically added series or join can be incomplete.

Note that the join is currently based only on ProductId. If you require region-specific competition data, the "Competition Data" Datamart would need to include a Region field.

Review any join or grouping change that Copilot proposes before you deploy the Agent. An automatically added series can produce results that do not match your business requirements if the underlying Datamart is missing a field, such as a region field, that your use case requires.

If a validation error names a specific field, check the Meta Description and field list of the Datamart used by the Agent before you edit your prompt. This confirms whether the field exists under a different name or is missing entirely.

When Copilot does not propose a resolution, or when you decline the proposed change, you can edit your original prompt to remove or rename the unsupported field and resubmit the request.