Skip to content

Review Prompt Engineering guide#11051

Open
dbreseman wants to merge 4 commits intodevelopmentfrom
db-prompt-engineering
Open

Review Prompt Engineering guide#11051
dbreseman wants to merge 4 commits intodevelopmentfrom
db-prompt-engineering

Conversation

@dbreseman
Copy link
Copy Markdown
Collaborator

No description provided.

@dbreseman dbreseman self-assigned this Apr 20, 2026
1. Once you have saved an agent version, you cannot edit its fields anymore. So, in the **Agent version** dropdown, click **Draft** to start a new version and edit the fields again.

8. Remove the `Language` input field, as this will not be provided by users.
2. In the **Context entity** field, search for **Product** and select the entity you created previously.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: If I have a user prompt with variables and select a context entity, I can't reopen the context entity dropdown unless I first delete the variables (even if the context entity doesn't contain my variables). Is this intended behavior?

Run the app, log in as administrator, and verify that you can navigate to the **Agent_Overview** and **Mendix Cloud GenAI Configuration** pages.

2. Click **New Agent** in the top-right corner.
## Creating a User Interface {#context-entity}
Copy link
Copy Markdown
Collaborator Author

@dbreseman dbreseman Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this section from later in the document because it looks like it's now required to link a context entity before testing with variables.

* `NumberOfWords` as *Integer*
* `Language` as *String*
* `ProductDescription` as *String* and set length to `unlimited`
7. Click **Test** in the top-right corner to view the model's response. On the **Output** card, you'll be able to see the response from the model.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously this document called this button Run. Is it ever still called that in this interface?

3. In the **Title** field, enter `Product Description Generator`.

To connect an agent with the rest of your application, it is helpful to create an entity that contains attributes for capturing user input. This will then be used to fill the prompt variables.
4. Select **Task** as the **Usage type**.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously this document has Single call and Conversational as usage type options. Are these terms still used in this interface in some cases?

Comment on lines -178 to -182
1. Run the app and navigate to your agent.
4. Now that you have saved at least two test cases, open the dropdown next to the **Test** button, and click **Test All**. This runs both test cases, allowing you to compare the different input values. Note that the **Language** variable was not set in the first test case, as it did not exist at the time. As a result, the model's response may be in English or another random language.

2. Below the user prompt, you can select the context entity. Search for **Product** and select the entity that was created in the previous section. When starting from the Blank GenAI App, this should be **MyFirstModule.Product**.
6. Once you are satisfied with your agent, save the version with the title `Added system prompt and language`.

3. In the background, the system checks whether all prompt variables can be matched to attributes in the selected entity. If any variable names do not match the attribute names exactly, a warning message is displayed. Below the list of variables, you may see an informational message indicating that not all attributes are being used as variables. This is simply a helpful reminder in case you unintentionally missed a variable. In this example, the `ProductDescription` attribute is a placeholder for the model's response, and thus not part of the user or system prompt.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved these steps to earlier in the document so I could link the context entity and test the agent with variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant