Run Natural Language Queries From Any Oracle ERP Application

Run natural language queries (NLQs) from Oracle E-Business Suite, PeopleSoft, and JD Edwards EnterpriseOne by using an AskFinance natural language solution, built natively on Oracle Cloud Infrastructure.

As finance teams worldwide struggle to keep pace with ever-increasing volumes of financial transactions, natural language queries are quickly becoming a company’s linchpin of faster, better-informed decisions. A key capability of NLQs is that they make it easy for any authorized user to run queries, answer tough questions, and positively impact revenues, profits, and earnings in ways previously not possible.

Because NLQs are designed to use large language models (LLMs) to answer queries, authorized users can simply ask their questions using garden-variety speech, voice, or text. And, because NLQs don’t require IT experts to code and decode database-specific query languages, non-technical staff can now analyze data and produce business-critical insights on demand.

Running NLQs has never been easier with an AskFinance solution, built natively on Oracle Cloud Infrastructure. With Oracle AskFinance, both technical and non-technical employees can run queries, enabling them to instantly fetch and analyze their company’s finance data. By using a chatbot interface from Oracle Digital Assistant (ODA), all authorized users can ask questions about the status of their company’s account payables (AP), account receivables (AR), or general ledger (GL) without having to log a query development service request, wait for support, or burden an oversubscribed IT staff.

By connecting an Oracle Autonomous Database, Oracle Cloud Infrastructure GoldenGate, Oracle Cloud Infrastructure Cache with Redis, and Oracle Cloud Infrastructure Generative AI to your company’s ERP applications, your finance teams can immediately spot trends, predict outcomes, and plan actions from vast troves of new and aging data hidden within your Oracle E-Business Suite, PeopleSoft, and JD Edwards EnterpriseOne systems.

Highlights of this solution include:

  • Provides immediate business value: This solution democratizes data access, empowering non-technical users to leverage data effectively, while simultaneously freeing up technical teams from routine reporting tasks, allowing them to focus on more critical priorities.
  • Leverages generative AI in a meaningful way: Many organizations struggle to find meaningful ways to adopt AI and machine learning (ML) because of both use-case and skill-set considerations. This solutions provides real value and reduces the skill-set barriers to AI/ML adoption.
  • Works with flexible data sources: This solution works seamlessly with virtually any structured data source and with data from on-premises or cloud-based systems. This pattern is also highly adaptable, making it easy to extend its compatibility to multiple data sources.
  • Leverages Open LLM: This approach leverages an open-source NL2SQL model specifically designed for SQL generation. You can effortlessly swap in different or improved models as the technology continues to evolve, ensuring continuous optimization.

Replay the Webinar

Replay the webinar:

Architecture

A best-practice architectural design for deploying a natural language query (NLQ) should provide finance teams with the same exceptional performance when applied to any application, database, or other data source.

For finance teams to assess, analyze, and report on their company’s financial data, Oracle recommends deploying an Oracle Autonomous Database to first read financial data sourced from an ERP application. Although Oracle recommends using the Autonomous Database, you can use any relational database.

You can use Oracle Digital Assistant to handle natural language queries, or you can create a custom chatbot by using tools such as Oracle APEX Application Development (APEX) or an open-source application development tool, such as StreamLit.

Oracle Cloud Infrastructure Generative AI allows you to either fine-tune or host your own large language models (LLM). Alternatively, you can use the out-of-the-box large language models offered in OCI Generative AI, such as Cohere, and Llama.

For hosting the model, you can run a GPU instance on bare-metal or virtual machines or you can use a dedicated cluster from OCI Generative AI.

The following diagram illustrates the architecture:



askfinance-nlq-erp-process-oracle.zip

The architecture has the following components:

  • Tenancy

    A tenancy is a secure and isolated partition that Oracle sets up within Oracle Cloud when you sign up for Oracle Cloud Infrastructure. You can create, organize, and administer your resources in Oracle Cloud within your tenancy. A tenancy is synonymous with a company or organization. Usually, a company will have a single tenancy and reflect its organizational structure within that tenancy. A single tenancy is usually associated with a single subscription, and a single subscription usually only has one tenancy.

  • Region

    An Oracle Cloud Infrastructure region is a localized geographic area that contains one or more data centers, called availability domains. Regions are independent of other regions, and vast distances can separate them (across countries or even continents).

  • Availability domain

    Availability domains are standalone, independent data centers within a region. The physical resources in each availability domain are isolated from the resources in the other availability domains, which provides fault tolerance. Availability domains don’t share infrastructure such as power or cooling, or the internal availability domain network. So, a failure at one availability domain shouldn't affect the other availability domains in the region.

  • Virtual cloud network (VCN) and subnets

    A VCN is a customizable, software-defined network that you set up in an Oracle Cloud Infrastructure region. Like traditional data center networks, VCNs give you control over your network environment. A VCN can have multiple non-overlapping CIDR blocks that you can change after you create the VCN. You can segment a VCN into subnets, which can be scoped to a region or to an availability domain. Each subnet consists of a contiguous range of addresses that don't overlap with the other subnets in the VCN. You can change the size of a subnet after creation. A subnet can be public or private.

  • Route table

    Virtual route tables contain rules to route traffic from subnets to destinations outside a VCN, typically through gateways.

  • Security list

    For each subnet, you can create security rules that specify the source, destination, and type of traffic that must be allowed in and out of the subnet.

  • Compute

    The Oracle Cloud Infrastructure Compute service enables you to provision and manage compute hosts in the cloud. You can launch compute instances with shapes that meet your resource requirements for CPU, memory, network bandwidth, and storage. After creating a compute instance, you can access it securely, restart it, attach and detach volumes, and terminate it when you no longer need it.

  • OCI GoldenGate

    Oracle Cloud Infrastructure GoldenGate is a managed service providing a real-time data mesh platform, which uses replication to keep data highly available, and enables real-time analysis. You can design, execute, and monitor your data replication and stream data processing solutions without allocating or managing compute environments.

  • Autonomous Database

    Oracle Autonomous Database is a fully managed, preconfigured database environments that you can use for transaction processing and data warehousing workloads. You do not need to configure or manage any hardware, or install any software. Oracle Cloud Infrastructure handles creating the database, as well as backing up, patching, upgrading, and tuning the database.

  • Cache with Redis

    Oracle Cloud Infrastructure Cache with Redis is a comprehensive, managed-in-memory caching solution built on the foundation of open source Redis. This fully managed service accelerates data reads and writes, significantly enhancing application response times and database performance to provide an improved customer experience.

  • Digital Assistant

    Oracle Digital Assistant is a platform that allows you to create and deploy digital assistants for your users. With Oracle Digital Assistant, you can create AI-driven interfaces (or chatbots) for business applications through text, chat, and voice interfaces. Each digital assistant has a collection of one or more specialized skills, to help users complete a variety of tasks in natural language conversations. For example, an individual digital assistant might have skills that focus on specific types of tasks such as tracking inventory, submitting time cards, and creating expense reports.

Deploy

Use the following high-level steps to deploy the architecture.

  1. Provision Oracle Cloud Infrastructure GoldenGate to read financial reporting data in real-time from an Oracle E-Business Suite, PeopleSoft, JD Edwards EnterpriseOne, or other financial data source​. OCI GoldenGate provides real-time capture, transformation, routing and delivery of your database transactions across different applications. In addition, the certified configuration of Oracle E-Business Suite with GoldenGate 19c (and later) also provides a unidirectional method of replicating the source Oracle E-Business Suite database to a remote, target Oracle database, which can be used for operational reporting.
  2. Deploy Oracle Autonomous Data Warehouse to summarize and persist your financial data. Not only will Autonomous Database enable your finance teams to rapidly uncover underlying drivers of profitability, Autonomous Database can also help companies improve the way they use working capital, control business expenditures, and more.
    1. Choose shared or dedicated deployment options based on your hardware setup. Deployment options include support for Oracle Exadata Database Service on Cloud@Customer, OCI Dedicated Region, and multi-cloud.
    2. Use autoscaling to maintain continuity during traffic spikes and other fluctuations that impact workload volumes.
  3. Provision Oracle Digital Assistant (ODA) to support chat and voice interfaces with advanced natural language processing that surpasses simple chatbots. Use ODA to easily and securely connect to any application and data source by using simple REST services or by using Oracle Integration. The architecture shown here uses the REST capabilities of ODA.
  4. Create a Linux OCI compute instance to host the python app and an NVIDIA GPU instance to host the large language model (LLM – NL2SQL Model, such as SQL coder-7B-2).
  5. Set up the Oracle Cloud Infrastructure Cache with Redis to maintain the chat history and to cache the previously generated SQL queries to boost performance. ​
  6. Implement a large language model from the OCI Generative AI to enrich the user provided question (intent) with additional context.

Acknowledgments

  • Authors: Raj Arora, Raja Vijjapu
  • Contributors: Sasha Banks-Louie, Patrick Shepherd, Robert Lies