knowledge graph llm python