As mentioned in our first, and second, and third blogs, Semarchy is bullish on the opportunities AI can provide as a copilot to our Master Data Management stakeholders.
We have had pre-packaged AI/ML capabilities since 2014, and purposefully designed an open and constructive architecture that allows you to easily leverage any state-of-the-art solution. This is the same leading approach used by the top LLMs in the market, in contrast to the approach leveraged by some of the other MDM vendors which forces you into their proprietary, black-box models and constrains your options for the future.
Today, we are taking a break from opinions to focus on providing you a step-by-step guide on integrating OpenAI in xDM in just five minutes.
Let’s begin!
1. Get an OpenAI API Key
Login or create an account with OpenAI, then go to your account page to create an API Key. Copy this API Key.
2. Create a ChatGPT REST Client
Create a new Rest Client, named ChatGPT, with the following parameters.
Leave the other parameters as is.
TIP: You can copy and paste the REST Client code below and configure the HTTP Headers with your API Key.
3. Create an HTTP Request
Use the code below to create an HTTP Request we can call with our xDM enricher.
- Method: POST
- URL: https://api.openai.com/v1/completions
- HTTP Headers (make sure to use your API Key here):
Content-Type:application/json
Authorization:Bearer YOUR_API_KEY - Body:
{
“model”: “gpt-3.5-turbo”,
“prompt”: ${Prompt},
“max_tokens”: 4000,
“temperature”: 1.0
}
NOTE: See the OpenAI API Reference for more details about the models and various parameters you can use in your request.
4. Detect Prompt Inputs and Format Prompt Outputs
For Inputs: In xDM, use the Detect Inputs button to create the Prompt Input.
For Outputs: Create the following output, leaving all other properties as is.
- Name: Response
- Value Selector: $.choices[0].text
Your REST Client definition should look like the picture below.
5. Testing the OpenAI REST Client in App Builder
To test your REST Client, you can use a simple prompt for the input value, such as “Define Master Data.”
If configured correctly, the output response should return a value using the API request from OpenAI – similar to the screenshot below.
Using the OpenAI REST Client in xDM
In xDM, define an enricher using this REST Client. Be as specific as possible in your prompt to produce the best results. In the example below, we want to leverage OpenAI inside our Product Retail MDM sample model.
We want ChatGPT to help us generate the Description attribute of the product from the Name attribute using the following prompt:
‘Describe ‘ || Name || ‘ in 20 words’
You can now use this enricher in your xDM data model or applications.
Voila!
It took five minutes to easily integrate OpenAI’s ChatGPT capabilities into xDM. That is the power of our open, constructive architecture that enables you to leverage any AI/ML solution.
Live Example of ChatGPT Inside xDM
Here is an example using ChatGPT’s generative AI capabilities to automatically create product descriptions to augment your users’ MDM workflow.
Five Minutes to Leverage State-of-the-Art AI/ML Capabilities in xDM
You can see how simple it is to leverage leading AI/ML capabilities like ChatGPT with Semarchy xDM. With our open, constructive architecture, you have complete flexibility to choose whatever AI/ML capability best fits your use case.
That is why this is the leading approach to leveraging AI/ML to augment your MDM needs.
However, even if we make it incredibly easy to integrate AI/ML capabilities into your MDM, overcoming the other obstacles to implementing AI is not as simple.
In our final blog, we will come even closer to reality and provide you with the best practices on how to overcome these challenges so you can accelerate your AI ambitions today.
If you are itching to get started and need the most recommended and trusted data leader as your partner, we would love to chat.
-FX