diff --git a/backend/app/rag/retrievers/knowledge_graph/schema.py b/backend/app/rag/retrievers/knowledge_graph/schema.py index a11638bc6..5cf0cf362 100644 --- a/backend/app/rag/retrievers/knowledge_graph/schema.py +++ b/backend/app/rag/retrievers/knowledge_graph/schema.py @@ -197,14 +197,14 @@ def retrieve_knowledge_graph(self, query_str: str) -> KnowledgeGraphRetrievalRes {relationships_str} """ DEFAULT_ENTITY_TMPL = """ -- Name: {{ name }} - Description: {{ description }} +- Name: {name} + Description: {description} """ DEFAULT_RELATIONSHIP_TMPL = """ -- Description: {{ rag_description }} - Weight: {{ weight }} - Last Modified At: {{ last_modified_at }} - Meta: {{ meta }} +- Description: {rag_description} + Weight: {weight} + Last Modified At: {last_modified_at} + Meta: {meta} """ @@ -283,7 +283,7 @@ def _get_relationships_str(self) -> str: strs = [] for relationship in self.relationships: strs.append( - self.entity_template.format( + self.relationship_template.format( rag_description=relationship.rag_description, weight=relationship.weight, last_modified_at=relationship.last_modified_at,