diff --git a/Makefile b/Makefile index 7a644e11..29454042 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # VERSION=$(shell git describe | sed 's/^v//') -VERSION=0.7.9 +VERSION=0.7.10 DOCKER=podman diff --git a/scripts/prompt-template b/scripts/prompt-template new file mode 100755 index 00000000..91d94216 --- /dev/null +++ b/scripts/prompt-template @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +from trustgraph.model.prompt.template import run + +run() + diff --git a/setup.py b/setup.py index a8cf50ba..05627d13 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import os with open("README.md", "r") as fh: long_description = fh.read() -version = "0.7.9" +version = "0.7.10" setuptools.setup( name="trustgraph", @@ -73,6 +73,7 @@ setuptools.setup( "scripts/loader", "scripts/pdf-decoder", "scripts/prompt-generic", + "scripts/prompt-template", "scripts/query", "scripts/run-processing", "scripts/text-completion-azure", diff --git a/templates/components/azure.jsonnet b/templates/components/azure.jsonnet index 50e818cc..a597177b 100644 --- a/templates/components/azure.jsonnet +++ b/templates/components/azure.jsonnet @@ -1,6 +1,7 @@ local base = import "base.jsonnet"; local images = import "images.jsonnet"; local url = import "url.jsonnet"; +local prompts = import "../prompts/mixtral.jsonnet"; { services +: { @@ -67,4 +68,6 @@ local url = import "url.jsonnet"; }, }, -} +} + prompts + + diff --git a/templates/components/bedrock.jsonnet b/templates/components/bedrock.jsonnet index dca554ab..9e2d4678 100644 --- a/templates/components/bedrock.jsonnet +++ b/templates/components/bedrock.jsonnet @@ -1,6 +1,7 @@ local base = import "base.jsonnet"; local images = import "images.jsonnet"; local url = import "url.jsonnet"; +local prompts = import "../prompts/mixtral.jsonnet"; { services +: { @@ -102,4 +103,6 @@ local url = import "url.jsonnet"; }, }, -} +} + prompts + + diff --git a/templates/components/claude.jsonnet b/templates/components/claude.jsonnet index 42cf8e23..5385dcb8 100644 --- a/templates/components/claude.jsonnet +++ b/templates/components/claude.jsonnet @@ -1,6 +1,7 @@ local base = import "base.jsonnet"; local images = import "images.jsonnet"; local url = import "url.jsonnet"; +local prompts = import "../prompts/mixtral.jsonnet"; { services +: { @@ -63,4 +64,4 @@ local url = import "url.jsonnet"; }, }, -} +} + prompts diff --git a/templates/components/cohere.jsonnet b/templates/components/cohere.jsonnet index 1e64e7d4..c8a9888d 100644 --- a/templates/components/cohere.jsonnet +++ b/templates/components/cohere.jsonnet @@ -1,6 +1,7 @@ local base = import "base.jsonnet"; local images = import "images.jsonnet"; local url = import "url.jsonnet"; +local prompts = import "../prompts/mixtral.jsonnet"; { services +: { @@ -84,4 +85,4 @@ local url = import "url.jsonnet"; }, }, -} +} + prompts diff --git a/templates/components/ollama.jsonnet b/templates/components/ollama.jsonnet index fec22067..612e1747 100644 --- a/templates/components/ollama.jsonnet +++ b/templates/components/ollama.jsonnet @@ -1,6 +1,7 @@ local base = import "base.jsonnet"; local images = import "images.jsonnet"; local url = import "url.jsonnet"; +local prompts = import "../prompts/slm.jsonnet"; { services +: { @@ -59,4 +60,4 @@ local url = import "url.jsonnet"; }, }, -} +} + prompts diff --git a/templates/components/openai.jsonnet b/templates/components/openai.jsonnet index 24e615f1..b18f0ae3 100644 --- a/templates/components/openai.jsonnet +++ b/templates/components/openai.jsonnet @@ -1,6 +1,7 @@ local base = import "base.jsonnet"; local images = import "images.jsonnet"; local url = import "url.jsonnet"; +local prompts = import "../prompts/openai.jsonnet"; { services +: { @@ -63,4 +64,4 @@ local url = import "url.jsonnet"; }, }, -} +} + prompts diff --git a/templates/components/trustgraph.jsonnet b/templates/components/trustgraph.jsonnet index 12484da8..f3a78b63 100644 --- a/templates/components/trustgraph.jsonnet +++ b/templates/components/trustgraph.jsonnet @@ -171,61 +171,7 @@ local url = import "url.jsonnet"; }, }, - "prompt": base + { - image: images.trustgraph, - command: [ - "prompt-generic", - "-p", - url.pulsar, - "--text-completion-request-queue", - "non-persistent://tg/request/text-completion", - "--text-completion-response-queue", - "non-persistent://tg/response/text-completion-response", - ], - deploy: { - resources: { - limits: { - cpus: '0.5', - memory: '128M' - }, - reservations: { - cpus: '0.1', - memory: '128M' - } - } - }, - }, - - "prompt-rag": base + { - image: images.trustgraph, - command: [ - "prompt-generic", - "-p", - url.pulsar, - "-i", - "non-persistent://tg/request/prompt-rag", - "-o", - "non-persistent://tg/response/prompt-rag-response", - "--text-completion-request-queue", - "non-persistent://tg/request/text-completion-rag", - "--text-completion-response-queue", - "non-persistent://tg/response/text-completion-rag-response", - ], - deploy: { - resources: { - limits: { - cpus: '0.5', - memory: '128M' - }, - reservations: { - cpus: '0.1', - memory: '128M' - } - } - }, - }, - - }, + } } diff --git a/templates/components/vertexai.jsonnet b/templates/components/vertexai.jsonnet index 96ff6207..95d80bd8 100644 --- a/templates/components/vertexai.jsonnet +++ b/templates/components/vertexai.jsonnet @@ -1,6 +1,7 @@ local base = import "base.jsonnet"; local images = import "images.jsonnet"; local url = import "url.jsonnet"; +local prompts = import "../prompts/gemini.jsonnet"; { services +: { @@ -73,4 +74,6 @@ local url = import "url.jsonnet"; }, }, -} +} + prompts + + diff --git a/templates/prompts/gemini.jsonnet b/templates/prompts/gemini.jsonnet new file mode 100644 index 00000000..ec85816d --- /dev/null +++ b/templates/prompts/gemini.jsonnet @@ -0,0 +1,80 @@ + +// For VertexAI Gemini + +local base = import "../components/base.jsonnet"; +local images = import "../components/images.jsonnet"; +local url = import "../components/url.jsonnet"; + +{ + + services +: { + + "prompt": base + { + image: images.trustgraph, + command: [ + "prompt-template", + "-p", + url.pulsar, + "--text-completion-request-queue", + "non-persistent://tg/request/text-completion", + "--text-completion-response-queue", + "non-persistent://tg/response/text-completion-response", + "--definition-template", + "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n", + "--relationship-template", + "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n", + "--knowledge-query-template", + "Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements.\n\nHere's the knowledge statements:\n{graph}\n\nUse only the provided knowledge statements to respond to the following:\n{query}\n", + ], + deploy: { + resources: { + limits: { + cpus: '0.5', + memory: '128M' + }, + reservations: { + cpus: '0.1', + memory: '128M' + } + } + }, + }, + + "prompt-rag": base + { + image: images.trustgraph, + command: [ + "prompt-template", + "-p", + url.pulsar, + "-i", + "non-persistent://tg/request/prompt-rag", + "-o", + "non-persistent://tg/response/prompt-rag-response", + "--text-completion-request-queue", + "non-persistent://tg/request/text-completion-rag", + "--text-completion-response-queue", + "non-persistent://tg/response/text-completion-rag-response", + "--definition-template", + "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n", + "--relationship-template", + "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n", + "--knowledge-query-template", + "Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements.\n\nHere's the knowledge statements:\n{graph}\n\nUse only the provided knowledge statements to respond to the following:\n{query}\n", + ], + deploy: { + resources: { + limits: { + cpus: '0.5', + memory: '128M' + }, + reservations: { + cpus: '0.1', + memory: '128M' + } + } + }, + }, + + }, + +} diff --git a/templates/prompts/mixtral.jsonnet b/templates/prompts/mixtral.jsonnet new file mode 100644 index 00000000..7e74b2ef --- /dev/null +++ b/templates/prompts/mixtral.jsonnet @@ -0,0 +1,80 @@ + +// For Mixtral + +local base = import "../components/base.jsonnet"; +local images = import "../components/images.jsonnet"; +local url = import "../components/url.jsonnet"; + +{ + + services +: { + + "prompt": base + { + image: images.trustgraph, + command: [ + "prompt-template", + "-p", + url.pulsar, + "--text-completion-request-queue", + "non-persistent://tg/request/text-completion", + "--text-completion-response-queue", + "non-persistent://tg/response/text-completion-response", + "--definition-template", + "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n", + "--relationship-template", + "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n", + "--knowledge-query-template", + "Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements.\n\nHere's the knowledge statements:\n{graph}\n\nUse only the provided knowledge statements to respond to the following:\n{query}\n", + ], + deploy: { + resources: { + limits: { + cpus: '0.5', + memory: '128M' + }, + reservations: { + cpus: '0.1', + memory: '128M' + } + } + }, + }, + + "prompt-rag": base + { + image: images.trustgraph, + command: [ + "prompt-template", + "-p", + url.pulsar, + "-i", + "non-persistent://tg/request/prompt-rag", + "-o", + "non-persistent://tg/response/prompt-rag-response", + "--text-completion-request-queue", + "non-persistent://tg/request/text-completion-rag", + "--text-completion-response-queue", + "non-persistent://tg/response/text-completion-rag-response", + "--definition-template", + "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n", + "--relationship-template", + "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n", + "--knowledge-query-template", + "Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements.\n\nHere's the knowledge statements:\n{graph}\n\nUse only the provided knowledge statements to respond to the following:\n{query}\n", + ], + deploy: { + resources: { + limits: { + cpus: '0.5', + memory: '128M' + }, + reservations: { + cpus: '0.1', + memory: '128M' + } + } + }, + }, + + }, + +} diff --git a/templates/prompts/openai.jsonnet b/templates/prompts/openai.jsonnet new file mode 100644 index 00000000..55fe2a14 --- /dev/null +++ b/templates/prompts/openai.jsonnet @@ -0,0 +1,80 @@ + +// For OpenAI LLMs + +local base = import "../components/base.jsonnet"; +local images = import "../components/images.jsonnet"; +local url = import "../components/url.jsonnet"; + +{ + + services +: { + + "prompt": base + { + image: images.trustgraph, + command: [ + "prompt-template", + "-p", + url.pulsar, + "--text-completion-request-queue", + "non-persistent://tg/request/text-completion", + "--text-completion-response-queue", + "non-persistent://tg/response/text-completion-response", + "--definition-template", + "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n", + "--relationship-template", + "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n", + "--knowledge-query-template", + "Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements.\n\nHere's the knowledge statements:\n{graph}\n\nUse only the provided knowledge statements to respond to the following:\n{query}\n", + ], + deploy: { + resources: { + limits: { + cpus: '0.5', + memory: '128M' + }, + reservations: { + cpus: '0.1', + memory: '128M' + } + } + }, + }, + + "prompt-rag": base + { + image: images.trustgraph, + command: [ + "prompt-template", + "-p", + url.pulsar, + "-i", + "non-persistent://tg/request/prompt-rag", + "-o", + "non-persistent://tg/response/prompt-rag-response", + "--text-completion-request-queue", + "non-persistent://tg/request/text-completion-rag", + "--text-completion-response-queue", + "non-persistent://tg/response/text-completion-rag-response", + "--definition-template", + "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n", + "--relationship-template", + "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n", + "--knowledge-query-template", + "Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements.\n\nHere's the knowledge statements:\n{graph}\n\nUse only the provided knowledge statements to respond to the following:\n{query}\n", + ], + deploy: { + resources: { + limits: { + cpus: '0.5', + memory: '128M' + }, + reservations: { + cpus: '0.1', + memory: '128M' + } + } + }, + }, + + }, + +} diff --git a/templates/prompts/slm.jsonnet b/templates/prompts/slm.jsonnet new file mode 100644 index 00000000..ebdd808b --- /dev/null +++ b/templates/prompts/slm.jsonnet @@ -0,0 +1,69 @@ + +// For basic SLMs, use prompt-generic + +local base = import "../components/base.jsonnet"; +local images = import "../components/images.jsonnet"; +local url = import "../components/url.jsonnet"; + +{ + + services +: { + + "prompt": base + { + image: images.trustgraph, + command: [ + "prompt-generic", + "-p", + url.pulsar, + "--text-completion-request-queue", + "non-persistent://tg/request/text-completion", + "--text-completion-response-queue", + "non-persistent://tg/response/text-completion-response", + ], + deploy: { + resources: { + limits: { + cpus: '0.5', + memory: '128M' + }, + reservations: { + cpus: '0.1', + memory: '128M' + } + } + }, + }, + + "prompt-rag": base + { + image: images.trustgraph, + command: [ + "prompt-generic", + "-p", + url.pulsar, + "-i", + "non-persistent://tg/request/prompt-rag", + "-o", + "non-persistent://tg/response/prompt-rag-response", + "--text-completion-request-queue", + "non-persistent://tg/request/text-completion-rag", + "--text-completion-response-queue", + "non-persistent://tg/response/text-completion-rag-response", + ], + deploy: { + resources: { + limits: { + cpus: '0.5', + memory: '128M' + }, + reservations: { + cpus: '0.1', + memory: '128M' + } + } + + }, + }, + + }, + +} diff --git a/tg-launch-azure-cassandra.yaml b/tg-launch-azure-cassandra.yaml index 99fd88e9..df4c16cb 100644 --- a/tg-launch-azure-cassandra.yaml +++ b/tg-launch-azure-cassandra.yaml @@ -33,7 +33,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "embeddings": "command": @@ -50,7 +50,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "etcd": "command": @@ -122,7 +122,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "init-pulsar": "command": @@ -155,7 +155,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -170,7 +170,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "milvus": "command": @@ -232,7 +232,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prometheus": "deploy": @@ -252,13 +252,26 @@ - "prometheus-data:/prometheus" "prompt": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "--text-completion-request-queue" - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -267,11 +280,11 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prompt-rag": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "-i" @@ -282,6 +295,19 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -290,7 +316,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -343,7 +369,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "query-triples": "command": @@ -360,7 +386,7 @@ "reservations": "cpus": "0.1" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -377,7 +403,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-triples": "command": @@ -394,7 +420,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion": "command": @@ -417,7 +443,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion-rag": "command": @@ -444,7 +470,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "vectorize": "command": @@ -459,7 +485,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/tg-launch-azure-neo4j.yaml b/tg-launch-azure-neo4j.yaml index 470495b9..16f6ab42 100644 --- a/tg-launch-azure-neo4j.yaml +++ b/tg-launch-azure-neo4j.yaml @@ -16,7 +16,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "embeddings": "command": @@ -33,7 +33,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "etcd": "command": @@ -105,7 +105,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "init-pulsar": "command": @@ -138,7 +138,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -153,7 +153,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "milvus": "command": @@ -233,7 +233,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prometheus": "deploy": @@ -253,13 +253,26 @@ - "prometheus-data:/prometheus" "prompt": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "--text-completion-request-queue" - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -268,11 +281,11 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prompt-rag": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "-i" @@ -283,6 +296,19 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -291,7 +317,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -344,7 +370,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "query-triples": "command": @@ -361,7 +387,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -378,7 +404,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-triples": "command": @@ -395,7 +421,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion": "command": @@ -418,7 +444,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion-rag": "command": @@ -445,7 +471,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "vectorize": "command": @@ -460,7 +486,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": "etcd": {} diff --git a/tg-launch-bedrock-cassandra.yaml b/tg-launch-bedrock-cassandra.yaml index 9ac0991e..6429f63d 100644 --- a/tg-launch-bedrock-cassandra.yaml +++ b/tg-launch-bedrock-cassandra.yaml @@ -33,7 +33,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "embeddings": "command": @@ -50,7 +50,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "etcd": "command": @@ -122,7 +122,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "init-pulsar": "command": @@ -155,7 +155,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -170,7 +170,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "milvus": "command": @@ -232,7 +232,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prometheus": "deploy": @@ -252,13 +252,26 @@ - "prometheus-data:/prometheus" "prompt": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "--text-completion-request-queue" - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -267,11 +280,11 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prompt-rag": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "-i" @@ -282,6 +295,19 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -290,7 +316,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -343,7 +369,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "query-triples": "command": @@ -360,7 +386,7 @@ "reservations": "cpus": "0.1" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -377,7 +403,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-triples": "command": @@ -394,7 +420,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion": "command": @@ -421,7 +447,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion-rag": "command": @@ -452,7 +478,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "vectorize": "command": @@ -467,7 +493,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/tg-launch-bedrock-neo4j.yaml b/tg-launch-bedrock-neo4j.yaml index 9b75ca1d..a39652c0 100644 --- a/tg-launch-bedrock-neo4j.yaml +++ b/tg-launch-bedrock-neo4j.yaml @@ -16,7 +16,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "embeddings": "command": @@ -33,7 +33,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "etcd": "command": @@ -105,7 +105,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "init-pulsar": "command": @@ -138,7 +138,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -153,7 +153,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "milvus": "command": @@ -233,7 +233,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prometheus": "deploy": @@ -253,13 +253,26 @@ - "prometheus-data:/prometheus" "prompt": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "--text-completion-request-queue" - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -268,11 +281,11 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prompt-rag": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "-i" @@ -283,6 +296,19 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -291,7 +317,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -344,7 +370,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "query-triples": "command": @@ -361,7 +387,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -378,7 +404,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-triples": "command": @@ -395,7 +421,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion": "command": @@ -422,7 +448,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion-rag": "command": @@ -453,7 +479,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "vectorize": "command": @@ -468,7 +494,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": "etcd": {} diff --git a/tg-launch-claude-cassandra.yaml b/tg-launch-claude-cassandra.yaml index 594c04f8..bd688287 100644 --- a/tg-launch-claude-cassandra.yaml +++ b/tg-launch-claude-cassandra.yaml @@ -33,7 +33,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "embeddings": "command": @@ -50,7 +50,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "etcd": "command": @@ -122,7 +122,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "init-pulsar": "command": @@ -155,7 +155,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -170,7 +170,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "milvus": "command": @@ -232,7 +232,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prometheus": "deploy": @@ -252,13 +252,26 @@ - "prometheus-data:/prometheus" "prompt": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "--text-completion-request-queue" - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -267,11 +280,11 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prompt-rag": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "-i" @@ -282,6 +295,19 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -290,7 +316,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -343,7 +369,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "query-triples": "command": @@ -360,7 +386,7 @@ "reservations": "cpus": "0.1" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -377,7 +403,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-triples": "command": @@ -394,7 +420,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion": "command": @@ -415,7 +441,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion-rag": "command": @@ -440,7 +466,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "vectorize": "command": @@ -455,7 +481,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/tg-launch-claude-neo4j.yaml b/tg-launch-claude-neo4j.yaml index 3310892e..8bb4614d 100644 --- a/tg-launch-claude-neo4j.yaml +++ b/tg-launch-claude-neo4j.yaml @@ -16,7 +16,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "embeddings": "command": @@ -33,7 +33,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "etcd": "command": @@ -105,7 +105,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "init-pulsar": "command": @@ -138,7 +138,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -153,7 +153,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "milvus": "command": @@ -233,7 +233,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prometheus": "deploy": @@ -253,13 +253,26 @@ - "prometheus-data:/prometheus" "prompt": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "--text-completion-request-queue" - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -268,11 +281,11 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prompt-rag": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "-i" @@ -283,6 +296,19 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -291,7 +317,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -344,7 +370,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "query-triples": "command": @@ -361,7 +387,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -378,7 +404,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-triples": "command": @@ -395,7 +421,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion": "command": @@ -416,7 +442,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion-rag": "command": @@ -441,7 +467,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "vectorize": "command": @@ -456,7 +482,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": "etcd": {} diff --git a/tg-launch-cohere-cassandra.yaml b/tg-launch-cohere-cassandra.yaml index ce9b61f5..45d3ac3a 100644 --- a/tg-launch-cohere-cassandra.yaml +++ b/tg-launch-cohere-cassandra.yaml @@ -33,7 +33,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "embeddings": "command": @@ -50,7 +50,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "etcd": "command": @@ -122,7 +122,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "init-pulsar": "command": @@ -155,7 +155,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -170,7 +170,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "milvus": "command": @@ -232,7 +232,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prometheus": "deploy": @@ -252,13 +252,26 @@ - "prometheus-data:/prometheus" "prompt": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "--text-completion-request-queue" - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -267,11 +280,11 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prompt-rag": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "-i" @@ -282,6 +295,19 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -290,7 +316,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -343,7 +369,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "query-triples": "command": @@ -360,7 +386,7 @@ "reservations": "cpus": "0.1" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -377,7 +403,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-triples": "command": @@ -394,7 +420,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion": "command": @@ -413,7 +439,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion-rag": "command": @@ -436,7 +462,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "vectorize": "command": @@ -451,7 +477,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/tg-launch-cohere-neo4j.yaml b/tg-launch-cohere-neo4j.yaml index ecc8fb2b..80fcdd99 100644 --- a/tg-launch-cohere-neo4j.yaml +++ b/tg-launch-cohere-neo4j.yaml @@ -16,7 +16,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "embeddings": "command": @@ -33,7 +33,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "etcd": "command": @@ -105,7 +105,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "init-pulsar": "command": @@ -138,7 +138,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -153,7 +153,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "milvus": "command": @@ -233,7 +233,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prometheus": "deploy": @@ -253,13 +253,26 @@ - "prometheus-data:/prometheus" "prompt": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "--text-completion-request-queue" - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -268,11 +281,11 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prompt-rag": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "-i" @@ -283,6 +296,19 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -291,7 +317,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -344,7 +370,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "query-triples": "command": @@ -361,7 +387,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -378,7 +404,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-triples": "command": @@ -395,7 +421,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion": "command": @@ -414,7 +440,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion-rag": "command": @@ -437,7 +463,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "vectorize": "command": @@ -452,7 +478,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": "etcd": {} diff --git a/tg-launch-ollama-cassandra.yaml b/tg-launch-ollama-cassandra.yaml index 7486b07e..c3cebcde 100644 --- a/tg-launch-ollama-cassandra.yaml +++ b/tg-launch-ollama-cassandra.yaml @@ -33,7 +33,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "embeddings": "command": @@ -50,7 +50,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "etcd": "command": @@ -122,7 +122,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "init-pulsar": "command": @@ -155,7 +155,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -170,7 +170,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "milvus": "command": @@ -232,7 +232,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prometheus": "deploy": @@ -267,7 +267,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prompt-rag": "command": @@ -290,7 +290,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -343,7 +343,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "query-triples": "command": @@ -360,7 +360,7 @@ "reservations": "cpus": "0.1" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -377,7 +377,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-triples": "command": @@ -394,7 +394,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion": "command": @@ -413,7 +413,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion-rag": "command": @@ -436,7 +436,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "vectorize": "command": @@ -451,7 +451,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/tg-launch-ollama-neo4j.yaml b/tg-launch-ollama-neo4j.yaml index 161b55b4..b9be83b9 100644 --- a/tg-launch-ollama-neo4j.yaml +++ b/tg-launch-ollama-neo4j.yaml @@ -16,7 +16,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "embeddings": "command": @@ -33,7 +33,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "etcd": "command": @@ -105,7 +105,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "init-pulsar": "command": @@ -138,7 +138,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -153,7 +153,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "milvus": "command": @@ -233,7 +233,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prometheus": "deploy": @@ -268,7 +268,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prompt-rag": "command": @@ -291,7 +291,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -344,7 +344,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "query-triples": "command": @@ -361,7 +361,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -378,7 +378,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-triples": "command": @@ -395,7 +395,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion": "command": @@ -414,7 +414,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion-rag": "command": @@ -437,7 +437,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "vectorize": "command": @@ -452,7 +452,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": "etcd": {} diff --git a/tg-launch-openai-cassandra.yaml b/tg-launch-openai-cassandra.yaml index 5a9675e1..e153c8d6 100644 --- a/tg-launch-openai-cassandra.yaml +++ b/tg-launch-openai-cassandra.yaml @@ -33,7 +33,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "embeddings": "command": @@ -50,7 +50,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "etcd": "command": @@ -122,7 +122,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "init-pulsar": "command": @@ -155,7 +155,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -170,7 +170,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "milvus": "command": @@ -232,7 +232,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prometheus": "deploy": @@ -252,13 +252,26 @@ - "prometheus-data:/prometheus" "prompt": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "--text-completion-request-queue" - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -267,11 +280,11 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prompt-rag": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "-i" @@ -282,6 +295,19 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -290,7 +316,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -343,7 +369,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "query-triples": "command": @@ -360,7 +386,7 @@ "reservations": "cpus": "0.1" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -377,7 +403,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-triples": "command": @@ -394,7 +420,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion": "command": @@ -415,7 +441,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion-rag": "command": @@ -440,7 +466,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "vectorize": "command": @@ -455,7 +481,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/tg-launch-openai-neo4j.yaml b/tg-launch-openai-neo4j.yaml index e8ee42b5..813e3a38 100644 --- a/tg-launch-openai-neo4j.yaml +++ b/tg-launch-openai-neo4j.yaml @@ -16,7 +16,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "embeddings": "command": @@ -33,7 +33,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "etcd": "command": @@ -105,7 +105,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "init-pulsar": "command": @@ -138,7 +138,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -153,7 +153,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "milvus": "command": @@ -233,7 +233,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prometheus": "deploy": @@ -253,13 +253,26 @@ - "prometheus-data:/prometheus" "prompt": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "--text-completion-request-queue" - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -268,11 +281,11 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prompt-rag": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "-i" @@ -283,6 +296,19 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -291,7 +317,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -344,7 +370,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "query-triples": "command": @@ -361,7 +387,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -378,7 +404,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-triples": "command": @@ -395,7 +421,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion": "command": @@ -416,7 +442,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion-rag": "command": @@ -441,7 +467,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "vectorize": "command": @@ -456,7 +482,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": "etcd": {} diff --git a/tg-launch-vertexai-cassandra.yaml b/tg-launch-vertexai-cassandra.yaml index 128db29e..76328f40 100644 --- a/tg-launch-vertexai-cassandra.yaml +++ b/tg-launch-vertexai-cassandra.yaml @@ -33,7 +33,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "embeddings": "command": @@ -50,7 +50,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "etcd": "command": @@ -122,7 +122,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "init-pulsar": "command": @@ -155,7 +155,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -170,7 +170,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "milvus": "command": @@ -232,7 +232,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prometheus": "deploy": @@ -252,13 +252,26 @@ - "prometheus-data:/prometheus" "prompt": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "--text-completion-request-queue" - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -267,11 +280,11 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prompt-rag": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "-i" @@ -282,6 +295,19 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -290,7 +316,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -343,7 +369,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "query-triples": "command": @@ -360,7 +386,7 @@ "reservations": "cpus": "0.1" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -377,7 +403,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-triples": "command": @@ -394,7 +420,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion": "command": @@ -417,7 +443,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": - "./vertexai:/vertexai" @@ -446,7 +472,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": - "./vertexai:/vertexai" @@ -463,7 +489,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/tg-launch-vertexai-neo4j.yaml b/tg-launch-vertexai-neo4j.yaml index 89d7094d..0cffbc75 100644 --- a/tg-launch-vertexai-neo4j.yaml +++ b/tg-launch-vertexai-neo4j.yaml @@ -16,7 +16,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "embeddings": "command": @@ -33,7 +33,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "etcd": "command": @@ -105,7 +105,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "init-pulsar": "command": @@ -138,7 +138,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -153,7 +153,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "milvus": "command": @@ -233,7 +233,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prometheus": "deploy": @@ -253,13 +253,26 @@ - "prometheus-data:/prometheus" "prompt": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "--text-completion-request-queue" - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -268,11 +281,11 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "prompt-rag": "command": - - "prompt-generic" + - "prompt-template" - "-p" - "pulsar://pulsar:6650" - "-i" @@ -283,6 +296,19 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" + - "--definition-template" + - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" + - "--relationship-template" + - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" + - "--knowledge-query-template" + - | + Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. + + Here's the knowledge statements: + {graph} + + Use only the provided knowledge statements to respond to the following: + {query} "deploy": "resources": "limits": @@ -291,7 +317,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -344,7 +370,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "query-triples": "command": @@ -361,7 +387,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -378,7 +404,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "store-triples": "command": @@ -395,7 +421,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "text-completion": "command": @@ -418,7 +444,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": - "./vertexai:/vertexai" @@ -447,7 +473,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": - "./vertexai:/vertexai" @@ -464,7 +490,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.9" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.10" "restart": "on-failure:100" "volumes": "etcd": {} diff --git a/trustgraph/model/prompt/template/__init__.py b/trustgraph/model/prompt/template/__init__.py new file mode 100644 index 00000000..ba844705 --- /dev/null +++ b/trustgraph/model/prompt/template/__init__.py @@ -0,0 +1,3 @@ + +from . service import * + diff --git a/trustgraph/model/prompt/template/__main__.py b/trustgraph/model/prompt/template/__main__.py new file mode 100755 index 00000000..e9136855 --- /dev/null +++ b/trustgraph/model/prompt/template/__main__.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +from . service import run + +if __name__ == '__main__': + run() + diff --git a/trustgraph/model/prompt/template/prompts.py b/trustgraph/model/prompt/template/prompts.py new file mode 100644 index 00000000..16401a50 --- /dev/null +++ b/trustgraph/model/prompt/template/prompts.py @@ -0,0 +1,19 @@ + +def to_relationships(template, text): + return template.format(text=text) + +def to_definitions(template, text): + return template.format(text=text) + +def get_cypher(kg): + sg2 = [] + for f in kg: + sg2.append(f"({f.s})-[{f.p}]->({f.o})") + kg = "\n".join(sg2) + kg = kg.replace("\\", "-") + return kg + +def to_kg_query(template, query, kg): + cypher = get_cypher(kg) + return template.format(query=query, graph=cypher) + diff --git a/trustgraph/model/prompt/template/service.py b/trustgraph/model/prompt/template/service.py new file mode 100755 index 00000000..644c8596 --- /dev/null +++ b/trustgraph/model/prompt/template/service.py @@ -0,0 +1,283 @@ + +""" +Language service abstracts prompt engineering from LLM. +""" + +import json + +from .... schema import Definition, Relationship, Triple +from .... schema import PromptRequest, PromptResponse, Error +from .... schema import TextCompletionRequest, TextCompletionResponse +from .... schema import text_completion_request_queue +from .... schema import text_completion_response_queue +from .... schema import prompt_request_queue, prompt_response_queue +from .... base import ConsumerProducer +from .... clients.llm_client import LlmClient + +from . prompts import to_definitions, to_relationships, to_kg_query + +module = ".".join(__name__.split(".")[1:-1]) + +default_input_queue = prompt_request_queue +default_output_queue = prompt_response_queue +default_subscriber = module + +class Processor(ConsumerProducer): + + def __init__(self, **params): + + input_queue = params.get("input_queue", default_input_queue) + output_queue = params.get("output_queue", default_output_queue) + subscriber = params.get("subscriber", default_subscriber) + tc_request_queue = params.get( + "text_completion_request_queue", text_completion_request_queue + ) + tc_response_queue = params.get( + "text_completion_response_queue", text_completion_response_queue + ) + definition_template = params.get("definition_template") + relationship_template = params.get("relationship_template") + knowledge_query_template = params.get("knowledge_query_template") + + super(Processor, self).__init__( + **params | { + "input_queue": input_queue, + "output_queue": output_queue, + "subscriber": subscriber, + "input_schema": PromptRequest, + "output_schema": PromptResponse, + "text_completion_request_queue": tc_request_queue, + "text_completion_response_queue": tc_response_queue, + "definition_template": definition_template, + "relationship_template": relationship_template, + "knowledge_query_template": knowledge_query_template, + } + ) + + self.llm = LlmClient( + subscriber=subscriber, + input_queue=tc_request_queue, + output_queue=tc_response_queue, + pulsar_host = self.pulsar_host + ) + + self.definition_template = definition_template + self.relationship_template = relationship_template + self.knowledge_query_template = knowledge_query_template + + def handle(self, msg): + + v = msg.value() + + # Sender-produced ID + + id = msg.properties()["id"] + + kind = v.kind + + print(f"Handling kind {kind}...", flush=True) + + if kind == "extract-definitions": + + self.handle_extract_definitions(id, v) + return + + elif kind == "extract-relationships": + + self.handle_extract_relationships(id, v) + return + + elif kind == "kg-prompt": + + self.handle_kg_prompt(id, v) + return + + else: + + print("Invalid kind.", flush=True) + return + + def handle_extract_definitions(self, id, v): + + try: + + prompt = to_definitions(self.definition_template, v.chunk) + + ans = self.llm.request(prompt) + + # Silently ignore JSON parse error + try: + defs = json.loads(ans) + except: + print("JSON parse error, ignored", flush=True) + defs = [] + + output = [] + + for defn in defs: + + try: + e = defn["entity"] + d = defn["definition"] + + output.append( + Definition( + name=e, definition=d + ) + ) + + except: + print("definition fields missing, ignored", flush=True) + + print("Send response...", flush=True) + r = PromptResponse(definitions=output, error=None) + self.producer.send(r, properties={"id": id}) + + print("Done.", flush=True) + + except Exception as e: + + print(f"Exception: {e}") + + print("Send error response...", flush=True) + + r = PromptResponse( + error=Error( + type = "llm-error", + message = str(e), + ), + response=None, + ) + + self.producer.send(r, properties={"id": id}) + + def handle_extract_relationships(self, id, v): + + try: + + prompt = to_relationships(self.relationship_template, v.chunk) + + ans = self.llm.request(prompt) + + # Silently ignore JSON parse error + try: + defs = json.loads(ans) + except: + print("JSON parse error, ignored", flush=True) + defs = [] + + output = [] + + for defn in defs: + + try: + output.append( + Relationship( + s = defn["subject"], + p = defn["predicate"], + o = defn["object"], + o_entity = defn["object-entity"], + ) + ) + + except Exception as e: + print("relationship fields missing, ignored", flush=True) + + print("Send response...", flush=True) + r = PromptResponse(relationships=output, error=None) + self.producer.send(r, properties={"id": id}) + + print("Done.", flush=True) + + except Exception as e: + + print(f"Exception: {e}") + + print("Send error response...", flush=True) + + r = PromptResponse( + error=Error( + type = "llm-error", + message = str(e), + ), + response=None, + ) + + self.producer.send(r, properties={"id": id}) + + def handle_kg_prompt(self, id, v): + + try: + + prompt = to_kg_query(self.knowledge_query_template, v.query, v.kg) + + print(prompt) + + ans = self.llm.request(prompt) + + print(ans) + + print("Send response...", flush=True) + r = PromptResponse(answer=ans, error=None) + self.producer.send(r, properties={"id": id}) + + print("Done.", flush=True) + + except Exception as e: + + print(f"Exception: {e}") + + print("Send error response...", flush=True) + + r = PromptResponse( + error=Error( + type = "llm-error", + message = str(e), + ), + response=None, + ) + + self.producer.send(r, properties={"id": id}) + + @staticmethod + def add_args(parser): + + ConsumerProducer.add_args( + parser, default_input_queue, default_subscriber, + default_output_queue, + ) + + parser.add_argument( + '--text-completion-request-queue', + default=text_completion_request_queue, + help=f'Text completion request queue (default: {text_completion_request_queue})', + ) + + parser.add_argument( + '--text-completion-response-queue', + default=text_completion_response_queue, + help=f'Text completion response queue (default: {text_completion_response_queue})', + ) + + parser.add_argument( + '--definition-template', + required=True, + help=f'Definition extraction template', + ) + + parser.add_argument( + '--relationship-template', + required=True, + help=f'Relationship extraction template', + ) + + parser.add_argument( + '--knowledge-query-template', + required=True, + help=f'Knowledge query template', + ) + +def run(): + + Processor.start(module, __doc__) + diff --git a/trustgraph/storage/doc_embeddings/__init__.py b/trustgraph/storage/doc_embeddings/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/trustgraph/storage/doc_embeddings/milvus/__init__.py b/trustgraph/storage/doc_embeddings/milvus/__init__.py new file mode 100644 index 00000000..d891d55f --- /dev/null +++ b/trustgraph/storage/doc_embeddings/milvus/__init__.py @@ -0,0 +1,3 @@ + +from . write import * + diff --git a/trustgraph/storage/doc_embeddings/milvus/__main__.py b/trustgraph/storage/doc_embeddings/milvus/__main__.py new file mode 100755 index 00000000..c05d8c6d --- /dev/null +++ b/trustgraph/storage/doc_embeddings/milvus/__main__.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +from . write import run + +if __name__ == '__main__': + run() + diff --git a/trustgraph/storage/doc_embeddings/milvus/write.py b/trustgraph/storage/doc_embeddings/milvus/write.py new file mode 100755 index 00000000..9256f011 --- /dev/null +++ b/trustgraph/storage/doc_embeddings/milvus/write.py @@ -0,0 +1,61 @@ + +""" +Accepts entity/vector pairs and writes them to a Milvus store. +""" + +from .... schema import GraphEmbeddings +from .... schema import graph_embeddings_store_queue +from .... log_level import LogLevel +from .... direct.milvus import TripleVectors +from .... base import Consumer + +module = ".".join(__name__.split(".")[1:-1]) + +default_input_queue = graph_embeddings_store_queue +default_subscriber = module +default_store_uri = 'http://localhost:19530' + +class Processor(Consumer): + + def __init__(self, **params): + + input_queue = params.get("input_queue", default_input_queue) + subscriber = params.get("subscriber", default_subscriber) + store_uri = params.get("store_uri", default_store_uri) + + super(Processor, self).__init__( + **params | { + "input_queue": input_queue, + "subscriber": subscriber, + "input_schema": GraphEmbeddings, + "store_uri": store_uri, + } + ) + + self.vecstore = TripleVectors(store_uri) + + def handle(self, msg): + + v = msg.value() + + if v.entity.value != "": + for vec in v.vectors: + self.vecstore.insert(vec, v.entity.value) + + @staticmethod + def add_args(parser): + + Consumer.add_args( + parser, default_input_queue, default_subscriber, + ) + + parser.add_argument( + '-t', '--store-uri', + default=default_store_uri, + help=f'Milvus store URI (default: {default_store_uri})' + ) + +def run(): + + Processor.start(module, __doc__) +