sap-tutorials / Tutorials

Tutorials on sap.com
https://developers.sap.com/tutorial-navigator.html
Creative Commons Attribution 4.0 International
692 stars 766 forks source link

Retrieval Augmented Generation using generative-ai-hub-sdk and HANA vector search #23529

Open YoheiFukuhara opened 2 months ago

YoheiFukuhara commented 2 months ago

Tutorials: https://developers.sap.com/tutorials/ai-core-genai-hana-vector.html

Write here how you think we can improve the tutorial ...

Step1: Loading vector data from a csv file

url='https://github.com/SAP-samples/ai-core-samples/blob/main/08_VectorStore/Hana/GRAPH_DOCU_QRC.csv?raw=true'
df = pd.read_csv(url, low_memory=False)

The above code is a little bit easier if the file is not going to be changed.

Step7: Setting up hana_ml and generative-ai-hub-sdk

it is better to mention how to configure AICORE_HOME described on https://pypi.org/project/ai-core-sdk/

A profile is a json file residing in a config directory, which can be set via environment variable AICORE_HOME (the default being ~/.aicore/config.json).

Step14: Creating a table and adding data

table names are different.