How do I extract the keywords from the query and chat engine from the knowledge graph index so that I use it to query my nebula graph on the streamlit app. For the query, I realized you used it did the assignment related_entities = list(list(response.metadata.values())[0]["kg_rel_map"].keys()) but the output format does not make the nebula graph query "f"MATCH p=(n)-[*1..2]-() \n WHERE id(n) IN {related_entities} \nRETURN p"" produce the intended results for the graph. It gives empty graph because related_entities format isn't recognized entity. Example, i mostly obtain the entity format like ['NLP{name: NLP}'] instead of ['NLP'] and like this ['NLP{name: NLP}', 'Language{name: Language}'] instead of ['NLP', 'Language']. Is there way you can assist me resolve this? Again, is there any way to get the extracted keywords for the chat engine too? I understand that when verbose=True, the intermediate results like extraced keywords are obtained. I'm curious, is there any way to extract the key words directly?
How do I extract the keywords from the query and chat engine from the knowledge graph index so that I use it to query my nebula graph on the streamlit app. For the query, I realized you used it did the assignment related_entities = list(list(response.metadata.values())[0]["kg_rel_map"].keys()) but the output format does not make the nebula graph query "f"MATCH p=(n)-[*1..2]-() \n WHERE id(n) IN {related_entities} \nRETURN p"" produce the intended results for the graph. It gives empty graph because related_entities format isn't recognized entity. Example, i mostly obtain the entity format like ['NLP{name: NLP}'] instead of ['NLP'] and like this ['NLP{name: NLP}', 'Language{name: Language}'] instead of ['NLP', 'Language']. Is there way you can assist me resolve this? Again, is there any way to get the extracted keywords for the chat engine too? I understand that when verbose=True, the intermediate results like extraced keywords are obtained. I'm curious, is there any way to extract the key words directly?