{"ref":"capability:retrieval-augmented-generation","page":"/capabilities/retrieval-augmented-generation","json":"/capabilities/retrieval-augmented-generation.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"retrieval-augmented-generation","name":"Retrieval-augmented generation","domain":"ai-and-agents","ecosystems":["cap","abap","btp"],"universal":false,"description":"Grounding 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.","short":"Grounding a model's answer in data retrieved at question time","core_coverage":{"state":"core-and-community","assessed_at":"2026-09-27","relationship":"unassessed","what_core_does":"The Vector type is built into CDS and the vector functions are part of the query language: `vector_embedding` turns a text into a vector, `cosine_similarity` and `l2distance` compare two, so an embedding is an element of an entity and a retrieval is a `WHERE` clause. A `stored` calculated element persists a row's embedding and recomputes it whenever the row changes through CREATE or UPDATE. On [SAP HANA Cloud](artifact:btp-hana-cloud) the functions are the database's own; on SQLite and H2 `vector_embedding` is emulated with character-hash vectors for local testing, and [@cap-js/ai](artifact:cap-js-ai) makes that emulation semantic by running a local ONNX model instead.","where_it_stops":"At the vector. Which text of a record gets embedded, how a text too long for one embedding is split, how many rows go into the prompt and what the prompt says are written by hand in every entry here, and capire's guide documents no chunking. On [PostgreSQL](external:postgresql) capire states that CAP provides no built-in `vector_embedding`, so the embedding is computed in the application or by a custom database function, and the local embeddings in [@cap-js/ai](artifact:cap-js-ai) are declared experimental and intended for local development only.","note":"Both are present because the core answers the modelled half and the layer above it is written in every entry here. No source states why each stops where it does, so the relationship stays unassessed.","community_adds":"What the community adds is that layer above the vector. [cap-llm-plugin](artifact:cap-llm-plugin) folds the similarity search, the embedding and the model call into one retrieval method, and [@saptarishi/cds-plugin-vector-hana](artifact:saptarishi-cds-plugin-vector-hana) keeps a vector table in step with an annotated entity and declares the search and the ask as actions on it. [mi8y-cap-agents-aicore-vectorstore](artifact:mi8y-cap-agents-aicore-vectorstore) takes the other route and reaches an AI Core Document Grounding collection through the LangChain vector store interface, so the application stores no vectors.","sources":[{"url":"https://cap.cloud.sap/docs/guides/ai/embeddings","title":"CAP-native Embeddings, vector_embedding — capire","checked":"2026-09-21","quote":"Creates a vector embedding of the given `text` using the `embedding_model`."},{"url":"https://cap.cloud.sap/docs/guides/ai/embeddings","title":"CAP-native Embeddings, cosine_similarity — capire","checked":"2026-09-21","quote":"Computes the cosine of the angle between `vector1` and `vector2`, comparing the direction of the vectors."},{"url":"https://cap.cloud.sap/docs/guides/ai/embeddings#using-calculated-elements","title":"Vector Embeddings, Using Calculated Elements — capire","checked":"2026-09-21","quote":"Using `stored` calculated elements ensures that the embedding is persisted in the database, and recalculated whenever the source data changes through CREATE or UPDATE operations."},{"url":"https://raw.githubusercontent.com/cap-js/docs/main/guides/ai/embeddings.md","title":"CAP-native Embeddings, SQLite and H2 — capire, source on GitHub","checked":"2026-09-21","quote":"On SQLite and H2, the `vector_embedding` function is emulated using lexical character-hash vectors by default."},{"url":"https://raw.githubusercontent.com/cap-js/docs/main/guides/ai/embeddings.md","title":"CAP-native Embeddings, SQLite and H2 — capire, source on GitHub","checked":"2026-09-21","quote":"In CAP Node.js, the `@cap-js/ai` plugin makes the standard `sqlite` database generate semantic embeddings locally, without any external service."},{"url":"https://raw.githubusercontent.com/cap-js/docs/main/guides/ai/embeddings.md","title":"CAP-native Embeddings, SQLite and H2 — capire, source on GitHub","checked":"2026-09-21","quote":"It requires `@sap/cds` `^10.1` and `@cap-js/sqlite` `^3.1`, and is experimental and intended for local development only."},{"url":"https://cap.cloud.sap/docs/guides/ai/embeddings#postgresql","title":"Vector Embeddings, PostgreSQL — capire","checked":"2026-09-21","quote":"CAP provides no built-in `vector_embedding` implementation."},{"url":"https://cap.cloud.sap/docs/guides/ai/","title":"Native AI — capire","checked":"2026-09-27","quote":"CAP provides intrinsic support for integrating native AI capabilities, including the use of MCP services, CAP-level Agents, and Vector Embeddings."}]},"coverage_by_ecosystem":{"abap":{"state":"core-and-community","assessed_at":"2026-09-14","relationship":"unassessed","where_it_stops":"The released classes of the [ABAP AI SDK](artifact:sap-abap-ai-sdk) send a prompt to a language model and return the completion, and the classes SAP lists for it stop there. None of them stores an embedding or searches for the nearest one, so retrieval over ABAP tables is written beside the SDK.","note":"The completion call is SAP's, and [SAP AI Core](artifact:btp-ai-core) serves this door with Document Grounding over documents in a connected repository. The [ABAP AI SDK](artifact:sap-abap-ai-sdk) was checked only through SAP's cheat sheet, not through its help pages.","community_adds":"Retrieval over ABAP tables comes from community code such as [zvdb](artifact:oisee-zvdb) by [Alice V.](actor:oisee), a vector store written in ABAP that returns the document chunks for a prompt.","sources":[{"url":"https://github.com/SAP-samples/abap-cheat-sheets/blob/main/22_Released_ABAP_Classes.md","title":"ABAP cheat sheets — Released ABAP Classes, Generative AI","checked":"2026-09-14","quote":"ABAP classes available in the ABAP AI SDK powered by Intelligent Scenario Lifecycle Management for interacting with large language models (LLMs) in custom implementations"},{"url":"https://github.com/SAP-samples/abap-cheat-sheets/blob/main/30_Generative_AI.md","title":"ABAP cheat sheets — Generative AI","checked":"2026-09-14","quote":"Method calls that create an instance of the ISLM completion API, use a prompt as string, and retrieve the LLM answer"}]},"btp":{"state":"core-and-community","assessed_at":"2026-09-14","relationship":"unassessed","what_core_does":"Document Grounding, a managed service under the Generative AI Hub in [SAP AI Core](artifact:btp-ai-core): a connector to Amazon S3, SharePoint, SAP Document Management Service, SAP Build Work Zone or an SFTP server, and the service does ingestion, chunking, embedding and retrieval itself; a Vector API takes pre-chunked, pre-embedded data for the cases that want that control.","where_it_stops":"At documents in a connected repository. Records in your own database, the CDS entities this capability is named for, are not a grounding source; for those the vector column in [SAP HANA Cloud](artifact:btp-hana-cloud) and the pipeline hand-written on the CAP door are still the route.","sources":[{"url":"https://btp-ai-bp.docs.sap/docs/technical-view/generative-ai/rag/document-grounding","title":"Document Grounding — SAP BTP AI Best Practices","checked":"2026-09-14","quote":"SAP Document Grounding is a managed service offering under the Generative AI Hub on SAP Business Technology Platform (BTP)."},{"url":"https://btp-ai-bp.docs.sap/docs/technical-view/generative-ai/rag/document-grounding","title":"Document Grounding — SAP BTP AI Best Practices","checked":"2026-09-14","quote":"Once a data source is connected through one of the managed connectors, the service automatically handles document ingestion, chunking, embedding creation, and retrieval."}],"community_adds":"Community code works on the side the service leaves open: [sap-knowledge-pipeline](artifact:yassinbahri-sap-knowledge-pipeline) by [Yassin Bahri](actor:yassinbahri) turns records from an OData service or a HANA `SELECT` into chunked documents that carry the business key they came from."}},"framing_by_ecosystem":{"cap":{"name":"RAG on CDS","description":"Answering a question from your own data rather than from what a model remembers — embeddings stored beside the records they describe, and a similarity search that runs where the data already is."},"abap":{"description":"In ABAP the data is already in the system and the model is not. The [ABAP AI SDK](artifact:sap-abap-ai-sdk) reaches a language model through Intelligent Scenario Lifecycle Management, and embeddings and similarity search over ABAP tables are built beside it."},"btp":{"name":"Document grounding","description":"On this door the question is not how to embed your own records but which document store to point the service at. [SAP AI Core](artifact:btp-ai-core) connects a repository and answers from it, and [SAP AI Launchpad](artifact:btp-ai-launchpad) carries the Grounding Management app for the pipelines."}},"changed_in":[{"version":"CAP Java 4.9.0","date":"2026-04-23","what_changed":"Before this, the core's similarity function was HANA's alone, and turning text into a vector at query time meant calling SAP HANA's VECTOR_EMBEDDING directly rather than through a CQL function. CAP Java gained CQL.vectorEmbedding, which calls VECTOR_EMBEDDING for you, and CQL.cosineSimilarity / CQL.l2Distance now work — per capire — as 'Retrieval-augmented generation (RAG) with vector embeddings on all the four databases,' not just HANA. It ships Beta and CAP-Java-only; Node.js has no equivalent. CAP Java 4.9.0 reached Maven Central on 2026-04-23.","invalidates":"Guidance that the CAP-modelled similarity function only ever runs against HANA, or that turning text into a query-time vector always means a raw HANA call outside CQL — true for CAP Java before April 2026, not since. It does not touch Node.js, and it does not touch chunking or the embed-on-write pipeline, which is still every entry in this capability's own job.","source":{"url":"https://cap.cloud.sap/docs/releases/2026/apr26","title":"CAP Release April 26 — capire","checked":"2026-09-08","quote":"CAP Java now supports the VECTOR_EMBEDDING function via CQL.vectorEmbedding to generate vector embeddings from text data directly in SAP HANA."},"applies_to":{"ecosystems":["cap"],"flavors":["java"]}}],"history":[{"date":"2026-09-14","field":"id","from":"rag-on-cds","to":"retrieval-augmented-generation","reason":"Replaces rag-on-cds under a neutral id. The concern turned up outside CAP in this batch, and an id and a name that say CDS would be false on the ABAP, HANA and BTP doors; the CAP coverage and its changed_in entry are carried over unchanged, and the old name stays as CAP's local name."},{"date":"2026-09-14","field":"ecosystems","from":"cap","to":"cap, abap, hana, btp","reason":"oisee/zvdb answers it in ABAP with a vector search library written in ABAP. SAP-samples/teched2025-DA261 and SAP-samples/sap-genai-hub-with-sap-hana-cloud-vector-engine demonstrate it in SAP HANA Cloud, the second together with generative AI hub on BTP."},{"date":"2026-09-14","field":"ecosystems","from":"cap","to":"cap, btp","reason":"SAP AI Core's Document Grounding is the same concern, answering from your own documents instead of from what a model remembers, in a managed form on the BTP door; the CDS in the name is the CAP door's version of it."},{"date":"2026-09-17","field":"entry","from":"rag-on-cds and retrieval-augmented-generation","to":"retrieval-augmented-generation","reason":"Completed the intended consolidation: retained CAP framing, ABAP and HANA coverage, the detailed BTP document-grounding coverage and framing, and scoped normative relevance. Repointed relationships and retired the duplicate capability."},{"date":"2026-09-20","field":"core_coverage.where_it_stops","from":"HANA Cloud supplies the vector column and the similarity function, and CAP can model it, so the pieces exist in the core. What does not is anything that assembles them: chunking, embedding on write, and the retrieval step are hand-written in every entry here.","to":"CDS has a Vector type, a stored calculated element with vector_embedding computes the embedding in [SAP HANA](artifact:sap-hana) on every write, and cosine_similarity compares in CQL, so storing and comparing are in the core. Splitting long text into chunks and putting what was found into a prompt are hand-written in every entry here, and on [PostgreSQL](external:postgresql) capire states that CAP provides no built-in vector_embedding.","reason":"capire's Vector Embeddings guide documents embedding on write as a stored calculated element, so the old sentence, which listed embedding on write among what every entry writes by hand, no longer held. The state is unchanged: no SAP artifact in the graph carries a provides edge to this capability behind the CAP door."},{"date":"2026-09-21","field":"core_coverage.state","from":"community-only","to":"core-and-community","reason":"The reading rested on there being no CAP-door artifact of SAP's with a provides edge here, and on re-reading capire that was a gap in the corpus rather than in the platform: the CAP-native Embeddings guide documents the Vector type and the vector functions as CDS's own, and names [@cap-js/ai](artifact:cap-js-ai) as what makes the SQLite emulation semantic. Both edges are proposed in this batch, so the state follows them. relationship is unassessed because no source says why the core stops where it does."},{"date":"2026-09-21","field":"core_coverage.what_core_does","from":null,"to":"The Vector type built into CDS, vector_embedding, cosine_similarity and l2distance in the query language, the stored calculated element that recomputes an embedding on write, and the character-hash emulation on SQLite and H2 that [@cap-js/ai](artifact:cap-js-ai) replaces with a local ONNX model.","reason":"The coverage said what the core stops at without ever saying what it does, which left a reader to infer the core's half from the boundary sentence alone. Written from capire's CAP-native Embeddings guide, read on 2026-09-21 in its rendered form and in its source on GitHub."},{"date":"2026-09-21","field":"core_coverage.where_it_stops","from":"CDS has a Vector type, a stored calculated element with vector_embedding computes the embedding in [SAP HANA](artifact:sap-hana) on every write, and cosine_similarity compares in CQL, so storing and comparing are in the core. Splitting long text into chunks and putting what was found into a prompt are hand-written in every entry here, and on [PostgreSQL](external:postgresql) capire states that CAP provides no built-in vector_embedding.","to":"At the vector. Which text of a record gets embedded, how a text too long for one embedding is split, how many rows go into the prompt and what the prompt says are written by hand in every entry here, and capire's guide documents no chunking. On [PostgreSQL](external:postgresql) capire states that CAP provides no built-in `vector_embedding`, so the embedding is computed in the application or by a custom database function, and the local embeddings in [@cap-js/ai](artifact:cap-js-ai) are declared experimental and intended for local development only.","reason":"The first half of the old sentence described what the core does, which now has its own field, and the boundary had to carry two things it did not say: that the guide documents no chunking, and that the local embedding model is declared experimental and for local development only. The limits themselves are unchanged."},{"date":"2026-09-21","field":"core_coverage.community_adds","from":null,"to":"The layer above the vector, as [cap-llm-plugin](artifact:cap-llm-plugin) and [@saptarishi/cds-plugin-vector-hana](artifact:saptarishi-cds-plugin-vector-hana) each assemble it.","reason":"With the core's half now stated, the panel needed the sentence that says what is added on top of it, and the two shapes differ: one retrieval method behind a service binding, or a vector table modelled on an annotated entity."},{"date":"2026-09-27","field":"core_coverage.sources","from":"without the Native AI page","to":"cites it","reason":"capire audit 2026-09-27, link-only pages read a fourth time: vector embeddings are one of the three things SAP frames as CAP's native AI support, in the one sentence the section's index says of its own."},{"date":"2026-10-26","field":"coverage_by_ecosystem.abap.state, coverage_by_ecosystem.abap.note, coverage_by_ecosystem.abap.community_adds","from":"community-only; note: community-only describes who provides retrieval, not an absence of language models in the platform: the completion call is SAP's.","to":"core-and-community; note names SAP AI Core as serving this door; community_adds names zvdb.","reason":"Reassessed against the graph (check:capabilities): SAP AI Core, sap-official, lists the ABAP door in serves_ecosystems and provides this capability, so SAP is present; zvdb is the community provider. The old note only explained the previous state."},{"date":"2026-10-26","field":"coverage_by_ecosystem.btp.state, coverage_by_ecosystem.btp.note, coverage_by_ecosystem.btp.community_adds","from":"core-only; note: Every provider behind this door is SAP's, so core-only is a assessment of the corpus rather than a quote from the core.","to":"core-and-community; note removed; community_adds names sap-knowledge-pipeline.","reason":"Reassessed against the graph (check:capabilities): sap-knowledge-pipeline, an independent package on this door, provides the capability. The removed note explained the old state and made an all-providers claim."},{"date":"2026-10-26","field":"core_coverage.community_adds","from":"cap-llm-plugin and @saptarishi/cds-plugin-vector-hana only","to":"adds mi8y-cap-agents-aicore-vectorstore, the route through Document Grounding","reason":"Reassessed against the graph (check:capabilities): a CAP-door provider reaches Document Grounding through the LangChain vector store interface, a shape the two plugins do not cover."}],"drafted_with_ai":true,"normative_relevance":[{"instrument":"instrument:sap-developer-license-3-2-cap","prominence":"contextual","sections":["3"],"applies_when":"Covered SAP materials or a covered CAP customer application are included in training data, model development or model refinement.","note":"Retrieval and inference are not automatically AI training. The section becomes relevant if the indexed or retrieved covered material is instead used for training, developing or refining the model or system.","applies_to":{"ecosystems":["cap"]},"sources":[{"url":"https://cap.cloud.sap/resources/license/developer-license-3_2_CAP.txt","title":"SAP Developer License Agreement 3.2 CAP","checked":"2026-09-16","quote":"using the Software, Tools, APIs and/or Customer Applications"}]}]},"sap_delivery":{"door":"cap","all":{"built_in":[{"ref":"artifact:sap-cds","name":"@sap/cds","json":"/artifacts/sap-cds.json"}],"documented_pattern":[],"announced":[],"packages":[{"ref":"artifact:cap-js-ai","name":"@cap-js/ai","json":"/artifacts/cap-js-ai.json"}]},"by_flavor":{"node":{"built_in":[{"ref":"artifact:sap-cds","name":"@sap/cds","json":"/artifacts/sap-cds.json"}],"documented_pattern":[],"announced":[],"packages":[{"ref":"artifact:cap-js-ai","name":"@cap-js/ai","json":"/artifacts/cap-js-ai.json"}]},"java":null}},"edges":{"use_cases":[{"id":"answer-a-question-from-records-in-a-cap-service","name":"Answer a question from records in a CAP service","capability":"capability:retrieval-augmented-generation","ecosystem":"cap","outcome":"A question asked in plain words is answered from rows the CAP model already holds: the records nearest to the question in meaning are found and put in front of a language model, so the answer rests on those records rather than on what the model remembers.","boundary":"Covers embedding the records, finding the nearest ones and getting them into the prompt. The call to the model is [LLM integration](capability:llm-integration), answering from documents in a connected repository is document grounding on the BTP door, and who may see a retrieved row is [authorization](capability:authorization). Which entitlements a subaccount holds is a project question and is not assessed here.","origin":"Editorial hypothesis while re-assessing this capability's CAP coverage on 2026-09-21. capire's own embeddings guide lists retrieval-augmented generation among the uses of the feature it documents.","requirement_dimensions":["Whether the application runs on Node.js or Java","Which database holds the records: SAP HANA Cloud, PostgreSQL, or SQLite for a local run","Whether an SAP AI Core binding and an embedding model deployment exist","Whether a record's text fits one embedding or has to be split first","Whether the embedding is computed on write or refreshed in a batch run","Whether the answer has to name the records it was drawn from"],"paths":[{"key":"cap-native-hana","name":"With CDS's own vector elements against SAP HANA Cloud","sources":[{"url":"https://cap.cloud.sap/docs/guides/ai/embeddings","title":"CAP-native Embeddings, SAP HANA — capire","checked":"2026-09-21","quote":"`vector_embedding` uses embedding models from the NLP extension or an SAP AI Core remote source"}]},{"key":"local-sqlite","name":"On SQLite with the local model @cap-js/ai brings","sources":[{"url":"https://raw.githubusercontent.com/cap-js/docs/main/guides/ai/embeddings.md","title":"CAP-native Embeddings, SQLite and H2 — capire, source on GitHub","checked":"2026-09-21","quote":"In CAP Node.js, the `@cap-js/ai` plugin makes the standard `sqlite` database generate semantic embeddings locally, without any external service."}]},{"key":"cap-llm-plugin","name":"Through cap-llm-plugin's single retrieval method","sources":[{"url":"https://unpkg.com/cap-llm-plugin@1.5.1/README.md","title":"cap-llm-plugin 1.5.1 — README on unpkg","checked":"2026-09-21","quote":"Simplified single RAG (retrieval-augmented generation) retrieval method powered by SAP AI Core and SAP HANA Cloud Vector Engine."},{"url":"https://raw.githubusercontent.com/SAP/architecture-center/main/docs/ref-arch/RA0005/3-retrieval-augmented-generation/readme.md","title":"RA0005 3-retrieval-augmented-generation/readme.md in SAP/architecture-center","checked":"2026-09-27","quote":"Custom CAP based application can benefit from the CAP LLM Plugin for efficient and faster development."}]},{"key":"saptarishi-pair","name":"Through the @saptarishi store and its provider plugin","sources":[{"url":"https://raw.githubusercontent.com/kalyanjanumpally/sap-joule-ai-plugin/main/cds-plugin-vector-hana/README.md","title":"kalyanjanumpally/sap-joule-ai-plugin — cds-plugin-vector-hana README","checked":"2026-09-21","quote":"Composes with [`@saptarishi/cds-plugin-llm`](https://www.npmjs.com/package/@saptarishi/cds-plugin-llm) for embeddings — bring any provider (Ollama, OpenAI, Groq, GenAI Hub)."}]}],"contributions":[{"ref":"artifact:sap-cds","role":"model and query language","state":"documented","paths":["cap-native-hana","local-sqlite"],"flavors":["node"],"description":"The Vector type is built into CDS, so the embedding is an element of the entity it describes, and `vector_embedding`, `cosine_similarity` and `l2distance` are functions of the query language, so the retrieval is a `WHERE` clause and not a call to anything outside the model. A `stored` calculated element keeps a row's embedding in the database and recomputes it whenever the row changes on CREATE or UPDATE, which answers the question of when a record's vector is written.","remaining_work":"Everything above the vector: choosing which fields of a record are embedded, splitting a text too long for one embedding, deciding how many rows to take and writing the prompt they go into. capire's guide documents no chunking function and no prompt assembly.","remaining_kinds":["application-code"],"sources":[{"url":"https://cap.cloud.sap/docs/guides/ai/embeddings","title":"CAP-native Embeddings, vector_embedding — capire","checked":"2026-09-21","quote":"Creates a vector embedding of the given `text` using the `embedding_model`."},{"url":"https://cap.cloud.sap/docs/guides/ai/embeddings","title":"CAP-native Embeddings, cosine_similarity — capire","checked":"2026-09-21","quote":"Computes the cosine of the angle between `vector1` and `vector2`, comparing the direction of the vectors."},{"url":"https://cap.cloud.sap/docs/guides/ai/embeddings#using-calculated-elements","title":"CAP-native Embeddings, Using Calculated Elements — capire","checked":"2026-09-21","quote":"Using `stored` calculated elements ensures that the embedding is persisted in the database, and recalculated whenever the source data changes through CREATE or UPDATE operations."}]},{"ref":"artifact:btp-hana-cloud","role":"vector store and embedding function","state":"conditional","paths":["cap-native-hana","cap-llm-plugin","saptarishi-pair"],"description":"Holds the vectors in the same database as the records: REAL_VECTOR is an SQL data type of the vector engine, and COSINE_SIMILARITY and L2DISTANCE are its functions, which is what the CDS Vector type and the CQL functions map to. capire adds where the embedding model itself comes from on this database, the NLP extension or an [SAP AI Core](artifact:btp-ai-core) remote source, so the text-to-vector step can run inside the database rather than in the application.","remaining_work":"Provision the database and, for `vector_embedding`, make an embedding model reachable from it. Nothing here retrieves for a question or writes a prompt.","sources":[{"url":"https://btp-ai-bp.docs.sap/docs/technology/sap-hana-cloud","title":"SAP HANA Cloud — SAP BTP AI Best Practices, Technologies","checked":"2026-09-21","quote":"The SAP HANA Cloud Vector Engine is an integrated feature designed to support similarity search and other vector-based operations"},{"url":"https://btp-ai-bp.docs.sap/docs/technology/sap-hana-cloud","title":"SAP HANA Cloud — SAP BTP AI Best Practices, Technologies","checked":"2026-09-21","quote":"The foundation of the vector engine is the REAL_VECTOR SQL data type."},{"url":"https://cap.cloud.sap/docs/guides/ai/embeddings","title":"CAP-native Embeddings, SAP HANA — capire","checked":"2026-09-21","quote":"`vector_embedding` uses embedding models from the NLP extension or an SAP AI Core remote source"},{"url":"https://raw.githubusercontent.com/kalyanjanumpally/sap-joule-ai-plugin/main/cds-plugin-vector-hana/README.md","title":"@saptarishi/cds-plugin-vector-hana — README","checked":"2026-09-22","quote":"Vector store for SAP CAP that speaks HANA Cloud's native `REAL_VECTOR` + `COSINE_SIMILARITY`"},{"url":"https://raw.githubusercontent.com/kalyanjanumpally/sap-joule-ai-plugin/main/cds-plugin-vector-hana/README.md","title":"@saptarishi/cds-plugin-vector-hana — README","checked":"2026-09-22","quote":"Ships with a **SQLite fallback** so you can build and test semantic-search features on your laptop without paying for HANA."},{"url":"https://raw.githubusercontent.com/kalyanjanumpally/sap-joule-ai-plugin/main/cds-plugin-vector-hana/README.md","title":"@saptarishi/cds-plugin-vector-hana — README, Stability","checked":"2026-09-23","quote":"The HANA backend is wire-protocol-verified against a mock `hdb` client and matches SAP HANA Cloud's documented vector engine SQL. Live-verification against a real HANA Cloud instance is the top open item"}],"conditions":["The application's database is SAP HANA Cloud. On the CAP-native way that is the way itself. On the way through [@saptarishi/cds-plugin-vector-hana](artifact:saptarishi-cds-plugin-vector-hana) it is the store's HANA backend rather than the SQLite fallback the README ships for a laptop, and that README says the HANA backend is verified against a mock client and not yet against a HANA Cloud instance."]},{"ref":"artifact:cap-js-hana","role":"database service","state":"documented","paths":["cap-native-hana"],"flavors":["node"],"description":"The package that puts the CAP Node.js runtime on [SAP HANA Cloud](artifact:btp-hana-cloud): capire's guide adds it to the project for production, and at runtime `cds watch` or `cds run` fetch the database's credentials from the binding so the server can connect, through the hdb driver by default. It is the part of this way that talks to the database.","remaining_work":"Add the package and deploy the HDI artifacts `cds build` generates; the guide covers both. Nothing here retrieves for a question or writes a prompt.","remaining_kinds":["configuration"],"sources":[{"url":"https://raw.githubusercontent.com/cap-js/docs/main/guides/databases/hana.md","title":"Using SAP HANA Cloud for Production — capire, source on GitHub","checked":"2026-09-23","quote":"add a dependency to the _package.json_ for Node.js or to the _pom.xml_ for a CAP Java application"},{"url":"https://raw.githubusercontent.com/cap-js/docs/main/guides/databases/hana.md","title":"Using SAP HANA Cloud for Production — capire, cds deploy","checked":"2026-09-23","quote":"With this information, `cds watch`/`run` can fetch the SAP HANA credentials at runtime, so that the server can connect to it."},{"url":"https://raw.githubusercontent.com/cap-js/docs/main/guides/databases/hana.md","title":"Using SAP HANA Cloud for Production — capire, other drivers","checked":"2026-09-23","quote":"Package `@cap-js/hana` uses the [`hdb`](https://www.npmjs.com/package/hdb) driver by default."}]},{"ref":"artifact:cap-js-ai","role":"local embedding model","state":"conditional","paths":["local-sqlite"],"flavors":["node"],"conditions":["@sap/cds ^10.1 and @cap-js/sqlite ^3.1, the versions capire states the local embeddings require","Local development: the README calls the facility experimental and sends production vector workloads to SAP HANA's vector engine"],"description":"Makes the similarity search on a laptop behave like the one in the database. Without it, capire states that SQLite and H2 emulate `vector_embedding` with lexical character-hash vectors, which match spelling rather than meaning; with it, the standard `sqlite` database generates semantic embeddings from a local ONNX model and no external service is called.","remaining_work":"Install the plugin in a project on the stated versions. The retrieval, the prompt and the model call are the same work as on the core path, and the answer still has to be built somewhere else for production.","remaining_kinds":["configuration"],"sources":[{"url":"https://raw.githubusercontent.com/cap-js/docs/main/guides/ai/embeddings.md","title":"CAP-native Embeddings, SQLite and H2 — capire, source on GitHub","checked":"2026-09-21","quote":"On SQLite and H2, the `vector_embedding` function is emulated using lexical character-hash vectors by default."},{"url":"https://raw.githubusercontent.com/cap-js/docs/main/guides/ai/embeddings.md","title":"CAP-native Embeddings, SQLite and H2 — capire, source on GitHub","checked":"2026-09-21","quote":"It requires `@sap/cds` `^10.1` and `@cap-js/sqlite` `^3.1`, and is experimental and intended for local development only."},{"url":"https://raw.githubusercontent.com/cap-js/ai/main/README.md","title":"cap-js/ai — README, Local vector embeddings with SQLite (experimental)","checked":"2026-09-21","quote":"Use SAP HANA's vector engine for production vector workloads."}]},{"ref":"artifact:cap-llm-plugin","role":"retrieval in one call","state":"conditional","paths":["cap-llm-plugin"],"flavors":["node"],"version_scope":"README at version 1.5.1, the version npm serves as latest.","conditions":["The vectors are in SAP HANA Cloud's vector engine, which every retrieval feature in the README is written against","An SAP AI Core binding provides the embedding and chat models"],"description":"Collapses the steps into one method: the README's retrieval feature embeds through [SAP AI Core](artifact:btp-ai-core), searches [SAP HANA Cloud](artifact:btp-hana-cloud)'s vector engine and hands the result to the model, with the embedding and the similarity search also available on their own for a handler that wants them apart.","remaining_work":"Fill the vector table first: the README describes generating embeddings and searching them, and neither chunking nor an embed-on-write handler is part of it. The README also states that the plugin is not an official SAP product and is published as a community contribution.","remaining_kinds":["application-code"],"sources":[{"url":"https://unpkg.com/cap-llm-plugin@1.5.1/README.md","title":"cap-llm-plugin 1.5.1 — README on unpkg","checked":"2026-09-21","quote":"Simplified single RAG (retrieval-augmented generation) retrieval method powered by SAP AI Core and SAP HANA Cloud Vector Engine."},{"url":"https://unpkg.com/cap-llm-plugin@1.5.1/README.md","title":"cap-llm-plugin 1.5.1 — README on unpkg","checked":"2026-09-21","quote":"Effortlessly perform similarity search via SAP HANA Cloud Vector engine."},{"url":"https://unpkg.com/cap-llm-plugin@1.5.1/README.md","title":"cap-llm-plugin 1.5.1 — README on unpkg","checked":"2026-09-21","quote":"The plugin is not an official SAP product. It is released under the Apache 2.0 license and is published as a community contribution."}]},{"ref":"artifact:saptarishi-cds-plugin-vector-hana","role":"vector table and search","state":"documented","paths":["saptarishi-pair"],"flavors":["node"],"description":"Moves the embed-on-write and the search into the model: a `@rag` annotation on an entity names the fields to embed, the plugin builds the vector table and keeps it in sync on every CRUD operation, and what is embedded is one row's projected fields as one vector. A SQLite fallback ships with it, so the same code runs on a laptop without SAP HANA Cloud.","remaining_work":"Choose the fields to embed and install a provider for the embedding and chat calls, which are not in this package. A record whose text does not fit one vector is not addressed: the README describes no chunking. The README says its HANA backend is verified against a mock hdb client and not yet against a HANA Cloud instance, which it names as its top open item; the SQLite backend is what its integration tests exercise.","remaining_kinds":["configuration"],"sources":[{"url":"https://raw.githubusercontent.com/kalyanjanumpally/sap-joule-ai-plugin/main/cds-plugin-vector-hana/README.md","title":"kalyanjanumpally/sap-joule-ai-plugin — cds-plugin-vector-hana README","checked":"2026-09-21","quote":"Annotate a CDS entity with `@rag` and the plugin builds a vector table, keeps it in sync on every CRUD"},{"url":"https://raw.githubusercontent.com/kalyanjanumpally/sap-joule-ai-plugin/main/cds-plugin-vector-hana/README.md","title":"kalyanjanumpally/sap-joule-ai-plugin — cds-plugin-vector-hana README","checked":"2026-09-21","quote":"Ships with a **SQLite fallback** so you can build and test semantic-search features on your laptop without paying for HANA."},{"url":"https://raw.githubusercontent.com/kalyanjanumpally/sap-joule-ai-plugin/main/cds-plugin-vector-hana/README.md","title":"@saptarishi/cds-plugin-vector-hana — README, Stability","checked":"2026-09-23","quote":"The HANA backend is wire-protocol-verified against a mock `hdb` client and matches SAP HANA Cloud's documented vector engine SQL. Live-verification against a real HANA Cloud instance is the top open item"}]},{"ref":"artifact:saptarishi-cds-plugin-llm","role":"embedding and chat provider","state":"documented","paths":["saptarishi-pair"],"flavors":["node"],"description":"The half the store composes with: the provider that produces the embeddings and runs the chat call, with the model chosen there rather than in the store. The store's README names it for exactly that, and lists the providers it can be pointed at.","remaining_work":"Configure a provider and its credentials. Which model is used, and what it costs, is decided in this package and not in the store.","remaining_kinds":["configuration"],"sources":[{"url":"https://raw.githubusercontent.com/kalyanjanumpally/sap-joule-ai-plugin/main/cds-plugin-vector-hana/README.md","title":"kalyanjanumpally/sap-joule-ai-plugin — cds-plugin-vector-hana README","checked":"2026-09-21","quote":"Composes with [`@saptarishi/cds-plugin-llm`](https://www.npmjs.com/package/@saptarishi/cds-plugin-llm) for embeddings — bring any provider (Ollama, OpenAI, Groq, GenAI Hub)."}]}],"readings":[{"ref":"content:using-hana-clouds-vector-embedding-function-in-cap","relevance":"Shows the embedding computed inside the database by HANA Cloud's own function rather than fetched from a model service, which is the step this task's core path leans on."},{"ref":"content:semantic-search-in-cap-nodejs-vector-embeddings","relevance":"The small end of the task: the author's finding is that the simple case works without a vector database at all, reported as experiments rather than as a pattern."},{"ref":"content:building-a-genai-inventory-assistant-with-cap-rag-and-a-vector-database","relevance":"Shows the schema decision this task runs into: the vectors in a table of their own, retrieval finding candidates by similarity and the real rows read afterwards, so the answer is grounded in records rather than in the embedded text."},{"ref":"content:rag-with-hana-cloud-vector-engine-genai-hub-and-cap","relevance":"The end-to-end version, with the embedding preparation and the retrieval shape worth reading; the author has marked the section on the CAP LLM plugin '(Outdated)' in the page itself."}],"unknowns":["Chunking is unaddressed on every path read here. capire documents no chunking function and neither plugin README mentions one, so a record whose text is longer than one embedding is the application's own problem in all four ways.","CAP Java has no contribution here. The capability already records CQL.vectorEmbedding and CQL.cosineSimilarity arriving in CAP Java 4.9.0, but no artifact in the graph carries the Java side, so nothing in this record states it.","PostgreSQL: capire states that CAP provides no built-in vector_embedding there and that the embedding is computed in the application or by a custom database function. What a CAP project actually uses for that was not researched.","cap-llm-plugin's README, read at 1.5.1, states no CAP or @sap/cds version range, so which releases it is written against is not established.","No source read here shows a whole answer end to end on the core path: capire documents the vector and the similarity search, and what the prompt around the retrieved rows looks like is left to the application in every case."],"assessed_at":"2026-09-21","drafted_with_ai":true,"history":[{"date":"2026-09-23","field":"contributions[btp-hana-cloud].paths, state, conditions, sources; contributions[cap-js-hana]","from":"paths cap-native-hana, cap-llm-plugin; state documented; no @cap-js/hana","to":"paths cap-native-hana, cap-llm-plugin, saptarishi-pair; state conditional, one condition, two sources; @cap-js/hana on cap-native-hana as its database service","reason":"npm run check:usecases found the graph joins SAP HANA Cloud to the vector store plugin by an edge while no path held them together. The store speaks HANA Cloud's native vector type and functions, as its README says, so the database is a part of that way too; and since that README ships a SQLite fallback, the contribution is conditional on the database being HANA, which on the CAP-native way is the way itself. @cap-js/hana joins the CAP-native way as the part that talks to the database: without it, @sap/cds and SAP HANA Cloud had no edge between them, and the runtime itself does not require the database, its database service does."},{"date":"2026-09-23","field":"contributions[cap-js-hana].description, sources; contributions[saptarishi-cds-plugin-vector-hana].remaining_work, sources","from":"the database service's connection cited a deploy sentence; the mock-verified caveat sat on SAP HANA Cloud's row only","to":"the runtime sentence cited; the caveat on the store's own row, quoted","reason":"The second reader's follow-ups on the revision accepted 2026-09-23: the connection claim now rests on the guide's runtime sentence, and what the store's README calls unverified is its own HANA backend, so its row says so."},{"date":"2026-09-27","field":"paths[cap-llm-plugin].sources","from":"the plugin's own README","to":"the plugin's own README, and the RAG page of SAP's Generative AI on SAP BTP reference architecture","reason":"A path's sources cite a published scenario that shows the parts together, and SAP's reference architecture is one (docs/concepts/reference-architectures.md, P7): its RAG page names the CAP LLM plugin for a custom CAP application, in a document whose retrieval runs on SAP HANA Cloud's vector engine. The citation joins the use case to the design's entry, so the two pages link. The contributions and their states are unchanged, so assessed_at stands."}],"omitted_contributions":0,"assessment_kind":"documented-contributions"}],"shared_tasks":[],"related_tasks":[],"options":[{"ref":"artifact:cap-js-ai","name":"@cap-js/ai","json":"/artifacts/cap-js-ai.json","ecosystem":"cap","origin_ring":"sap-official"},{"ref":"artifact:mi8y-cap-agents-aicore-vectorstore","name":"@mi8y/cap-agents-aicore-vectorstore","json":"/artifacts/mi8y-cap-agents-aicore-vectorstore.json","ecosystem":"cap","origin_ring":"independent"},{"ref":"artifact:mi8y-cap-agents-cds-vectorstore","name":"@mi8y/cap-agents-cds-vectorstore","json":"/artifacts/mi8y-cap-agents-cds-vectorstore.json","ecosystem":"cap","origin_ring":"independent"},{"ref":"artifact:sap-cds","name":"@sap/cds","json":"/artifacts/sap-cds.json","ecosystem":"cap","origin_ring":"sap-official"},{"ref":"artifact:saptarishi-cds-plugin-llm","name":"@saptarishi/cds-plugin-llm","json":"/artifacts/saptarishi-cds-plugin-llm.json","ecosystem":"cap","origin_ring":"independent"},{"ref":"artifact:saptarishi-cds-plugin-vector-hana","name":"@saptarishi/cds-plugin-vector-hana","json":"/artifacts/saptarishi-cds-plugin-vector-hana.json","ecosystem":"cap","origin_ring":"independent"},{"ref":"artifact:cap-llm-plugin","name":"cap-llm-plugin","json":"/artifacts/cap-llm-plugin.json","ecosystem":"cap","origin_ring":"independent"},{"ref":"artifact:btp-ai-core","name":"SAP AI Core","json":"/artifacts/btp-ai-core.json","ecosystem":"btp","origin_ring":"sap-official"},{"ref":"artifact:btp-hana-cloud","name":"SAP HANA Cloud","json":"/artifacts/btp-hana-cloud.json","ecosystem":"btp","origin_ring":"sap-official"},{"ref":"artifact:yassinbahri-sap-knowledge-pipeline","name":"sap-knowledge-pipeline","json":"/artifacts/yassinbahri-sap-knowledge-pipeline.json","ecosystem":"btp","origin_ring":"independent"},{"ref":"artifact:oisee-zvdb","name":"zvdb","json":"/artifacts/oisee-zvdb.json","ecosystem":"abap","origin_ring":"independent"}],"samples":[{"ref":"artifact:miyasuta-cap-bp-rag","name":"cap-bp-rag","json":"/artifacts/miyasuta-cap-bp-rag.json"},{"ref":"artifact:miyasuta-cap-embedding-function","name":"cap-embedding-function","json":"/artifacts/miyasuta-cap-embedding-function.json"},{"ref":"artifact:miyasuta-cap-vector-hc","name":"cap-vector-hc","json":"/artifacts/miyasuta-cap-vector-hc.json"},{"ref":"artifact:sap-samples-btp-ai-bp-vector-rag-embedding-cap","name":"SAP BTP AI Best Practice Demo - Vector Embedding (RAG) - CAP","json":"/artifacts/sap-samples-btp-ai-bp-vector-rag-embedding-cap.json"},{"ref":"artifact:sap-samples-btp-ai-bp-vector-rag-query-cap","name":"SAP BTP AI Best Practice Demo - Vector Query (RAG) - CAP","json":"/artifacts/sap-samples-btp-ai-bp-vector-rag-query-cap.json"},{"ref":"artifact:sap-samples-sap-btp-ai-best-practices","name":"sap-btp-ai-best-practices","json":"/artifacts/sap-samples-sap-btp-ai-best-practices.json"},{"ref":"artifact:sap-samples-sap-genai-hub-with-sap-hana-cloud-vector-engine","name":"sap-genai-hub-with-sap-hana-cloud-vector-engine","json":"/artifacts/sap-samples-sap-genai-hub-with-sap-hana-cloud-vector-engine.json"},{"ref":"artifact:sap-samples-btp-cap-genai-rag","name":"SAP-samples/btp-cap-genai-rag","json":"/artifacts/sap-samples-btp-cap-genai-rag.json"},{"ref":"artifact:sap-samples-btp-cap-genai-semantic-search","name":"SAP-samples/btp-cap-genai-semantic-search","json":"/artifacts/sap-samples-btp-cap-genai-semantic-search.json"},{"ref":"artifact:sap-samples-generative-ai-codejam","name":"SAP-samples/generative-ai-codejam","json":"/artifacts/sap-samples-generative-ai-codejam.json"},{"ref":"artifact:sap-samples-teched2025-da261","name":"teched2025-DA261","json":"/artifacts/sap-samples-teched2025-da261.json"}],"explained_by":[{"ref":"content:cap-in-the-age-of-ai-7-vector-embeddings-wrap-up","name":"CAP in the age of AI #7 - vector embeddings wrap-up","json":"/content/cap-in-the-age-of-ai-7-vector-embeddings-wrap-up.json"},{"ref":"content:cap-in-the-age-of-ai-6-vector-embeddings","name":"CAP in the age of AI #6 - vector embeddings","json":"/content/cap-in-the-age-of-ai-6-vector-embeddings.json"},{"ref":"content:devtoberfest-2026-ai-in-abap-with-islm","name":"🟣 Bring AI into Your ABAP Applications with ISLM: Build, Integrate, and Consume AI Natively","json":"/content/devtoberfest-2026-ai-in-abap-with-islm.json"},{"ref":"content:cap-in-the-age-of-ai","name":"CAP in the age of AI","json":"/content/cap-in-the-age-of-ai.json"},{"ref":"content:mj-live-an-ai-cognitive-pipeline-on-cap-hana-and-solace","name":"Michael Jackson: AI Cognitive Pipeline on SAP BTP, SAP CAP, ElevenLabs, Claude, HANA DB, Solace","json":"/content/mj-live-an-ai-cognitive-pipeline-on-cap-hana-and-solace.json"},{"ref":"content:hana-cloud-knowledge-graph-for-ai-driven-tender-analysis","name":"A Use Case for HANA Cloud Knowledge Graph: AI‑Driven Tender Analysis","json":"/content/hana-cloud-knowledge-graph-for-ai-driven-tender-analysis.json"},{"ref":"content:semantic-search-in-cap-nodejs-vector-embeddings","name":"Semantic search in CAP (Node.js): vector embeddings and cosine similarity","json":"/content/semantic-search-in-cap-nodejs-vector-embeddings.json"},{"ref":"content:building-a-genai-inventory-assistant-with-cap-rag-and-a-vector-database","name":"Building a Generative AI-powered Inventory Assistant with SAP CAP, RAG, and Vector Database","json":"/content/building-a-genai-inventory-assistant-with-cap-rag-and-a-vector-database.json"},{"ref":"content:ac-generative-ai-on-sap-btp","name":"Generative AI on SAP BTP","json":"/content/ac-generative-ai-on-sap-btp.json"},{"ref":"content:multi-modal-rag-proof-of-concept-facilitating-tech-support","name":"Multi-modal RAG Proof of Concept: facilitating tech support","json":"/content/multi-modal-rag-proof-of-concept-facilitating-tech-support.json"},{"ref":"content:out-of-the-box-document-grounding-in-sap-ai-core-rag-with-sap-help-portal","name":"Out-of-the-Box Document Grounding in SAP AI Core: RAG with SAP Help Portal","json":"/content/out-of-the-box-document-grounding-in-sap-ai-core-rag-with-sap-help-portal.json"},{"ref":"content:hana-clouds-vector-embedding-in-cap-compared-with-openai","name":"HANA Cloud’s VECTOR EMBEDDING in CAP and Comparison with OpenAI Embedding","json":"/content/hana-clouds-vector-embedding-in-cap-compared-with-openai.json"},{"ref":"content:using-hana-clouds-vector-embedding-function-in-cap","name":"Using HANA Cloud’s \"VECTOR_EMBEDDING\" Function in CAP","json":"/content/using-hana-clouds-vector-embedding-function-in-cap.json"},{"ref":"content:rag-with-hana-cloud-vector-engine-genai-hub-and-cap","name":"RAG with SAP HANA Cloud Vector Engine, GenAI Hub & CAP","json":"/content/rag-with-hana-cloud-vector-engine-genai-hub-and-cap.json"},{"ref":"content:btp-ai-bp-document-grounding","name":"Document Grounding","json":"/content/btp-ai-bp-document-grounding.json"},{"ref":"content:btp-ai-bp-vector-rag-vs-graph-rag","name":"Vector RAG vs Graph RAG","json":"/content/btp-ai-bp-vector-rag-vs-graph-rag.json"},{"ref":"content:teched-2026-ct1135","name":"Conversational search for the Cloud Integration capability","json":"/content/teched-2026-ct1135.json"},{"ref":"content:teched-2026-da164","name":"Building agentic applications with SAP HANA Cloud","json":"/content/teched-2026-da164.json"}],"normative_context":[{"ref":"instrument:sap-developer-license-3-2-cap","name":"SAP Developer License Agreement","json":"/instruments/sap-developer-license-3-2-cap.json","prominence":"contextual","sections":["3"]}]}}