Skip to content

Commit ce9f112

Browse files
committed
2026.06 sync
1 parent 3af0fd0 commit ce9f112

12 files changed

Lines changed: 1120 additions & 52 deletions

File tree

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
11
# ibm-decision-intelligence-samples
2-
This repository provides samples to explore Decision Intelligence.
2+
3+
This repository provides sample assets to explore Decision Intelligence capabilities and support the development and integration of decision services.
4+
5+
## Contents
6+
7+
### Loan Validation Application [🔗](samples/LoanApplicationSample/README.md)
8+
A web-based client application that invokes a decision service built with Decision Intelligence.
9+
10+
### IBM Decision Intelligence Designer MCP Server [🔗](samples/DesignerMCPServerTutorial/README.md)
11+
Demonstrates the use of the MCP server to create, test, and validate a decision service within the Decision Intelligence environment.
12+
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Sample: Introducing the IBM Decision Intelligence Designer MCP Server
2+
3+
This tutorial demonstrates how to use the MCP server provided with Decision Intelligence to create and test a decision service.
4+
5+
## Description
6+
7+
## Learning objectives
8+
- Configure the MCP server with IBM Bob
9+
- Use the MCP server to create and test a decision service
10+
11+
## Audience
12+
13+
This sample is designed for business users who want to use AI-powered tools to create and test decision artifacts in Decision Intelligence.
14+
15+
## Time required
16+
17+
20 minutes
18+
19+
## Prerequisites
20+
- Decision Intelligence: A platform that helps you design, automate, and execute business decisions at scale. It leverages AI-powered rule creation, a comprehensive development environment, and runtime APIs to support end-to-end decision management.
21+
- IBM Bob: An AI agent designed to automate and orchestrate end-to-end software development workflows across the entire software development lifecycle.
22+
23+
# Task 1: Configuring the MCP Server
24+
**About this task**
25+
26+
In this task, you configure IBM Bob to connect to the MCP server.
27+
28+
**Procedure**
29+
30+
1. Sign in to Decision Intelligence by using your instance credentials
31+
2. Follow the steps described in [Creating API keys]( https://www.ibm.com/docs/en/saas-console?topic=usca-granting-access-through-service-ids-api-keys-from-saas-console#creating_APIkeys) to create a personal API key.
32+
3. Follow the steps described in [Connecting to IBM Bob]( https://www.ibm.com/docs/en/decision-intelligence?topic=designer-interacting-decision-through-mcp-server#con_mcp_server__title__2) to configure the MCP server.
33+
34+
35+
# Task 2: Using the MCP server
36+
37+
**About this task**
38+
39+
In this task, you use the MCP server to create and test a decision service.
40+
41+
## Step 1: Creating a decision automation and a decision service
42+
It is recommended to review the [Telecom Offer Recommendation Policy](./policy/TelecomOfferPolicy.md), as it provides the key rules needed to understand the decision logic. You will then use the MCP server to create a decision automation and a decision service based on this policy.
43+
44+
**Procedure**
45+
46+
1. Sign in to IBM Bob by using your instance credentials.
47+
2. Click the mode selector and switch to Ask mode.
48+
3. Ask Bob to read the [Telecom Offer Recommendation Policy](./policy/TelecomOfferPolicy.md).
49+
4. Switch back to Advanced mode.
50+
5. Ask Bob to create a decision automation named "Customer services". Verify that the automation was created in your Decision Intelligence instance.
51+
6. Ask Bob to create an empty decision service for the [policy](./policy/TelecomOfferPolicy.md). Verify that it was created in your instance.
52+
53+
## Step 2: Creating a data model
54+
You use the MCP server to create a data model based on a provided policy.
55+
56+
**Procedure**
57+
58+
1. Ask Bob to create a data model based on this [policy](./policy/TelecomOfferPolicy.md). Use the following prompt:
59+
60+
**Prompt**
61+
```
62+
Create a data model that complies with the Telecom Offer Recommendation Policy
63+
```
64+
2. Verify that the data model is correctly created by reviewing all data types and ask Bob to update the data model if it does not meet the policy requirements.
65+
3. Share your changes in Decision Designer to persist them, enable version history, and roll back if needed.
66+
67+
## Step 3: Creating a decision model and defining the logic
68+
You use the MCP server to create a decision model and implement the decision logic for all decision nodes based on the provided policy.
69+
70+
**Procedure**
71+
1. Ask Bob to create a decision model based on the policy. The following example shows a prompt to perform this step:
72+
73+
**Prompt**
74+
```
75+
Create a decision model based on the Telecom Offer Recommendation Policy
76+
```
77+
78+
2. Verify the generated decision diagram in Decision Designer. If it follows the flow described in the policy, proceed to the next step; otherwise, ask Bob to update it.
79+
3. Ask Bob to define the decision logic for all decision nodes.
80+
81+
**Prompt**
82+
```
83+
Define the logic of each node
84+
```
85+
4. Share the changes in Decision Designer.
86+
87+
You can cancel the process at any time and request updates from Bob. You also have the option to review and decline any changes proposed by Bob.
88+
89+
90+
## Step 5: Creating an operation and testing the decision service
91+
You use the MCP server to create a decision operation and test the generated decision service with different test data sets.
92+
93+
94+
**Procedure**
95+
1. Ask Bob to create a decision operation for the decision model.
96+
97+
**Prompt**
98+
```
99+
Create a decision operation for the decision model
100+
```
101+
2. Ask Bob to test the decision service with different test data sets.
102+
103+
**Prompt**
104+
```
105+
Create 4 test data sets to run the decision model.
106+
```
107+
108+
3. Go to Decision Designer and run the decision model with the generated test data sets. Make sure that the results are consistent with the policy and accurately reflect the defined logic.
109+
4. Share the changes in Decision Designer.
110+
111+
## Conclusion
112+
113+
This sample demonstrates how to use the Model Context Protocol (MCP) server provided with IBM Decision Intelligence to manage and interact with Decision Designer in a structured and scalable way. By simplifying integration, MCP helps improve the governance of decision logic across applications.
114+
While AI can accelerate development, its outputs should always be carefully reviewed. Users are responsible for validating the generated logic and ensuring it aligns with business requirements, in order to deliver accurate and reliable results.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Telecom Offer Recommendation Policy - Simplified
2+
3+
## Purpose
4+
Recommend telecom products to customers while ensuring regulatory compliance, transparency, and prioritizing eligible offers based on campaigns and operational constraints.
5+
6+
## How It Works - 3 Evaluation Phases
7+
8+
### Phase 1: Eligibility Check
9+
An offer is **EXCLUDED** if any of these conditions are true:
10+
- Account is suspended
11+
- Customer under 18 AND offer is regulated
12+
- Offer is regulated AND verification is missing
13+
- Customer's country is not in the allowed countries list
14+
- High credit risk AND contract duration ≥ 12 months
15+
16+
### Phase 2: Campaign & Priority
17+
- **BackToSchool Campaign**: Increases visibility for all customer segments
18+
- **SummerBoost Campaign**: Increases visibility for matching offers
19+
- **Standard**: Normal priority if no campaign applies
20+
21+
### Phase 3: Inventory Check
22+
- **Low Stock** → Offer excluded
23+
- **Medium Stock** → Normal priority
24+
- **High Stock** → High priority (promotion capability)
25+
26+
## Final Recommendation
27+
- **High Priority**: Eligible + High stock OR campaign boost applied
28+
- **Normal Priority**: Eligible + Medium stock + No campaign boost
29+
- **Excluded**: Failed eligibility OR low stock
30+
31+
## Output
32+
Each evaluation provides:
33+
- Recommended offers list
34+
- Excluded offers list
35+
- Priority level per offer
36+
- Reason codes (e.g., ACCOUNT_SUSPENDED, LOW_STOCK, CAMPAIGN_BOOST)
37+
38+
## Example
39+
**Student (age 20, Netherlands, Active account, BackToSchool campaign)**
40+
- T-100 (Student 5G) → High Priority (campaign + high stock)
41+
- T-200 (Smartwatch) → Normal Priority
42+
- T-300 (Business SIM) → High Priority
43+
- T-400 (Travel Pack) → Excluded (low stock)
44+
- T-500 (Premium 5G) → High Priority
45+
46+
## Governance
47+
- Operations maintains stock thresholds
48+
- Commercial teams maintain contract rules
49+
- All changes must be versioned for auditability
50+
51+
## Reference
52+
**Policy Version**: 2.1
53+
54+
**Original Policy**: [telecom-product-recommendation-201.md](https://github.com/DecisionsDev/decision-assistant-hub/blob/main/examples/product-recommendation/telecom-product-recommendation-201.md)

samples/LoanApplicationSample/README.md

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ which calls a decision service archive to process loan requests using the decisi
99
- Configure a web application to call a decision service using the decision runtime REST API.
1010
- Run the web application with representative data.
1111
- Explore the execution trace.
12+
- Monitor the execution in a Decision Insights dashboard.
1213

1314
## Audience
1415

@@ -23,7 +24,7 @@ This sample is for anyone who wants to call a decision service deployed to the d
2324
- Decision Intelligence: You should have access to Decision Intelligence. Decision Intelligence includes Decision Designer, a comprehensive authoring environment where you can develop, test, and deploy decision services.
2425
- API key: To call the decision services you deployed from Decision Intelligence, you must use an API key.
2526
For more information about API keys, see [Creating API keys](https://www.ibm.com/docs/en/saas-console?topic=usca-granting-access-through-service-ids-api-keys-from-saas-console#creating_APIkeys)
26-
- Websphere Application Server Liberty: A Java application server that you can download from [Download WAS Liberty](https://developer.ibm.com/wasdev/downloads/). This sample was tested with **WebSphere Liberty Web Profile 8 26.0.0.1**.
27+
- Websphere Application Server Liberty: A Java application server that you can download from [Download WAS Liberty](https://www.ibm.com/support/pages/websphere-liberty-developers). This sample was tested with **WebSphere Liberty Web Profile 8 26.0.0.6**.
2728
- Apache Maven: A software project management tool that you can download from [Welcome to Apache Maven](https://maven.apache.org).
2829

2930
It is recommended that you go through the tutorial [Creating and deploying a decision service](https://www.ibm.com/docs/en/decision-intelligence?topic=tutorials-creating-deploying-decision-service) before using this sample.
@@ -45,7 +46,37 @@ Open the `Loan Approval` decision service.
4546
- Go to the `Run` tab to run the predefined test data sets.
4647
6. When you are finished exploring the decision service, click the `Share changes` icon in the top toolbar. Keep only `Loan approval` selected and click on `Share`.
4748
7. Go to the `Deploy`tab. Create a new version `1.0.0`and deploy it.
48-
8. When the deployment has completed, copy the decision ID. You will need this parameter in the next step.
49+
8. When the deployment has completed, click on `Manage deployment` to open the `Decision deployments`view.
50+
9. Open the `Metadata`tab and copy the decision ID. You will need this parameter in the next step.
51+
10. Open the `Overview` tab and set `Business monitoring is active`to be able to monitor the executions in Decision Insights.
52+
53+
You execute the decision service to get a first execution.
54+
55+
1. Click on the `Swagger UI` to open the Swagger UI dedicated to the Loan Approval decision service.
56+
2. Expand the `POST approval/execute` command.
57+
3. Click on `Try it out`, keep the proposed Input data.
58+
4. Click `Execute`. The loan is rejected because the borrower's ZIP code is incorrectly formatted.
59+
60+
## Monitoring executions with Decision Insights
61+
62+
You use Decision Insights to monitor executions of the decision service through a dashboard.
63+
64+
You create a monitoring source:
65+
1. Open the side navigation menu and click `Dashboards`.
66+
2. Open the `Monitoring Sources` tab and click the `Create +`button.
67+
3. Enter `Sample loan approval`as the name.
68+
4. Select the decision service that you just deployed as the `Scope`. Its name ends with `Loan Approval (User Id)`.
69+
5. Keep `Private`selected, then click `Add`.
70+
71+
You import a predefined dashboard and associate it with your monitoring source:
72+
1. Open the `Dashboards` tab and click `Import`.
73+
2. Browse to `samples/LoanApplicationSample/dashboard/LoanApproval.json`, then click `Open` and `Import` to load the predefined dashboard.
74+
3. Click on the `Edit details` icon.
75+
4. In `Monitoring sources used in charts`, click `Bulk edit`.
76+
5. Select the monitoring source that you just created, then click `Done` twice.
77+
6. Click on the `Save` icon.
78+
79+
Explore the dashboard: it currently shows only one execution. To generate more data, run additional executions using the `Sample details` section below. Keep the dashboard open in your browser to observe updates in real time.
4980

5081
## Building and deploying the client application
5182
In this section, you download the repository for the sample application, set properties to match your decision service deployment, and build the application WAR file.
@@ -70,6 +101,7 @@ You can use the application when you see the message ``` BUILD SUCCESS```.
70101

71102
**Note:** If you want to modify and build the application again, follow the instructions in the section [Modifying this sample](./README.md#modifying-this-sample) at the end of this readme.
72103

104+
73105
# Sample details
74106
1. In a browser, open the URL ```http://localhost:9080/loanApplicationSample-1.0-SNAPSHOT/```:
75107

@@ -78,10 +110,17 @@ You can use the application when you see the message ``` BUILD SUCCESS```.
78110
2. Switch to the `Execution Details` tab: the values for the server name (called host name in the application) and the decision service ID are the ones you entered in the `config.js` file.
79111
3. Click **Request loan**, and look at the results.
80112

81-
![Image shows the loan application.](images/loanApplicationWithResponse.png)
82-
83113
4. Select **Trace Enabled**, and click **Request loan** again to get more details on the execution trace. You can choose between viewing the formatted output or the complete JSON response. You can play with the input values to change the results. For example, in the `Application` tab, if you change the amount to 2000000, you get the message ``` The loan cannot exceed 1000000.```
84114

115+
**Note**
116+
Each time, you run the application, the dashboard is updated with the new results. Change the execution count to 5 and get more data to monitor.
117+
118+
![Image shows the loan application with five responses.](images/loanApplicationWithResponse.png)
119+
120+
Here is the dashboard with some data.
121+
122+
![Image shows the dashboard.](images/MonitoringDashboard.png)
123+
85124
# Modifying this sample
86125

87126
When you want to modify the application or stop using it, follow these instructions:
@@ -96,11 +135,5 @@ When you modify the decision automation or stop using it, follow these instructi
96135
2. Make and test your changes.
97136
3. Share your changes, create and deploy a new version.
98137
4. Use the decision service id newly deployed in the `Loan application`.
99-
100-
- To delete the decision automation:
101-
1. Open Decision Intelligence.
102-
2. Open the decision automation created for this sample.
103-
3. In the `Deploy` tab, undeploy all the versions you deploy to test.
104-
2. Click on `Decision Automations` in the breadcrumbs.
105-
3. Open the menu of the decision automation card you created for this sample, select `Delete`.
138+
106139

0 commit comments

Comments
 (0)