BlogBlogA post on somebody's own site or a community platform. Nobody edits it after publication, so it dates from the day it was written.See every one →SAP Community
Semantic search in CAP (Node.js): vector embeddings and cosine similarity
Finding the best semantic match for a prompt inside an entity, using local vector embeddings and cosine similarity — and the finding the author leads with is that it works without a vector database at all. Reported as experiments rather than as a pattern, which is the honest register for it: the interesting claim is how little infrastructure the simple case needs.
Where it sits
Explains
Retrieval-augmented generationRetrieval-augmented generationGrounding a model's answer in data retrieved at question time: text split into chunks, each chunk embedded as a vector, and the chunks nearest to the question placed into the prompt. Semantic search is the same retrieval with a person reading the matches, and fine-tuning changes the model's weights, not its input.SearchSearchFree-text search across an entity and its compositions, pushed into the database rather than filtered in the service. Declared search, database similarity search and filtering in application code are often lumped together.
Source
reachable
Who is behind it
Nico SchoenteichNico SchoenteichWrote this
In the atlas: maintains 3, contributes to 16, wrote 3@nicoschoenteichauthor
In the atlas: maintains 3, contributes to 16, wrote 3@nicoschoenteichauthor
Properties
About this work
What was found on the page
Prose
792 words
Code blocks
5
Repository links
1
Group by24 of 24 pieces
Piece, what it offersStill applies
CAP in the age of AI #7 - vector embeddings wrap-upCAP in the age of AI #7 - vector embeddings wrap-upThe same embeddings model taken from SQLite to SAP HANA Cloud, then handed to an agent. Locally it is @cap-js/ai that adds the vector functions SQLite lacks and downloads an all-MiniLM L6v2 ONNX model on first start; on HANA natural language processing has to be switched on, the model name is a mandatory argument, the vectors it returns are 768 dimensions, and dimensions must match on both sides of a comparison. HANA itself can be given SAP AI Core as a remote source for other embedding models, which a CDS.ql expression has to inject because the postfix notation only takes what the CDS model holds, and the hour ends with a search function over cosine similarity exposed over @cap-js/mcp, so an agent asked about low output from solar panels calls semantic search instead of writing the query itself.published 2026-10-16
CAP in the age of AI #6 - vector embeddingsCAP in the age of AI #6 - vector embeddingsVector embeddings put to work in the incident management sample, answering whether this problem has been seen before. An embedding element of type Vector is calculated and stored from the vector_embedding function, so the database refreshes it whenever the text behind it changes, and cosine_similarity compares it with a freshly embedded string; because a title says little, a scheduled action first summarises each incident's conversation through a model on SAP AI Core and the embedding is taken from that summary. The similar-incidents list is a view joining incidents to themselves, with order and limit set in a before handler on the expanded query, and the vector element excluded from the service, since OData knows nothing about vectors — on SAP HANA Cloud the function is native, while SQLite needs packages added to the project.published 2026-10-09
🟣 Bring AI into Your ABAP Applications with ISLM: Build, Integrate, and Consume AI Natively🟣 Bring AI into Your ABAP Applications with ISLM: Build, Integrate, and Consume AI NativelyDevtoberfest 2026 session AI-11, from the product manager and product owner of Intelligent Scenario Lifecycle Management: ISLM as the place an AI use case is registered, deployed and operated inside an SAP S/4HANA system, and what has been added to it for generative AI. The demo builds a custom scenario end to end — an intelligent scenario of type generative AI, a connection to SAP AI Core, a GPT-5 mini model, an orchestration flow template that configures data masking, input and output filtering and translation into the user's logged-in language, then prompts with a grounding query over five companies' return-policy documents — and consumes it from an ABAP report through the ABAP AI SDK, which calls the orchestration API and returns the summary as JSON. Two newer pieces follow: SAP RPT, the relational pre-trained transformer for tabular prediction, called with context rows and query rows and answering with a confidence value and no training step; and system-triggered agents, where an application job in the ABAP system starts a billing-creation agent that reaches S/4HANA OData APIs as tools through the agent gateway with principal propagation. The closing availability matrix states the generative AI capabilities for on-premise and private cloud from the 2021 release, with SAP notes to implement on lower ones.SAP Developers, published 2026-09-24
CAP in the age of AICAP in the age of AISeven live episodes of Hands-on SAP Dev in which DJ Adams works through CAP's AI features with the people who build them, each one a screen-share against a sample project. The first three are @cap-js/mcp: the @mcp annotation on a service, the describe, query and call tools, CQL as the query format, and what authorisation takes out of the tool list. From episode three the run moves to A2A and @cap-js/agents — human approval of an action, agents.md and skills, session persistence, telemetry and sub-agents — and the last two episodes are vector embeddings in CDS, local on SQLite and native on SAP HANA Cloud.published 2026-08-07
Building an SAP BTP Agent Architecture from Scratch: Python + CAP + HANABuilding an SAP BTP Agent Architecture from Scratch: Python + CAP + HANAA first-person build log of a Flask orchestrator on Cloud Foundry that reduces a question to keywords, searches a Node.js service's Documents entity, and passes what it finds to Claude for a grounded answer. Getting there means learning that HANA's fuzzy .search() matches one word but not a full sentence, fixed by splitting the query into terms and merging the per-term hits, and that provisioning SAP HANA Cloud hits a database-level free-tier quota rather than an HDI-container one, with a stopped instance needing to be resumed first. It also covers @sap/cds-dk needing to sit in dependencies rather than devDependencies, since Cloud Foundry's buildpack skips the latter, before cds deploy --to hana can run as part of the push.neilaspin, published 2026-07-28
Understanding Fuzzy Search in SAP Fiori ApplicationsUnderstanding Fuzzy Search in SAP Fiori ApplicationsExplains SAP HANA Enterprise Search's fuzzy, relevance-ranked matching behind Fiori's global search bar, its exact-match Search Query Syntax operators, and how a CAP CDS project on @sap/cds tunes the gap between them with @cds.search and @Search.fuzzinessThreshold, shown on a Contracts entity's contractNumber field. Raising the threshold to 0.95 narrows that field to near-exact matches for structured identifiers such as contract numbers, while an unset field keeps HANA's default (~80%) fuzziness for broader free-text discovery.Ruchi5, published 2026-07-27
Michael Jackson: AI Cognitive Pipeline on SAP BTP, SAP CAP, ElevenLabs, Claude, HANA DB, SolaceMichael Jackson: AI Cognitive Pipeline on SAP BTP, SAP CAP, ElevenLabs, Claude, HANA DB, SolaceA pipeline that listens to a song, identifies the historical events it references, retrieves knowledge about each and builds an emotional arc across the whole track. Not an enterprise use case, and useful precisely for that: the plumbing — CAP, HANA, Solace, Claude, ElevenLabs — is doing something the vendor demos never ask of it.Shahid, published 2026-05-18
A Use Case for HANA Cloud Knowledge Graph: AI‑Driven Tender AnalysisA Use Case for HANA Cloud Knowledge Graph: AI‑Driven Tender AnalysisMatching unstructured text against internal data, using both HANA engines at once — the Knowledge Graph for the relationships and the Vector Engine for similarity — with CAP holding the application and its data. Notes that the Knowledge Graph Engine is off by default and has to be enabled when the instance is created, which is the kind of thing that stops a weekend.giacomo_dantonio, published 2026-03-19
Building a Generative AI-powered Inventory Assistant with SAP CAP, RAG, and Vector DatabaseBuilding a Generative AI-powered Inventory Assistant with SAP CAP, RAG, and Vector DatabaseAn existing CAP stock application turned into a question-answering one, and the part worth reading is the schema: three tables, not one — the products, an archive of the text that was embedded, and a separate lookup table holding the vectors. Retrieval finds candidate products by similarity and then reads the real rows, so the answer is grounded in records rather than in the embedded text.furkan5, published 2025-11-07
Generative AI on SAP BTPGenerative AI on SAP BTPThe reference shape for a generative AI application on BTP: a CAP backend, SAP HANA Cloud holding data and embeddings for similarity search through its vector engine, and the Generative AI Hub in SAP AI Core as the single access point to foundation models. It shows retrieval-augmented generation on that stack and names the CAP plugins and SDKs that connect the pieces, for both Cloud Foundry and Kyma.published 2025-09-02
Generative AI on SAP BTP
LLM integration changed in @cap-js/ai 1.0.0, 2026-04-28. Affects A reference.
Multi-modal RAG Proof of Concept: facilitating tech supportMulti-modal RAG Proof of Concept: facilitating tech supportA report on a customer proof of concept rather than an implementation guide — there is no code in it. The reason it is here is the architecture paragraph: CAP holds the backend and the use-case logic, the LLM plugins and the SAP Cloud SDK for AI sit inside it, and gpt-4o is one of two nodes in a small langgraph. It opens with a disclaimer that SAP's own Grounding service is due to gain multi-modal features, which dates the whole thing on purpose.maxlienhardt, published 2025-06-03
Out-of-the-Box Document Grounding in SAP AI Core: RAG with SAP Help PortalOut-of-the-Box Document Grounding in SAP AI Core: RAG with SAP Help PortalWalks through SAP AI Core's document grounding: a default 'help.sap.com' data repository that is already grounded, queried either directly through /retrieval/search after labelling a resource group for grounding, or through the orchestration service's grounding_module_config paired with llm_module_config and templating_module_config to inject the retrieved chunks into a prompt. Shows the orchestration service as a unified interface for swapping LLM providers by changing a configuration parameter rather than application code.Joni, published 2025-04-15
HANA Cloud’s VECTOR EMBEDDING in CAP and Comparison with OpenAI EmbeddingHANA Cloud’s VECTOR EMBEDDING in CAP and Comparison with OpenAI EmbeddingTwo ways to produce the same embedding, run side by side: HANA Cloud's own VECTOR_EMBEDDING function against Azure OpenAI through the CAP LLM plugin. The CDS side is short — an element of type cds.Vector maps to REAL_VECTOR on deploy — so what remains is the comparison, which is the thing you cannot get from either product's documentation alone.lalitmohan, published 2025-04-09
Using HANA Cloud’s "VECTOR_EMBEDDING" Function in CAPUsing HANA Cloud’s "VECTOR_EMBEDDING" Function in CAPEmbeddings generated inside the database rather than fetched from AI Core or an external model — a Q4 2024 HANA Cloud function, used from CAP. The shift it describes is where the embedding step lives, which changes what has to be deployed and what has to be called.published 2025-03-02
RAG with SAP HANA Cloud Vector Engine, GenAI Hub & CAPRAG with SAP HANA Cloud Vector Engine, GenAI Hub & CAPThe end-to-end version: a CAP service exposing the vector engine and the AI hub behind a couple of endpoints, answering where a CodeJam is on a given date. It has aged in a way the author has marked in the page itself — the section on the CAP LLM plugin now carries "(Outdated)" in its own heading — so read the embedding preparation and the retrieval shape, and check the plugin part against the package.KevinR, published 2024-05-21
[Part – 2] Enrich CAP based Services with Behaviors using Annotations[Part – 2] Enrich CAP based Services with Behaviors using AnnotationsThe second half of a two-part walkthrough of CAP's behavioral annotations, following on from access control and input validation in the first part. This post works through @cds.autoexpose, @cds.api.ignore, @cds.persistence.exists/skip, @cds.on.insert/@cds.on.update and the @odata.Type/@odata.singleton mapping overrides, all shaping how a CDS model is projected into a service, which is data modelling. Alongside these it covers @cds.query.limit for default and maximum page sizes (pagination and streaming), @odata.etag with exclusive and shared locks for optimistic concurrency (concurrency control), and @cds.search for scoping $search to chosen elements (search), each with a CDS code example.published 2023-01-29
Case-insensitive filters in Fiori Elements (List report + CAP)Case-insensitive filters in Fiori Elements (List report + CAP)A blocker rather than a feature: filters on a List Report are case-sensitive, the business wanted them not to be, and the CAP backend is where it gets fixed. Node and Java both.Kishannaicker, published 2022-04-26
Improved Search Performance in SAP BTP Core, SAP Cloud Application Programming Model, Node.js RuntimeImproved Search Performance in SAP BTP Core, SAP Cloud Application Programming Model, Node.js RuntimeExplains CDS version 5's @cds.search annotation, which lets a service declare which elements a search query covers, and states that only String-typed elements are searched by default so the generated SQL stays simple. Covers two further changes to @sap/cds's Node.js runtime: metadata about which elements are searchable is now cached, and search over localized text can resolve at query time instead of through a compiled view, avoiding a coalesce function that blocks filter push-down on SAP HANA. Also describes an experimental toggle, cds.env.features.optimized_search, that lets the runtime choose the CONTAINS predicate over LIKE for large data sets.published 2021-08-18
Document GroundingDocument GroundingDocument Grounding is a managed retrieval-augmented-generation service under the Generative AI Hub on BTP, which SAP's page on SAP AI Core places inside that service: it ingests documents from Amazon S3, SharePoint, SAP Document Management Service, SAP Work Zone or an SFTP server, and handles chunking, embedding and retrieval itself, refreshing content automatically when a source document changes. The page states this managed path is recommended for most enterprise scenarios because it covers the whole lifecycle end to end, and offers a separate Document Grounding Vector API for data that is already chunked and embedded, for cases that need finer control over chunking and metadata.
Vector RAG vs Graph RAGVector RAG vs Graph RAGA section introduction rather than the comparison itself: it states that the choice between Vector RAG and Graph RAG depends on the domain and the task, and that Vector RAG is the one to use when the subject area has a clear description and the model must be held to specific data structures and attribute values. The four sub-pages it introduces, two on vector-based and two on graph-based RAG, carry the comparison. It sits on the same retrieval question retrieval-augmented generation answers, without naming CDS, CAP or a store.
Conversational search for the Cloud Integration capabilityConversational search for the Cloud Integration capabilityCloud Integration content becomes searchable in natural language through three architectures SAP's abstract names: MCP servers, retrieval-augmented generation and knowledge graphs, set against the work of analysing and governing a growing SAP Integration Suite tenant. The abstract names the three and does not say which is built or how they compare. A TechEd 2026 session (Tuesday 27 October, Berlin), presented by Vadim Klimov, written here from SAP's abstract; the recording is not yet published.
Building agentic applications with SAP HANA CloudBuilding agentic applications with SAP HANA CloudA CAP application extended with semantic search and agent features on top of SAP HANA Cloud's vector engine and SAP AI Core, built in a hands-on workshop. The abstract names the parts, CAP, the vector engine and AI Core, and the two additions: semantic search, the retrieval half of retrieval-augmented generation, and LLM-supported agent capabilities inside the application, which is agent tooling. Which embedding model, which CAP runtime and how the agent calls its tools are not stated. A TechEd 2026 session (Thursday 29 October, Berlin), presented by Hui Li, Ritty Joseph, Shraddha Shetty and Tanuja Jadhav, written here from SAP's abstract; the recording is not yet published.
Quick tip: event/task scheduling in CAP Node.js (in alpha state)Quick tip: event/task scheduling in CAP Node.js (in alpha state)A note on something spotted in capire's May 2025 release notes rather than a technique: CAP Node.js is to support scheduling events — actions and functions included — with callbacks, currently alpha and explicitly subject to change. Useful as a dated marker of the core moving into ground the community has been covering, and the alpha caveat is the point rather than a footnote.published 2025-10-30
SAP Tech Bytes: Using the SAP Approuter at dev time - a full-stack journey with UI5 and CAPSAP Tech Bytes: Using the SAP Approuter at dev time - a full-stack journey with UI5 and CAPGetting UI5 Tooling and the CAP server onto one port under one command, using cds-plugin-ui5 — which the post presents as the thing that removes the proxy and destination configuration a full-stack dev setup otherwise needs. Part one of a journey that goes on to put the approuter in front at development time.published 2023-10-13
SAP Tech Bytes: Using the SAP Approuter at dev time - a full-stack journey with UI5 and CAP
cds-plugin-ui5 has been through 11 major lines since this was published, most recently 0.15 (2025-11), 0.16 (2025-12), 0.17 (2026-03). Affects Runnable code.
Details
Graph
Retrieval-augmented generationcapability, core and community
Searchcapability, core and community
SAP Communitypublishing source
SAP Communitycap-tag
Source
Type
blog
Published on
Host
community.sap.com
Discovered via
First seen
History
- Entered the atlasDiscovered via SAP Community · cap-tag.
For your agent
- Ref
content:semantic-search-in-cap-nodejs-vector-embeddings- JSON
- /content/semantic-search-in-cap-nodejs-vector-embeddings.json
- MCP
- Connecting an agent