Decision Management (ODM, ADS)

 View Only

Integrating ODM with Large Language Model - LangChain integration

By LAURENT GRATEAU posted Mon June 12, 2023 11:07 AM

  

The integration of GenAI with IBM Operation Decision Manager, in collaboration with the Langchain project, represents a game-changing milestone in the realms of decision management, and data analysis. By combining the generative capabilities provided by LLMs coming from OpenAI or Watsonx with the robust decisioning features of IBM ODM and the integration technology of Langchain, users can unlock a multitude of benefits that significantly enhance their decision-making processes. This integration offers a seamless and comprehensive solution for businesses aiming to harness the power of language generation for automating your business decisions.

In this article, we describe few investigations of what can be done with these new technologies.

What is LangChain ?

LangChain is a framework for developing applications powered by language models. The most powerful and differentiated applications will not only call out to a language model via an api, but will also:

  • Be data-aware: connect a language model to other sources of data
  • Be agentic: Allow a language model to interact with its environment

As such, the LangChain framework is designed with the objective in mind to enable those types of applications.

There are two main value props the LangChain framework provides:

  • Components: LangChain provides modular abstractions for the components neccessary to work with language models. LangChain also has collections of implementations for all these abstractions. The components are designed to be easy to use, regardless of whether you are using the rest of the LangChain framework or not.
  • Use-Case Specific Chains: Chains can be thought of as assembling these components in particular ways in order to best accomplish a particular use case. These are intended to be a higher level interface through which people can easily get started with a specific use case. These chains are also designed to be customizable.

Source code and videos are hosted in this public github

Here are some use cases for which we have prototyped this integration:

  1. Query an IBM ODM decision service trace in natural language: In this example, we will demonstrate how to query the execution of the Decision Service's data using natural language. This could include querying Key Performance Indicators (KPIs), metrics, or datasets.

  2. Invoke a decision service in natural language: In this example, we will utilize the LangChain OpenAPI Chain to interact with the "MiniLoan" decision service. By leveraging the dynamically generated Swagger API from the ODM Runtime, this integration will enable natural language interactions with the ODM product, all without requiring any changes to the product itself."

  3. Govern your Decision Automation projects in natural language: In this sample we aim to bring ODM Decision Center management features into a conversational user experience. We leverage Langchain and an LLM to provide a conversational UX to interrogate and act on the IBM ODM project repository. In this integration we reuse the Swagger REST API provided by IBM ODM Decision Center. The LLM brings natural its language processing for understanding and generating text, while LangChain offers chaining of prompts and the wrapping of any REST API in plain text, put together in the context of a bot conversation. 
    Diving in more details we utilize the [LangChain Swagger Agent API](https://python.langchain.com/en/latest/modules/agents.html).

0 comments
37 views

Permalink