{"ref":"content:cap-in-the-age-of-ai-6-vector-embeddings","page":"/content/cap-in-the-age-of-ai-6-vector-embeddings","json":"/content/cap-in-the-age-of-ai-6-vector-embeddings.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"cap-in-the-age-of-ai-6-vector-embeddings","content_type":"video","url":"https://www.youtube.com/watch?v=tdtRgPy4B40","title":"CAP in the age of AI #6 - vector embeddings","published_on":"source:youtube","published":"2026-10-09","part_of":"content:cap-in-the-age-of-ai","position":6,"authors":["actor:dj-adams","actor:akatuoro","actor:danschlachter"],"summary":"Vector embeddings put to work in the [incident management](artifact:capire-incidents-app) 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](artifact:btp-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](artifact:btp-hana-cloud) the function is native, while SQLite needs packages added to the project.","short":"Vector embeddings in the CAP incident management sample","explains":["artifact:capire-incidents-app","artifact:btp-ai-core","artifact:btp-hana-cloud","capability:retrieval-augmented-generation"],"sources":[{"url":"https://www.youtube.com/watch?v=tdtRgPy4B40","title":"CAP in the age of AI #6 - vector embeddings — the sample it builds on","checked":"2026-10-18","quote":"Have you heard of a sample application we call incident management?"},{"url":"https://www.youtube.com/watch?v=tdtRgPy4B40","title":"CAP in the age of AI #6 - vector embeddings — what it is for","checked":"2026-10-18","quote":"And vector embeddings will allow us to do something like um when the incident processor looks at an incident to figure out have we I seen this problem before."},{"url":"https://www.youtube.com/watch?v=tdtRgPy4B40","title":"CAP in the age of AI #6 - vector embeddings — the element and its type","checked":"2026-10-18","quote":"I can just extend and incidents um now with my new embedding um um element here and this is of type vector right"},{"url":"https://www.youtube.com/watch?v=tdtRgPy4B40","title":"CAP in the age of AI #6 - vector embeddings — calculated and stored","checked":"2026-10-18","quote":"but then we can also make the stored which basically means okay whenever this data changes the embedding also gets updated on the database right"},{"url":"https://www.youtube.com/watch?v=tdtRgPy4B40","title":"CAP in the age of AI #6 - vector embeddings — cosine similarity","checked":"2026-10-18","quote":"we have two kind of vectors and we can compare them by basically the cosine similarity is just looking at the angle between two vectors"},{"url":"https://www.youtube.com/watch?v=tdtRgPy4B40","title":"CAP in the age of AI #6 - vector embeddings — native on HANA, added for SQLite","checked":"2026-10-18","quote":"So it works on HANA anyways, right? Because we're just using native HANA functionality there. Uh but SQLite doesn't have this natively."},{"url":"https://www.youtube.com/watch?v=tdtRgPy4B40","title":"CAP in the age of AI #6 - vector embeddings — summarising the conversation first","checked":"2026-10-18","quote":"let's just install the AI SDK let me just copy that because yeah um right we can create the orchestration client"},{"url":"https://www.youtube.com/watch?v=tdtRgPy4B40","title":"CAP in the age of AI #6 - vector embeddings — the model the summary comes from","checked":"2026-10-18","quote":"So mistral small is um SAP hosted on uh on a core"},{"url":"https://www.youtube.com/watch?v=tdtRgPy4B40","title":"CAP in the age of AI #6 - vector embeddings — the bound SAP AI Core instance","checked":"2026-10-18","quote":"uh just a random like AI core instance that I bind"},{"url":"https://www.youtube.com/watch?v=tdtRgPy4B40","title":"CAP in the age of AI #6 - vector embeddings — the schedule that runs it","checked":"2026-10-18","quote":"I can just say okay here this schedule summarize every 10 second."},{"url":"https://www.youtube.com/watch?v=tdtRgPy4B40","title":"CAP in the age of AI #6 - vector embeddings — embedding the summary instead of the title","checked":"2026-10-18","quote":"in our vector embedding for previously we just um use the title"},{"url":"https://www.youtube.com/watch?v=tdtRgPy4B40","title":"CAP in the age of AI #6 - vector embeddings — the self-join view","checked":"2026-10-18","quote":"We just have a view right and so we uh do a join right on incidents."},{"url":"https://www.youtube.com/watch?v=tdtRgPy4B40","title":"CAP in the age of AI #6 - vector embeddings — order and limit in a before handler","checked":"2026-10-18","quote":"what we can do in a before handler is we can modify the query right so here we can simply say okay let's get a column all right um of our select query"},{"url":"https://www.youtube.com/watch?v=tdtRgPy4B40","title":"CAP in the age of AI #6 - vector embeddings — OData and vectors","checked":"2026-10-18","quote":"because CDS vector is not supported for O data, right? So, O data doesn't know like really about vector embeddings."},{"url":"https://www.youtube.com/watch?v=tdtRgPy4B40","title":"CAP in the age of AI #6 - vector embeddings — the scores are relative to the model","checked":"2026-10-18","quote":"this really depends on the embedding model that we use, right?"}],"provenance":{"discovered_via":[{"source":"source:youtube"}],"first_seen":"2026-10-18"},"drafted_with_ai":true},"readings":{"liveness":[{"label":"Checked against the source","tier":"unknown","evidence":"nobody has checked it"},{"label":"Source reachable","tier":"unknown","evidence":"not crawled"},{"label":"Age","tier":"good","evidence":"published this month"}],"compatibility":[{"label":"Version","tier":"unknown","evidence":"no version declared"},{"label":"Moved since?","tier":"good","evidence":"no recorded change after 2026-10-09"},{"label":"Findings","tier":"good","evidence":"none flagged"}],"reach":[{"value":null,"unit":"views"},{"value":null,"unit":"comments"},{"value":null,"unit":"likes"}]},"signals":null,"series":{"head":{"id":"cap-in-the-age-of-ai","title":"CAP in the age of AI","content_type":"series"},"container":true,"of":7,"at":6,"parts":[{"position":1,"title":"CAP in the age of AI #1 - the MCP adapter","url":"https://www.youtube.com/watch?v=VPJhkR9pHVM","published":"2026-08-07","state":"indexed","id":"cap-in-the-age-of-ai-1-the-mcp-adapter"},{"position":2,"title":"CAP in the age of AI #2 - more on the MCP adapter","url":"https://www.youtube.com/watch?v=5RBFxl5IqKs","published":"2026-08-14","state":"indexed","id":"cap-in-the-age-of-ai-2-more-on-the-mcp-adapter"},{"position":3,"title":"CAP in the age of AI #3 - from MCP to A2A","url":"https://www.youtube.com/watch?v=Nu_bEVFM7DM","published":"2026-08-21","state":"indexed","id":"cap-in-the-age-of-ai-3-from-mcp-to-a2a"},{"position":4,"title":"CAP in the age of AI #4 - more on agents","url":"https://www.youtube.com/watch?v=2nWIwzoNw-M","published":"2026-09-11","state":"indexed","id":"cap-in-the-age-of-ai-4-more-on-agents"},{"position":5,"title":"CAP in the age of AI #5 - agents wrap-up","url":"https://www.youtube.com/watch?v=cMqSxjtN1hs","published":"2026-10-02","state":"indexed","id":"cap-in-the-age-of-ai-5-agents-wrap-up"},{"position":6,"title":"CAP in the age of AI #6 - vector embeddings","url":"https://www.youtube.com/watch?v=tdtRgPy4B40","published":"2026-10-09","state":"indexed","id":"cap-in-the-age-of-ai-6-vector-embeddings"},{"position":7,"title":"CAP in the age of AI #7 - vector embeddings wrap-up","url":"https://www.youtube.com/watch?v=JGXE952l4JM","published":"2026-10-16","state":"indexed","id":"cap-in-the-age-of-ai-7-vector-embeddings-wrap-up"}]},"edges":{"authors":[{"ref":"actor:dj-adams","name":"DJ Adams","json":"/actors/dj-adams.json"},{"ref":"actor:akatuoro","name":"Johannes Vogt","json":"/actors/akatuoro.json"},{"ref":"actor:danschlachter","name":"Daniel Schlachter","json":"/actors/danschlachter.json"}]}}