Embeddings & Semantic Search
Embeddings are powerful and dense numeric representations of data that capture the underlying meaning of words or concepts. In business applications, they enable more intelligent, context-aware search capabilities. By using Embedding Models, businesses can transform textual or other data into vector representations. These vectors are then stored in a vector database, which facilitates fast and efficient similarity searches using methods like cosine similarity. This allows for semantic search functionality, where results are based on meaning rather than exact keyword matches, improving search relevance, user experience, and overall operational efficiency.
Architecture
In this architecture, the Cloud Application Programming (CAP) model serves as the central interface for managing application logic and executing searches. CAP natively supports embeddings as part of its data schema, allowing for seamless integration of vector representations. When user inputs are processed, they are converted into embeddings using Embedding Models via the Generative AI Hub. These vectors are then stored and indexed within SAP HANA Cloud's Vector Engine, enabling fast similarity searches through methods like cosine similarity. Upon initiating a search, the CAP model communicates with the Vector Engine to retrieve results based on the semantic meaning of the inputs, leading to contextually relevant responses. Additionally, various SDKs and plugins, such as the SAP Cloud SDK (for AI), CAP LLM Plugin and LangChain, enhance the embedding process and streamline integration with both, the Generative AI Hub and the Vector Engine.
Services & Components
For a comprehensive list of services, components and descriptions, please explore the Introduction on Services & Components.
Examples
Take a look at the following examples that build upon or implement elements of the Reference Architecture:
- SAP BTP genAI starter kit wants to give users of the SAP Business Technology Platform (BTP) a quick way to learn how to use generative AI with BTP services.
- CAP with Generative AI Hub & SAP HANA Cloud Vector Engine
- GenAI Mail Insights - Develop a CAP-based application using GenAI and RAG on SAP BTP
- CAP Application: Semantic Search Integrated with Generative AI Hub and SAP HANA Cloud's Vector Engine