llama_index 如何使用Property Graph Index分析中文文本?

cgvd09ve  于 1个月前  发布在  其他
关注(0)|答案(1)|浏览(33)

问题验证

  • 我已在文档和Discord中寻找答案。

问题

如何使用Property Graph Index分析中文文本?需要重新定义prompt吗?

vddsk6oq

vddsk6oq1#

是的,您需要重新定义 prompt 以使用 Property Graph Index 分析中文文本。可以通过自定义 TextToCypherRetriever 类中的 text_to_cypher_template 参数来处理不同的语言,包括中文。
您可以定义一个适用于中文文本的 text_to_cypher_template1(https://github.com/run-llama/llama_index/blob/main/llama-index-core/llama_index/core/indices/property_graph/sub_retrievers/text_to_cypher.py)。

  • 要继续与 Dosu 对话,请提及 @dosu。*

相关问题