Large language models improve business API calls with process knowledge

Grounding LLM Agents in Business Processes: Process-Aware Knowledge Graphs for Reliable Multi-Step Service Invocation

Artificial IntelligenceSoftware Engineering

Summary

Calling business software correctly is tricky because apps must follow specific steps and use exact keys and codes. The authors created a way to teach language models about these rules by linking business process maps and API details into a graph. This helps the models pick the right steps and data to call services reliably. Their tests show this method works better than older ones, especially on complicated multi-step tasks.

What this means in practice

  • For enterprise software engineers: Enable AI assistants to reliably automate complex sequences of enterprise API calls by using knowledge of business process order and data constraints.
  • For platform developers: Build API management systems that integrate process-aware metadata to improve automated service discovery and invocation accuracy.

Authors

Saiful Khan, Afrah Farea

Abstract

Large language model (LLM) agents that call enterprise APIs must select the correct endpoints, follow process order, use valid payload keys, and choose coded values from predefined lists. However, current retrieval-augmented service discovery treats endpoints independently and therefore misses process and schema constraints. We address this limitation by integrating Open Data Protocol (OData) metadata and Business Process Model and Notation (BPMN) reference processes in a typed property graph. A hybrid retriever identifies candidate endpoints using dense embeddings and follows process edges to retrieve subsequent endpoints. We evaluate the method on 42 enterprise services with process-chain ground truth. For queries with low lexical overlap between the query and downstream entities, it improves Recall@3 by 5.7 points (n=74), with consistent gains across embedding models and cut-offs. It matches dense retrieval on other queries and provides no improvement on OpenAPI services without a process layer, indicating that the gains arise from process structure. We also evaluate an LLM agent on 81 multi-step queries. It completes 38.7% of tasks, compared with 10.3% for a chunk-based baseline. In an elicitation probe, providing valid code lists eliminates invented codes but leaves invalid keys in 46% of write runs. Full typed context reduces invalid calls to 3% (3 of 101 runs), with no invented codes. These results show that exposing process and schema constraints during retrieval improves the reliability of agent-driven API calls.