[Feature Request]: configuration of entity types and custom kg in LightRAG server
Do you need to file a feature request?
- [x] I have searched the existing feature request and this feature request is not already filed.
- [x] I believe this is a legitimate feature request, not just a question or bug.
Feature Request Description
Hello,
I would like to be able to provide a custom KG and list of entity types to my LightRAG server.
- The custom KG could be provided as an environment variable pointing to a json file (or a directory of files ?)
- The list of entity types could be provided as an environment variable as well. Using the same format as the one used in
PROMPTS["DEFAULT_ENTITY_TYPES"].
What do you think ?
Thanks
Additional Context
No response
+1
Being able to pass a configuration would be preferable.
I believe this is currently possible:
if you pass a dict for "addon_params"
https://github.com/HKUDS/LightRAG/blob/7a67f6c2fd95aa01c7a9c7945874eb170b1eb6f0/examples/lightrag_oracle_demo.py#L94
config["addon_params"] = {
"entity_types": args.entity_types,
"language": "English",
"example_number": 0 # Disable default examples
}
Yes, I know it is possible if I use lightrag package in my python code. But here the point is to be able to do it also in the LightRAG server, with only configuration via environment variables and config files (no Python code).
+1 I need this feature badly.
Do you mean we may need a feature to specify the type of nodes stored in the graph database before queries, so that when retrieve knowledge we can only get nodes in a specific range as knowledge input?
Can I just add my own types in DEFAULT_ENTITY_TYPES ? Will the Lightrag server get them on every start?
I changed the contents of the PROMPTS["DEFAULT_ENTITY_TYPES"] directly in the prompts.py file. This should do the job, but it did not work. I have to look deer into the code to understand the flow, but I am surprised it doesn't work. If someone knows, please share this info here.