DataRetrievalTool

class hana_ai.tools.hana_ml_tools.graph_tools.DataRetrievalTool(connection_context: ConnectionContext, return_direct: bool = False)

Tool for interacting with Data Retrieval.

Parameters:
connection_contextConnectionContext

Connection context to the HANA database.

Returns
-------
str

The Data Retrieval query result as a string.

name: str

The unique name of the tool that clearly communicates its purpose.

description: str

Used to tell the model how/when/why to use the tool.

You can provide few-shot examples as a part of the description.

connection_context: ConnectionContext

Connection context to the HANA database.

configure(remote_source_name: str = None, rag_schema_name: str = None, rag_table_name: str = None, knowledge_graph_name: str = None, schema_name: str = 'SYS', procedure_name: str | None = 'AI_DATA_RETRIEVAL', metadata_schema_name: str | None = None, metadata_object_prefix: str | None = None)

Configure the additional settings for Data Retrieval.

Parameters:
remote_source_namestr

The name of the remote source to connect to AI Core.

rag_schema_namestr

The schema name where RAG tables are stored.

rag_table_namestr

The table name where RAG data is stored.

knowledge_graph_namestr

The name of the knowledge graph to use.

schema_namestr, optional

The schema name where the Data Retrieval stored procedure is located, by default "SYS".

procedure_namestr | None, optional

The name of the Data Retrieval stored procedure, by default None.

metadata_schema_namestr | None, optional

Value for the procedure's AI_METADATA_SCHEMA_NAME IN parameter (no-wrapper deployments only). See ObjectDiscoveryTool.configure().

metadata_object_prefixstr | None, optional

Value for AI_METADATA_OBJECT_PREFIX.