Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
RolfSieberg committed Oct 10, 2024
2 parents b0539af + 428da1c commit 0ee77a6
Show file tree
Hide file tree
Showing 9 changed files with 944 additions and 14 deletions.
7 changes: 0 additions & 7 deletions Demos/HC_Vector_Engine_GenAI_Demo_App/Question-Guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ _The expert mode proved a very fast search of fitting movies for a question. Con
* Use the Movie Browser
* Compare RAG and No-RAG:
* Just if a sementic search and question sounds promissing, it doesn't mean, that it a well suited.
* Get an overview of "new" movies:
* [Movies 2022](./data_retrieval/movies/movie_summaries/movie_summary_2022.md)
* [Movies 2023](./data_retrieval/movies/movie_summaries/movie_summary_2023.md)
* [Movies 2024](./data_retrieval/movies/movie_summaries/movie_summary_2024.md)

_These lists of movies were created by applying an LLM to the Wikipedia pages and extracting director, genre and brief summary._


## Question design - How to phrase the question right

Expand Down
8 changes: 2 additions & 6 deletions Demos/HC_Vector_Engine_GenAI_Demo_App/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ HC_Vector_Engine_GenAI_Demo_App
2024.07

## Descripton
This content package will enable you to experience hands-on how the powerful vector engine in SAP HANA Cloud transforms simple queries into detailed, context-aware responses. The content package contains everything you need to build your own movie insights app.
By leveraging the power of vector-based storage and retrieval augmented generation, one can unlock unprecedented efficiency and scalability, that is crucial for managing vast datasets like in this example the movie collection. The SAP HANA Cloud Vector Engine empowers the movie insights app to deliver contextaware responses, enhancing user experiences and enabling more meaningful interactions. Additionally, its advanced analytics capabilities, including cosine similarity and L2 Euclidean distances, provide deeper insights into data relationships, enriching the exploration process. The SAP HANA Cloud Vector Engine serves as the underlying knowledge base for an Large Language Model (LLM), enhancing its ability to provide context-aware responses. By storing data in vector form, the engine enables the LLM to understand user queries more effectively, leading to more accurate and detailed responses. Ultimately, this showcases SAP HANA Cloud's capabilities in driving innovation, efficiency, and intelligence in data-driven
This content package will enable you to experience hands-on how the powerful vector engine in SAP HANA Cloud transforms simple queries into detailed, context-aware responses. The content package contains everything you need to build your own intelligent data app.
By leveraging the power of vector-based storage and retrieval augmented generation, one can unlock unprecedented efficiency and scalability, that is crucial for managing vast datasets like in this example the movie collection. The SAP HANA Cloud Vector Engine empowers the intelligent data app to deliver contextaware responses, enhancing user experiences and enabling more meaningful interactions. Additionally, its advanced analytics capabilities, including cosine similarity and L2 Euclidean distances, provide deeper insights into data relationships, enriching the exploration process. The SAP HANA Cloud Vector Engine serves as the underlying knowledge base for an Large Language Model (LLM), enhancing its ability to provide context-aware responses. By storing data in vector form, the engine enables the LLM to understand user queries more effectively, leading to more accurate and detailed responses. Ultimately, this showcases SAP HANA Cloud's capabilities in driving innovation, efficiency, and intelligence in data-driven
applications.

![HANA CLOUD Vector Engine](./images/VectorEngineDemo-App.png)
Expand Down Expand Up @@ -70,8 +70,6 @@ You can download the sample data set [here](https://d.dam.sap.com/a/NnpLcEG?rc=1
This application was build on code from [SAP-samples/btp-cap-genai-rag](https://github.com/SAP-samples/btp-cap-genai-rag/tree/main).
Deployment should be similar, however the current state of this app is Single Tenant on Cloud Foundry (CF) only.

The folder [data_retrieval](./data_retrieval/) contains various scripts and the data used in this dmeo.

This is only necessary for preparation of the demo. Once all data is imported, the demo be used without further data retrieval.


Expand Down Expand Up @@ -187,6 +185,4 @@ Therefore, the following issues are open. Be aware when hosting it or use as tem
N/A

## How to obtain support
[Create an issue](https://github.com/SAP-samples/btp-cap-genai-rag/issues) in this repository if you find a bug or have questions about the content.

For additional support, [ask a question in SAP Community](https://answers.sap.com/questions/ask.html).
Binary file added SAC_Custom_Widgets/Line Chart/Linechart.js.zip
Binary file not shown.
249 changes: 249 additions & 0 deletions SAC_Custom_Widgets/Tree Chart with Styling Panel/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
{
"eula": "",
"vendor": "SAP",
"license": "",
"id": "com.sap.sac.en.tree.chart",
"version": "1.0.0",
"name": "Tree Chart",
"icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAASCAYAAABSO15qAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAzklEQVQ4jWNgoBAwkqLYOLGjguH//1RGxv+7z8yvymBgYGBgIcm2//8lGRgZlP7/Z5CDiTGRYgA2QLEBOL2gFVrPxsXDYcfAwMDw7cuPQ9dWN/4iyQBebi75vwz/dkPZagwMDLexqaOeF4wT2jcyMjL4Mfz/33tmQVUJsQYgueA/K4RmZCXFBQMfjQNvADwWGBkZHv3/z3CPgZHxOQMDAwPjv9/fGJiZ7sLZDAwM/xkZnzP8/3+PkZHhEaUWwwGjSWL7f0oMYGFgYFCmxAAACtUz95booNoAAAAASUVORK5CYII=",
"newInstancePrefix": "LinnaChart",
"description": "A Tree Custom Widget",
"supportsExport": true,
"webcomponents": [
{
"kind": "main",
"tag": "com-sap-sac-en-tree-main",
"url": "/main.js",
"integrity": "",
"ignoreIntegrity": true
},
{
"kind": "styling",
"tag": "com-sap-sac-en-tree-styling",
"url": "/styling.js",
"integrity": "",
"ignoreIntegrity": true
}
],
"properties": {
"width": {
"type": "integer",
"default": 600
},
"height": {
"type": "integer",
"default": 420
},
"seriesLineType": {
"type": "string",
"default": "curve",
"description": "default Series Line type"
},
"seriesType": {
"type": "string",
"default": "LR",
"description": "default Series type"
},
"treeStructName": {
"type": "string",
"default": "root",
"description": "root node name"
},
"nodeFontsize": {
"type": "integer",
"default": 10,
"description": "fontsize"
},
"treeNodeType": {
"type": "string",
"default": "emptyCircle",
"description": "node shape"
},
"treeNodeColor": {
"type": "string",
"default": "#99C3D6",
"description": "node color"
},
"nodeSymbolSize": {
"type": "integer",
"default": 9,
"description": "node zise"
},
"treeNodeLineWidth": {
"type": "integer",
"default": 2,
"description": "line weight"
},
"nodeHighLigbt": {
"type": "integer",
"default": 500000,
"description": "the threshold value"
},
"seriesLayout": {
"type": "string",
"default": "orthogonal",
"description": "orthogonal or radial"
}
},

"methods":{
"setSeriesLayout": {
"description": "Set series layout type",
"parameters": [
{
"name": "value",
"type": "string",
"description": "setSeriesLayout according to value"
}
]
},
"setSeriesLineType": {
"description": "Set series line type",
"parameters": [
{
"name": "value",
"type": "string",
"description": "set Series Line type according to value"
}
]
},
"setSeriesType": {
"description": "Set series type",
"parameters": [
{
"name": "value",
"type": "string",
"description": "set Series type according to value"
}
]
},
"setTreeStructName": {
"description": "Set treeStruct Name",
"parameters": [
{
"name": "value",
"type": "string",
"description": "set treeStruct Name according to value"
}
]
},
"setNodeFontsize": {
"description": "Set node Fontsize",
"parameters": [
{
"name": "value",
"type": "integer",
"description": "set node Fontsize according to value"
}
]
},
"setTreeNodeType": {
"description": "Set node Type",
"parameters": [
{
"name": "value",
"type": "string",
"description": "set node Type according to value"
}
]
},
"setTreeNodeColor": {
"description": "Set treeNodeColor Name",
"parameters": [
{
"name": "value",
"type": "string",
"description": "set treeNodeColor according to value"
}
]
},
"setNodeSymbolSize": {
"description": "Set symbolSize",
"parameters": [
{
"name": "value",
"type": "integer",
"description": "set node symbolSize according to value"
}
]
},
"setNodeHighLigbt": {
"description": "Set nodeHighLigbt",
"parameters": [
{
"name": "value",
"type": "integer",
"description": "set nodeHighLigbt according to value"
}
]
},
"setTreeNodeLineWidth": {
"description": "Set nodeLineWidth",
"parameters": [
{
"name": "value",
"type": "integer",
"description": "set node Line Width according to value"
}
]
},
"getSelectedDataPoint": {
"description": "Get selected data point",
"returnType": "EChartDataPoint"
}
},
"events":{
"onClick": {
"description": "Dispatch when user click a data point on eChart"
}
},
"types": {
"EChartDataPoint": {
"description": "EChart data point",
"properties": [
{
"name": "seriesIndex",
"type": "integer",
"description": "series index in incoming option.series (make sense when componentType is 'series')"
},
{
"name": "seriesName",
"type": "string",
"description": "series name (make sense when componentType is 'series')"
},
{
"name": "dataIndex",
"type": "integer",
"description": "data index in input data array"
},
{
"name": "data",
"type": "number",
"description": "data value"
},
{
"name": "name",
"type": "string",
"description": "data name, or category name"
}
]
}
},
"dataBindings": {
"dataBinding": {
"feeds": [
{
"id": "dimensions",
"description": "Dimensions",
"type": "dimension"
},
{
"id": "measures",
"description": "Measures",
"type": "mainStructureMember"
}
]
}
}
}

Loading

0 comments on commit 0ee77a6

Please sign in to comment.