diff --git a/trustgraph-flow/setup.py b/trustgraph-flow/setup.py index cfaf4265..b91c69dd 100644 --- a/trustgraph-flow/setup.py +++ b/trustgraph-flow/setup.py @@ -96,7 +96,8 @@ setuptools.setup( "scripts/graph-rag", "scripts/kg-extract-definitions", "scripts/kg-extract-relationships", - "scripts/kg-extract-topics", + "scripts/kg-extract-agent", +# "scripts/kg-extract-topics", "scripts/kg-store", "scripts/kg-manager", "scripts/librarian", diff --git a/trustgraph-flow/trustgraph/extract/kg/agent/config.json b/trustgraph-flow/trustgraph/extract/kg/agent/config.json index d3109b6e..0ac54e84 100644 --- a/trustgraph-flow/trustgraph/extract/kg/agent/config.json +++ b/trustgraph-flow/trustgraph/extract/kg/agent/config.json @@ -2,7 +2,7 @@ "prompt": { "template.agent-kg-extract": { "id": "agent-kg-extract", - "prompt": "Analyze the following text and extract both entity definitions and relationships. Return the results as JSON with 'definitions' and 'relationships' arrays.\n\nFor definitions, extract entities and their explanations or descriptions.\nFor relationships, extract subject-predicate-object triples where subjects and objects are entities, and predicates are relationship types.\n\nText: {{text}}\n\nReturn JSON only, no other text. Use this exact format:\n{\n \"definitions\": [\n {\n \"entity\": \"entity_name\",\n \"definition\": \"definition_text\",\n \"context\": \"surrounding_context\"\n }\n ],\n \"relationships\": [\n {\n \"subject\": \"subject_entity\",\n \"predicate\": \"relationship_type\",\n \"object\": \"object_entity_or_literal\",\n \"object-entity\": true\n }\n ]\n}", + "prompt": "Analyze the following text and extract both entity definitions and relationships. Return the results as JSON with 'definitions' and 'relationships' arrays.\n\nFor definitions, extract entities and their explanations or descriptions.\nFor relationships, extract subject-predicate-object triples where subjects and objects are entities, and predicates are relationship types.\n\nText: {{text}}\n\nReturn JSON only, no other text. Use this exact format:\n{\n \"definitions\": [\n {\n \"entity\": \"entity_name\",\n \"definition\": \"definition_text\",\n }\n ],\n \"relationships\": [\n {\n \"subject\": \"subject_entity\",\n \"predicate\": \"relationship_type\",\n \"object\": \"object_entity_or_literal\",\n \"object-entity\": true\n }\n ]\n}", "response-type": "json", "schema": { "type": "object", @@ -14,9 +14,8 @@ "properties": { "entity": {"type": "string"}, "definition": {"type": "string"}, - "context": {"type": "string"} }, - "required": ["entity", "definition", "context"] + "required": ["entity", "definition"] } }, "relationships": { @@ -37,4 +36,4 @@ } } } -} \ No newline at end of file +}