Hana Power Engines: Graph and Vector


Deterministic ERP versus Stochastic AI Agents
The need to deploy both a vector engine and a graph engine in parallel on the SAP HANA database platform stems from the fundamental architectural discrepancy between stochastic artificial intelligence and deterministic enterprise software.
A modern ERP system like S/4 HANA requires absolute precision, traceable audit compliance, and fixed accounting relationships in the transactional general ledger. In contrast, large language models (LLMs) operate probabilistically based on statistical probabilities. The isolated use of generative language models inevitably leads to “hallucinations” in day-to-day business operations, because a pure LLM understands neither the complex relational schema consisting of tens of thousands of tables nor the dynamic real-time relationships.
Retrieval-Augmented Generation
This is where the Hana Cloud Vector Engine comes in: it stores vectors natively across data types and compares them using mathematical distance metrics such as cosine similarity or Euclidean distance. Vectors map unstructured data—such as invoices, free-text entries, product catalogs, support tickets, or logs—into multidimensional vector spaces using embedding models.
The Vector Engine thus serves as a mathematical similarity filter for classic Retrieval-Augmented Generation (RAG): When a query is made, it extracts semantically related text fragments as top-K results in real time and passes them on as grounding context to the AI co-pilot Joule or to language models.

Taken on its own, however, the vector model falls short when it comes to relational business rules because it merely maps statistical word and text proximity but cannot resolve business dependencies such as the chain from purchase requisition through goods receipt to invoice verification.
SAP Knowledge Graph
For this reason, SAP absolutely requires the HANA Graph Engine, which is based on mathematical graph theory and forms the technical foundation for the SAP Knowledge Graph within the Business Data Cloud (SAP BDC). The Graph Engine does not model business data in multidimensional vector spaces or rigid SQL table rows, but rather as an explicit relationship network of nodes and edges based on ontologies and W3C standards such as RDF and SPARQL.
The Knowledge Graph links the complex relational S/4 data model—comprising over seven million data fields—with semantic process logic. It essentially provides language models (LLMs) and autonomous AI agents with the business data model (ontology) and a semantic compass by precisely defining what a customer order, a company code, or a vendor master record means and how these entities relate to one another. Only these explicit relationship models enable systems to draw logical conclusions across domain boundaries and effectively prevent erroneous AI hallucinations in the transactional core.
GraphRAG as a Way Out of AI Hallucinations
For existing SAP customers, the true added value stems from the synergistic fusion of both worlds in what is known as GraphRAG. Autonomous AI agents, which are designed to independently execute workflows in procurement, supply chain management, or financial closing, require both probabilistic intuition and deterministic guidelines.
While the Vector Engine enables the agent to process unstructured natural-language queries, semantically search relevant documents, and clean up noisy customer master data through clustering and duplicate detection, the Graph Engine provides the complete execution context and data history (lineage).
For example, if an agent needs to determine which base table underlies a specific CDS view or which approval matrix applies to a critical procurement contract, the agent navigates deterministically along the edges of the knowledge graph. This creates a reliable basis for decision-making, ensuring that the agent operates strictly within the framework of established authorizations and compliance requirements.
The Hana Multi-Model Platform
The architectural strength of the HANA database platform lies in the fact that it is designed as an integrated multi-model platform. Instead of having to operate and synchronize separate, specialized database silos—such as external vector databases or standalone graph systems—for relational transactional data, vector searches, and knowledge graphs, HANA consolidates relational SQL tables, graph objects, and vector data onto a single in-memory platform. This enables hybrid queries in which relational enterprise filters (such as company codes, clients, or authorizations) can be combined directly in the same SQL statement with the cosine similarity of the Vector Engine and linked to path analyses from the Graph Engine. This eliminates error-prone ETL data replication, reduces latency, and ensures that the ERP system’s security and authorization architecture is maintained at the database level.
Added Value for Existing SAP Customers From a critical perspective, however, existing customers must not overlook the fact that SAP is marketing these established standard mathematical methods—such as Euclidean distance or graph matrices —as an exclusive “cloud revolution” in its marketing to push customers toward expensive subscription models and the Business Data Cloud. Since the HANA Vector Engine and the Knowledge Graph are primarily provided as cloud services on SAP BTP, users face the risk of a significant cost trap due to usage-based Capacity Units and the relentless expiration of prepaid credit allocations. Experienced IT decision-makers should therefore leverage the technical advantages of vector and graph engines specifically to master RAG and agentic AI, while simultaneously ensuring, through open interface standards such as the Model Context Protocol (MCP), that their own semantic data architecture does not result in an irreversible vendor lock-in.




