Can I configure my own prompts for the Expenses Policy Agent?

Yes. Fusion Applications offer the capability for you to tailor the prompt to meet your specific needs. Prompts are the instructions you provide to generative AI agents. Configuring prompts is an advanced feature and entirely optional, intended only for situations where your specific needs go beyond the seeded prompts.

To use this feature, at least one business unit must be enabled with Touchless Expenses with J.P. Morgan Corporate Cards.

Here’s how you can configure prompts for the Expenses Policy Agent:

  1. Use an existing sandbox or create a new sandbox.

    To access the sandbox management page, click the hamburger icon and select Configuration > Sandboxes.

    The sandbox must have the HCM Experience Design Studio tool deployed.

  2. Enter the sandbox and start the HCM Experience Design Studio using Tools.

  3. Click AI Configurator.

    The AI Configurator page opens with two sections:
    • Overridden Prompts: currently overridden prompts
    • Seeded Prompts: prompts that are available for configuring
  4. Locate the Expenses Policy Agent prompt with the prompt label: financials.exm.expense_policy_inquiry_agent_prompt.

  5. Click the down arrow to view the prompt details, or click the Override Prompt icon on the right side of the prompt entry.

    This opens the Override Prompt drawer where you can make edits.

  6. You can update the prompt as needed and test your changes using a Touchless Expenses user. Once you're happy with how it works, save your changes.

    The updated prompt will appear in the Overridden Prompts section. From then on, whenever a Touchless Expenses user runs the Expenses Policy Agent, your custom prompt will be used instead of the default one.

  7. If you ever want to change or remove the override, just click the ellipsis () next to the prompt and select Edit or Delete.

    If you delete it, the original, seeded prompt will be used again.

  8. Once all your changes are saved in the AI Configurator, go ahead and exit the sandbox.

Notes:
  • Lines that start with a # are either instructions or placeholders for variables.
  • Prompt variables are written inside curly braces like this: {variable_name}. These are essential to how the prompt works.
  • Before making any changes, be sure to review all prompt management tips and considerations.

Sample prompts for common scenarios

Scenario Suggested Prompt
You want the agent to provide more detailed reasoning in its response—without overusing or heavily referencing user context.

##User Context

User Job Name: {user_jobname}

User Location: {user_location}

## References

Context: {context}

## Instructions

Using the context, answer the following question: {user_query}

## Acceptance Criteria

Provide a concise and direct answer in 1-2 sentences.

Explain why your answer is correct by citing the original context. Do not mention the user context if it’s not relevant to the answer.

In the default (seeded) prompt, there are two variables that use user context. These help the Expenses Policy Agent tailor answers based on each user's specific details:

{user_jobname} – the user's job title, as defined in HCM

{user_location} – the user's office location, also from HCM

For example, if your policy document includes rules that vary by job title or location, the agent can use these variables to tell users exactly which policy applies to them.

However, if you prefer the agent not refer to a user’s job title, you can simply remove the {user_jobname} variable from the prompt.

##User Context

User Location: {user_location}

## References

Context: {context}

## Instructions

Using the context, answer the following question: {user_query}

## Acceptance Criteria

Provide a concise and direct answer in 1-2 sentences.

Only mention the user context if it is relevant to the answer.

You want the Expenses Policy Agent to guide users to create a support ticket on a custom page when their question falls outside the agent’s knowledge, you can set this up using custom_page_info.

##User Context

User Job Name: {user_jobname}

User Location: {user_location}

## References

Context: {context}

## Instructions

Using the context, answer the following question: {user_query}

## Acceptance Criteria

Provide a concise and direct answer in 1-2 sentences.

If the {user_query} is out of the context scope, state "Sorry this is out of my scope. Please raise your request to custom_page_info."