{"ref":"artifact:miyasuta-cap-embedding-function","page":"/artifacts/miyasuta-cap-embedding-function","json":"/artifacts/miyasuta-cap-embedding-function.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"miyasuta-cap-embedding-function","name":"cap-embedding-function","artifact_type":"sample","ecosystem":"cap","domain":"ai-and-agents","origin_ring":"independent","description":{"one_line":"A CAP service that computes a note's `Vector(768)` embedding in its own handlers, selecting [SAP HANA Cloud](artifact:btp-hana-cloud)'s `vector_embedding` as a column from a `Dummy` entity.","short":"CAP service computing embeddings with HANA Cloud vector_embedding","what_it_solves":"`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](artifact:miyasuta-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](artifact:cap-js-hana), and its README is the CAP scaffold's own getting-started text."},"links":{"repo":"https://github.com/miyasuta/cap-embedding-function"},"identity":{"license":"UNLICENSED"},"compat":{"runtimes":["node"],"cds_range":"^8","deployment":["cf"]},"demonstrates":["capability:retrieval-augmented-generation"],"requires":[{"ref":"artifact:btp-hana-cloud","for":"Where 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`.","requirement":"required","sources":[{"url":"https://raw.githubusercontent.com/miyasuta/cap-embedding-function/main/srv/service.js","title":"miyasuta/cap-embedding-function — srv/service.js","checked":"2026-10-08","quote":".columns `vector_embedding(${text}, 'DOCUMENT', 'SAP_NEB.20240715') as embedding`"},{"url":"https://raw.githubusercontent.com/miyasuta/cap-embedding-function/main/package.json","title":"miyasuta/cap-embedding-function — package.json, cds.requires","checked":"2026-10-08","quote":"\"requires\": {\n      \"auth\": \"dummy\",\n      \"db\": \"hana\"\n    }"}]},{"ref":"artifact:cap-js-hana","for":"The database service that serves `db: hana` for the Node.js runtime; the project depends on it directly.","requirement":"required","sources":[{"url":"https://raw.githubusercontent.com/miyasuta/cap-embedding-function/main/package.json","title":"miyasuta/cap-embedding-function — package.json, dependencies","checked":"2026-10-08","quote":"\"@cap-js/hana\": \"^1\""}]}],"maintainers":["actor:mio-yasutake"],"provenance":{"discovered_via":[{"source":"source:github","channel":"miyasuta"}],"first_seen":"2026-10-08"},"use_as":"reference","contributors":["actor:mio-yasutake"],"drafted_with_ai":true},"effective_normative_relations":[],"readings":{"liveness":[{"label":"Maintenance","tier":"unknown","evidence":"no release data"},{"label":"Continuity","tier":"fair","evidence":"one contributor, personally owned"},{"label":"Repository","tier":"fair","evidence":"pushed 2025-04, not archived"}],"compatibility":[{"label":"Declared for","tier":"poor","evidence":"^8 — stops before cds 9"},{"label":"Survived majors","tier":"unknown","evidence":"no release dates"},{"label":"Maintainer's CI","tier":"fair","evidence":"no CI configured"}],"practice":[{"label":"Tests","tier":"good","evidence":"1 test file"},{"label":"Docs","tier":"poor","evidence":"README 1 KB"},{"label":"Changelog","tier":"fair","evidence":"none in the repo"}],"reach":[{"value":null,"unit":"installs/week"},{"value":1,"unit":"watching"}]},"signals":{"crawled_at":"2026-10-25","npm":"not published under this name","stars":1,"forks":0,"open_issues":0,"archived":false,"pushed_at":"2025-04-13","license_spdx":null,"org_owned":false,"default_branch":"main","created_at":"2025-03-01T21:08:35Z","open_prs":0,"tree_truncated":false,"test_files":1,"workflows":0,"other_ci":false,"readme_bytes":674,"docs_files":0,"changelog":false,"license_file":false,"dts_files":0,"first_commit":"2025-03-01","last_commit":"2025-04-13","commits":7,"contributors":1,"readme_path":"README.md","readme_sha":"dbac29eb1594d1dd9e9cd90a11879f1495caa4b6","repo_read":"2026-10-25"},"edges":{"maintainers":[{"ref":"actor:mio-yasutake","name":"Mio Yasutake","json":"/actors/mio-yasutake.json"}],"contributors":[{"ref":"actor:mio-yasutake","name":"Mio Yasutake","json":"/actors/mio-yasutake.json"}],"explained_by":[],"alternative_to_this":[],"needed_by":[],"available_via":[],"parts":[],"add_ons":[],"answered_through_parts":[]}}