Hybrid Grounding on HANA Cloud — Vector Engine + Knowledge Graph Engine
As of 2026-09-27
What is Hybrid Grounding on HANA Cloud?
Vector search finds what is similar; a knowledge graph knows what is connected. SAP HANA Cloud offers both in one database — REAL_VECTOR/HALF_VECTOR columns, VECTOR_EMBEDDING, HNSW indexes and CROSS_ENCODE re-ranking on one side, an RDF triple store queried with SPARQL_TABLE on the other — so an agent can traverse relationships in the graph, aggregate facts in SQL and pull supporting text by similarity, without moving data between stores.
Why one grounding technique is not enough
SAP's own Knowledge Graph lesson on SAP Learning lists the limits of naive vector RAG: it overlooks relationships between entities, and LLMs struggle with enterprise formats, hierarchies and domain knowledge. The remedy SAP names is to combine GraphRAG with vector-based RAG over business data in SAP HANA and Datasphere. A July 2026 SAP community series building a knowledge-graph agent on BDC data products puts it in one line: vector databases help AI find things that are similar; knowledge graphs help AI understand how things are connected. Take the question "if work center Z_ASM3 goes down, which customers are affected and what revenue is exposed?" — no similarity search follows the chain work center → product → sales order → customer, and no graph should sum revenue.
Why it matters
- Relationship questions (which customers are hit if a work center fails) cannot be answered by similarity search; aggregations should not be done in a graph.
- HANA Cloud runs vector search, SPARQL and SQL in one engine, so results are merged in the database rather than by the LLM.
- Approximate HNSW indexes, embedding model choice and cross-encoder re-ranking directly change which evidence the agent sees.
Key points
- Vectors find similar; graphs know connected — combine GraphRAG and vector RAG (SAP Learning).
- REAL_VECTOR / HALF_VECTOR, dimension 1–65,000; no row tables, no ordering, not a partition key.
- Similarity: COSINE_SIMILARITY and L2DISTANCE; in-database embeddings with VECTOR_EMBEDDING (NLP service).
- Documented models: SAP_NEB.20240715 and SAP_GXY.20250407 (768 dimensions).
- HNSW index only: M 64, efConstruction 128, efSearch 256 by default; build ONLINE; NO_VECTOR_INDEX for exact search.
- CROSS_ENCODE with SAP_CER.20250701 re-ranks top candidates.
- Knowledge graph engine: SPARQL_EXECUTE, SPARQL_TABLE, SQL_TABLE; federation with SQL and vector engines.
- Pattern: master data in the graph, transactions in SQL over BDC data products (virtual tables), text via vectors.
Terms used on this page
- HNSW
- Hierarchical navigable small world: the approximate nearest-neighbour index type supported by HANA Cloud vector columns.
- efSearch
- HNSW search parameter: candidates collected per top-k query; higher raises recall and query time.
- Cross-encoder
- Model that scores query and passage together; used by CROSS_ENCODE to re-rank vector search results.
- GraphRAG
- Retrieval that follows explicit relationships in a knowledge graph to assemble context for an LLM.
- Competency question
- Business question a knowledge graph must answer; drives ontology design and serves as a test case.
- SHACL
- W3C language for validating RDF graphs against shapes (mandatory properties, types).
- Virtual table (BDC data product)
- HANA Cloud access path to a BDC data product shared to the instance, without a customer-built ETL pipeline.
Sources
- SAP Learning — Exploring SAP Knowledge Graph (452,000 ABAP tables, 80,000 CDS views, 7.3 million fields)
- SAP Community — Knowledge Graph Agent on SAP HANA Cloud Series, Part 1: Why Knowledge Graph for SAP Data (Jul 2026)
- SAP Help — Vector Engine Guide: REAL_VECTOR and HALF_VECTOR Data Types (QRC 3/2026)
- SAP Help — Vector Engine Guide: Using the VECTOR_EMBEDDING Function
- SAP Help — Vector Engine Guide: Creating Text Embeddings with NLP (SAP_NEB, SAP_GXY models)
- SAP Help — Vector Engine Guide: Embedding Text Values in Tables (generated columns, triggers)
- SAP Help — Vector Engine Guide: Creating Indexes on REAL_VECTOR and HALF_VECTOR Columns
- SAP Help — Vector Engine Guide: CREATE VECTOR INDEX Statement (HNSW, M, efConstruction, efSearch)
- SAP Help — Vector Engine Guide: Improving Search Results with a Cross-Encoder (CROSS_ENCODE)
- SAP Help — HANA Cloud Knowledge Graph Engine Guide: Connectivity Interfaces (SPARQL_EXECUTE, SPARQL_TABLE, SQL_TABLE), QRC 3/2026
- SAP Help — SPARQL Reference Guide: SPARQL SELECT Queries Using SPARQL_TABLE
- SAP News — Business AI Innovation Unveiled at SAP TechEd (Nov 2025): HANA Cloud knowledge graph engine auto-generation from metadata (Q1 2026)
- SAP Community — Converging Every AI Workload on a Single Database (SAP HANA Cloud, Sep 2026)
Full card available to members. What the full card adds: the full decision framework · the SAP vs Snowflake / Databricks / Fabric comparison · the common pitfalls and their fix · the cheat sheet · the architecture schemas · the code blocks · the facts worth quoting.
Guides that answer with this page
These guides cite this page as one of the sources their answer rests on.