Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NebularGraph just support english? #5765

Closed
JinSeoung-Oh opened this issue Nov 17, 2023 · 4 comments
Closed

NebularGraph just support english? #5765

JinSeoung-Oh opened this issue Nov 17, 2023 · 4 comments

Comments

@JinSeoung-Oh
Copy link

I'm building GraphRAG with nebular graph and Llama-index.
I made a module for extracting triplet from korean chunk data
And pass it Llama-index, it return english KG not korean KG.
I don't want translate my korean triplet. I just want to make korean KG.

I searched NebularGraph just only support English, but I cannot find out.

Basically, NebularGarph Query is English(at least, keyword)
So, maybe, because of this my korean triplet translate to english
But, if I'm not wrong, the language used to create the graph doesn't matter. It's only a problem in queries.

So, I want know why my korean triplet translate english triplet
Does Nebula Graph have a function to translate the given text into English and save it?

Thanks!

@wey-gu
Copy link
Contributor

wey-gu commented Nov 17, 2023

Dear @JinSeoung-Oh , welcome to the NebulaGraph community!

We could override the prompt and (if openai was used, adding a system prompt to remind him to keep original languages may help, too).

In this example, I showed how to leverage models other than openai && how to override triplet extraction prompts for your reference(sorry it's in Chinese)!

Let us know your attempts and results!

Thanks!

@wey-gu
Copy link
Contributor

wey-gu commented Nov 17, 2023

So, I want know why my korean triplet translate english triplet
Does Nebula Graph have a function to translate the given text into English and save it?

This was due to the prompts inside the llama-index being all English-based, thus sometimes it confused what language to return.

I recommend highlighting this in the triplet extraction prompt to do so.

If still you cannot do it with the example, I can provide detailed examples.

Thanks.

@JinSeoung-Oh
Copy link
Author

JinSeoung-Oh commented Nov 17, 2023

@wey-gu, Thanks! It is very helpful.
A few minutes ago, I re-run my code that has already failed dozens of times to return korean KG
And knowledgeGraphIndex return korean KG, suddenly....

Maybe your right. It is Llama_index error, maybe..

Thank for your help and have a nice day!

Thanks!!

@wey-gu
Copy link
Contributor

wey-gu commented Nov 17, 2023

Yes, I encountered this when building chinese kg with local models and the way to mitigate was to override the prompts for triplets extraction as in above example link :D.

Feel free to ping me for anything I could help.

PS. will bring more optimization for knowledge graph index/text2cypher/graph rag to llamaindex next week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants