kuzu
kuzu copied to clipboard
Feature: Customizable Schema in LlamaIndex adaptor
API
Python
Description
Currently if we use Kùzu's LlamaIndex KuzuPropertyGraphStore
, we can only create an EntityNode which has the following allowed fields:
id STRING,
name STRING,
label STRING,
embedding DOUBLE[],
creation_date DATE,
last_modified_date DATE,
file_name STRING,
file_path STRING,
file_size INT64,
file_type STRING,
triplet_source_id STRING,
PRIMARY KEY(id)
This is too restrictive in the case where we are trying to manually insert nodes of different types having different fields. In case we add some node which has a differently named field, say contents
, currently the LlamaIndex adaptor would allow the node to be added, but when we try to read back the same node, the new field contents
would not show up.
By a quick inspecton of the code, I see two ways this could be done, (a) add a map
parameter called properties
inside EntityNodes which enable us to add any property (as long as the value is a string or a known type), or (b) allow the user to specify a custom schema for each node type.