SampleSampletypeA worked example you read or clone. Evidence: it demonstrates, it never provides.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →Reference

cap-embedding-function

A CAP service that computes a note's Vector(768) embedding in its own handlers, selecting SAP HANA Cloud's vector_embedding as a column from a Dummy entity.

Notes carries a Vector(768) element and is projected to the service without it; before-CREATE and before-UPDATE handlers fill it from vector_embedding(${text}, 'DOCUMENT', 'SAP_NEB.20240715'), selected as a column from the Dummy entity at id: 1. The similaritySearch function embeds the search word the same way and returns three notes with their cosine_similarity against to_real_vector of that embedding, ordered descending. cap-vector-hc declares the embedding on the element and lets HANA Cloud generate and store it; here the handler owns both the write and the query. The project sets cds.requires to db: hana and auth: dummy, depends on @cap-js/hana, and its README is the CAP scaffold's own getting-started text.

Facts

Last pushLicenceUNLICENSED

Where it sits

Lives in
Demonstrates
Retrieval-augmented generationCAPRetrieval-augmented generationcapabilityGrounding 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.
Flavors
Node.jsfrom its runtime
Runs
Cloud Foundry
Requires
@sap/cds^8@sap/cdsartifactThe peer range, as published.SAP HANA CloudSAP HANA CloudartifactWhere the embeddings are computed and searched: vector_embedding, to_real_vector and cosine_similarity are the database's own functions, and the project pins db to hana.@cap-js/hana@cap-js/hanaartifactThe database service that serves db: hana for the Node.js runtime; the project depends on it directly.

Who is behind it

Mio YasutakeMio YasutakePersonMaintains this
In the atlas: maintains 47, contributes to 47, wrote 10
@miyasuta
maintainer

What it declares

Every artifact

Type
Sample
Origin
Independently maintained
Use as
A reference
Runtime
Node.js
Runs on
Cloud Foundry

As a sample

Declared for
^8
Form
does not say

Connections3

README

quoted from miyasuta/cap-embedding-function, read
miyasuta/cap-embedding-function/README.mdOn GitHub

Getting Started

Welcome to your new project.

It contains these folders and files, following our recommended project layout:

File or FolderPurpose
app/content for UI frontends goes here
db/your domain models and data go here
srv/your service models and code go here
package.jsonproject metadata and configuration
readme.mdthis getting started guide
excerpt, UNLICENSED, read the rest, on GitHub

Details

Sources3
GitHub APIdiscovered here, miyasutachecked
github.com/miyasuta/cap-embedding-functiontree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
runtimesnode
declared for^8
deploymentCloud Foundry
discovered viaGitHub API · miyasuta
first seen in the atlas
ecosystem and domaincap, ai-and-agents
History in the atlas1
  1. First seen.
For your agent
Ref
artifact:miyasuta-cap-embedding-function
JSON
/artifacts/miyasuta-cap-embedding-function.json
MCP
Connecting an agent