mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-06-04 11:24:00 +08:00
Inner prompt parameter setting. (#4806)
### What problem does this PR solve? #4764 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
parent
5a51bdd824
commit
f64ae9dc33
@ -69,10 +69,8 @@ class Generate(ComponentBase):
|
||||
component_name = "Generate"
|
||||
|
||||
def get_dependent_components(self):
|
||||
cpnts = set([para["component_id"].split("@")[0] for para in self._param.parameters \
|
||||
if para.get("component_id") \
|
||||
and para["component_id"].lower().find("answer") < 0 \
|
||||
and para["component_id"].lower().find("begin") < 0])
|
||||
inputs = self.get_input_elements()
|
||||
cpnts = set([i["key"] for i in inputs[1:] if i["key"].lower().find("answer") < 0 and i["key"].lower().find("begin") < 0])
|
||||
return list(cpnts)
|
||||
|
||||
def set_cite(self, retrieval_res, answer):
|
||||
@ -110,10 +108,26 @@ class Generate(ComponentBase):
|
||||
return res
|
||||
|
||||
def get_input_elements(self):
|
||||
if self._param.parameters:
|
||||
return [{"key": "user", "name": "Input your question here:"}, *self._param.parameters]
|
||||
|
||||
return [{"key": "user", "name": "Input your question here:"}]
|
||||
key_set = set([])
|
||||
res = [{"key": "user", "name": "Input your question here:"}]
|
||||
for r in re.finditer(r"\{([a-z]+[:@][a-z0-9_-]+)\}", self._param.prompt, flags=re.IGNORECASE):
|
||||
cpn_id = r.group(1)
|
||||
if cpn_id in key_set:
|
||||
continue
|
||||
if cpn_id.lower().find("begin@") == 0:
|
||||
cpn_id, key = cpn_id.split("@")
|
||||
for p in self._canvas.get_component(cpn_id)["obj"]._param.query:
|
||||
if p["key"] != key:
|
||||
continue
|
||||
res.append({"key": r.group(1), "name": p["name"]})
|
||||
key_set.add(r.group(1))
|
||||
continue
|
||||
cpn_nm = self._canvas.get_compnent_name(cpn_id)
|
||||
if not cpn_nm:
|
||||
continue
|
||||
res.append({"key": cpn_id, "name": cpn_nm})
|
||||
key_set.add(cpn_id)
|
||||
return res
|
||||
|
||||
def _run(self, history, **kwargs):
|
||||
chat_mdl = LLMBundle(self._canvas.get_tenant_id(), LLMType.CHAT, self._param.llm_id)
|
||||
@ -121,22 +135,20 @@ class Generate(ComponentBase):
|
||||
|
||||
retrieval_res = []
|
||||
self._param.inputs = []
|
||||
for para in self._param.parameters:
|
||||
if not para.get("component_id"):
|
||||
continue
|
||||
component_id = para["component_id"].split("@")[0]
|
||||
if para["component_id"].lower().find("@") >= 0:
|
||||
cpn_id, key = para["component_id"].split("@")
|
||||
for para in self.get_input_elements()[1:]:
|
||||
if para["key"].lower().find("begin@") == 0:
|
||||
cpn_id, key = para["key"].split("@")
|
||||
for p in self._canvas.get_component(cpn_id)["obj"]._param.query:
|
||||
if p["key"] == key:
|
||||
kwargs[para["key"]] = p.get("value", "")
|
||||
self._param.inputs.append(
|
||||
{"component_id": para["component_id"], "content": kwargs[para["key"]]})
|
||||
{"component_id": para["key"], "content": kwargs[para["key"]]})
|
||||
break
|
||||
else:
|
||||
assert False, f"Can't find parameter '{key}' for {cpn_id}"
|
||||
continue
|
||||
|
||||
component_id = para["key"]
|
||||
cpn = self._canvas.get_component(component_id)["obj"]
|
||||
if cpn.component_name.lower() == "answer":
|
||||
hist = self._canvas.get_history(1)
|
||||
@ -152,8 +164,8 @@ class Generate(ComponentBase):
|
||||
else:
|
||||
if cpn.component_name.lower() == "retrieval":
|
||||
retrieval_res.append(out)
|
||||
kwargs[para["key"]] = " - "+"\n - ".join([o if isinstance(o, str) else str(o) for o in out["content"]])
|
||||
self._param.inputs.append({"component_id": para["component_id"], "content": kwargs[para["key"]]})
|
||||
kwargs[para["key"]] = " - " + "\n - ".join([o if isinstance(o, str) else str(o) for o in out["content"]])
|
||||
self._param.inputs.append({"component_id": para["key"], "content": kwargs[para["key"]]})
|
||||
|
||||
if retrieval_res:
|
||||
retrieval_res = pd.concat(retrieval_res, ignore_index=True)
|
||||
@ -175,16 +187,16 @@ class Generate(ComponentBase):
|
||||
return partial(self.stream_output, chat_mdl, prompt, retrieval_res)
|
||||
|
||||
if "empty_response" in retrieval_res.columns and not "".join(retrieval_res["content"]):
|
||||
res = {"content": "\n- ".join(retrieval_res["empty_response"]) if "\n- ".join(
|
||||
retrieval_res["empty_response"]) else "Nothing found in knowledgebase!", "reference": []}
|
||||
empty_res = "\n- ".join([str(t) for t in retrieval_res["empty_response"] if str(t)])
|
||||
res = {"content": empty_res if empty_res else "Nothing found in knowledgebase!", "reference": []}
|
||||
return pd.DataFrame([res])
|
||||
|
||||
msg = self._canvas.get_history(self._param.message_history_window_size)
|
||||
if len(msg) < 1:
|
||||
msg.append({"role": "user", "content": ""})
|
||||
msg.append({"role": "user", "content": "Output: "})
|
||||
_, msg = message_fit_in([{"role": "system", "content": prompt}, *msg], int(chat_mdl.max_length * 0.97))
|
||||
if len(msg) < 2:
|
||||
msg.append({"role": "user", "content": ""})
|
||||
msg.append({"role": "user", "content": "Output: "})
|
||||
ans = chat_mdl.chat(msg[0]["content"], msg[1:], self._param.gen_conf())
|
||||
|
||||
if self._param.cite and "content_ltks" in retrieval_res.columns and "vector" in retrieval_res.columns:
|
||||
@ -196,18 +208,18 @@ class Generate(ComponentBase):
|
||||
def stream_output(self, chat_mdl, prompt, retrieval_res):
|
||||
res = None
|
||||
if "empty_response" in retrieval_res.columns and not "".join(retrieval_res["content"]):
|
||||
res = {"content": "\n- ".join(retrieval_res["empty_response"]) if "\n- ".join(
|
||||
retrieval_res["empty_response"]) else "Nothing found in knowledgebase!", "reference": []}
|
||||
empty_res = "\n- ".join([str(t) for t in retrieval_res["empty_response"] if str(t)])
|
||||
res = {"content": empty_res if empty_res else "Nothing found in knowledgebase!", "reference": []}
|
||||
yield res
|
||||
self.set_output(res)
|
||||
return
|
||||
|
||||
msg = self._canvas.get_history(self._param.message_history_window_size)
|
||||
if len(msg) < 1:
|
||||
msg.append({"role": "user", "content": ""})
|
||||
msg.append({"role": "user", "content": "Output: "})
|
||||
_, msg = message_fit_in([{"role": "system", "content": prompt}, *msg], int(chat_mdl.max_length * 0.97))
|
||||
if len(msg) < 2:
|
||||
msg.append({"role": "user", "content": ""})
|
||||
msg.append({"role": "user", "content": "Output: "})
|
||||
answer = ""
|
||||
for ans in chat_mdl.chat_streamly(msg[0]["content"], msg[1:], self._param.gen_conf()):
|
||||
res = {"content": ans, "reference": []}
|
||||
@ -230,5 +242,6 @@ class Generate(ComponentBase):
|
||||
for n, v in kwargs.items():
|
||||
prompt = re.sub(r"\{%s\}" % re.escape(n), str(v).replace("\\", " "), prompt)
|
||||
|
||||
ans = chat_mdl.chat(prompt, [{"role": "user", "content": kwargs.get("user", "")}], self._param.gen_conf())
|
||||
u = kwargs.get("user")
|
||||
ans = chat_mdl.chat(prompt, [{"role": "user", "content": u if u else "Output: "}], self._param.gen_conf())
|
||||
return pd.DataFrame([ans])
|
||||
|
@ -38,27 +38,39 @@ class Template(ComponentBase):
|
||||
component_name = "Template"
|
||||
|
||||
def get_dependent_components(self):
|
||||
cpnts = set(
|
||||
[
|
||||
para["component_id"].split("@")[0]
|
||||
for para in self._param.parameters
|
||||
if para.get("component_id")
|
||||
and para["component_id"].lower().find("answer") < 0
|
||||
and para["component_id"].lower().find("begin") < 0
|
||||
]
|
||||
)
|
||||
inputs = self.get_input_elements()
|
||||
cpnts = set([i["key"] for i in inputs if i["key"].lower().find("answer") < 0 and i["key"].lower().find("begin") < 0])
|
||||
return list(cpnts)
|
||||
|
||||
def get_input_elements(self):
|
||||
key_set = set([])
|
||||
res = []
|
||||
for r in re.finditer(r"\{([a-z]+[:@][a-z0-9_-]+)\}", self._param.content, flags=re.IGNORECASE):
|
||||
cpn_id = r.group(1)
|
||||
if cpn_id in key_set:
|
||||
continue
|
||||
if cpn_id.lower().find("begin@") == 0:
|
||||
cpn_id, key = cpn_id.split("@")
|
||||
for p in self._canvas.get_component(cpn_id)["obj"]._param.query:
|
||||
if p["key"] != key:
|
||||
continue
|
||||
res.append({"key": r.group(1), "name": p["name"]})
|
||||
key_set.add(r.group(1))
|
||||
continue
|
||||
cpn_nm = self._canvas.get_compnent_name(cpn_id)
|
||||
if not cpn_nm:
|
||||
continue
|
||||
res.append({"key": cpn_id, "name": cpn_nm})
|
||||
key_set.add(cpn_id)
|
||||
return res
|
||||
|
||||
def _run(self, history, **kwargs):
|
||||
content = self._param.content
|
||||
|
||||
self._param.inputs = []
|
||||
for para in self._param.parameters:
|
||||
if not para.get("component_id"):
|
||||
continue
|
||||
component_id = para["component_id"].split("@")[0]
|
||||
if para["component_id"].lower().find("@") >= 0:
|
||||
cpn_id, key = para["component_id"].split("@")
|
||||
for para in self.get_input_elements():
|
||||
if para["key"].lower().find("begin@") == 0:
|
||||
cpn_id, key = para["key"].split("@")
|
||||
for p in self._canvas.get_component(cpn_id)["obj"]._param.query:
|
||||
if p["key"] == key:
|
||||
value = p.get("value", "")
|
||||
@ -68,6 +80,7 @@ class Template(ComponentBase):
|
||||
assert False, f"Can't find parameter '{key}' for {cpn_id}"
|
||||
continue
|
||||
|
||||
component_id = para["key"]
|
||||
cpn = self._canvas.get_component(component_id)["obj"]
|
||||
if cpn.component_name.lower() == "answer":
|
||||
hist = self._canvas.get_history(1)
|
||||
@ -114,7 +127,7 @@ class Template(ComponentBase):
|
||||
|
||||
def make_kwargs(self, para, kwargs, value):
|
||||
self._param.inputs.append(
|
||||
{"component_id": para["component_id"], "content": value}
|
||||
{"component_id": para["key"], "content": value}
|
||||
)
|
||||
try:
|
||||
value = json.loads(value)
|
||||
|
@ -8,9 +8,7 @@
|
||||
"components": {
|
||||
"Answer:SocialAdsWonder": {
|
||||
"downstream": [
|
||||
"Retrieval:SillyPartsCheer",
|
||||
"Retrieval:BrownStreetsRhyme",
|
||||
"Retrieval:OddSingersRefuse"
|
||||
"RewriteQuestion:WildIdeasTell"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "Answer",
|
||||
@ -19,8 +17,8 @@
|
||||
"params": {}
|
||||
},
|
||||
"upstream": [
|
||||
"begin",
|
||||
"ExeSQL:QuietRosesRun"
|
||||
"ExeSQL:QuietRosesRun",
|
||||
"begin"
|
||||
]
|
||||
},
|
||||
"ExeSQL:QuietRosesRun": {
|
||||
@ -55,56 +53,34 @@
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"Generate:CuteSidesBuy"
|
||||
"Generate:BlueShirtsLaugh"
|
||||
]
|
||||
},
|
||||
"Generate:CuteSidesBuy": {
|
||||
"Generate:BlueShirtsLaugh": {
|
||||
"downstream": [
|
||||
"ExeSQL:QuietRosesRun"
|
||||
"ExeSQL:QuietRosesRun",
|
||||
"Retrieval:SillyPartsCheer",
|
||||
"Retrieval:BrownStreetsRhyme",
|
||||
"Retrieval:OddSingersRefuse"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "Generate",
|
||||
"inputs": [],
|
||||
"output": {},
|
||||
"params": {
|
||||
"cite": false,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"max_tokens": 512,
|
||||
"message_history_window_size": 1,
|
||||
"parameters": [
|
||||
{
|
||||
"component_id": "Retrieval:SillyPartsCheer",
|
||||
"id": "2a77e574-a0a6-4a1a-af39-cb192f1d21f5",
|
||||
"key": "ddl_input"
|
||||
},
|
||||
{
|
||||
"component_id": "Retrieval:OddSingersRefuse",
|
||||
"id": "83941a85-0b59-408e-97e5-504964b0e090",
|
||||
"key": "db_input"
|
||||
},
|
||||
{
|
||||
"component_id": "Retrieval:BrownStreetsRhyme",
|
||||
"id": "c63d0ae6-7ee2-44a2-8a95-69d03c90cb44",
|
||||
"key": "sql_input"
|
||||
}
|
||||
],
|
||||
"parameters": [],
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "\n##The user provides a question and you provide SQL. You will only respond with SQL code and not with any explanations.\n\n##You may use the following DDL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {ddl_input}.\n\n##You may use the following documentation as a reference for what tables might be available. Use responses to past questions also to guide you: {db_input}.\n\n##You may use the following SQL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {sql_input}.\n\n##Respond with only SQL code. Do not answer with any explanations -- just the code.",
|
||||
"prompt": "\n##The user provides a question and you provide SQL. You will only respond with SQL code and not with any explanations.\n\n##You may use the following DDL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {Retrieval:SillyPartsCheer}.\n\n##You may use the following documentation as a reference for what tables might be available. Use responses to past questions also to guide you: {Retrieval:OddSingersRefuse}.\n\n##You may use the following SQL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {Retrieval:BrownStreetsRhyme}.\n\n##Respond with only SQL code. Do not answer with any explanations -- just the code.",
|
||||
"temperature": 0.1,
|
||||
"top_p": 0.3
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"Retrieval:SillyPartsCheer",
|
||||
"Retrieval:BrownStreetsRhyme",
|
||||
"Retrieval:OddSingersRefuse"
|
||||
]
|
||||
"upstream": []
|
||||
},
|
||||
"Retrieval:BrownStreetsRhyme": {
|
||||
"downstream": [
|
||||
"Generate:CuteSidesBuy"
|
||||
],
|
||||
"downstream": [],
|
||||
"obj": {
|
||||
"component_name": "Retrieval",
|
||||
"inputs": [],
|
||||
@ -124,13 +100,12 @@
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"Answer:SocialAdsWonder"
|
||||
"RewriteQuestion:WildIdeasTell",
|
||||
"Generate:BlueShirtsLaugh"
|
||||
]
|
||||
},
|
||||
"Retrieval:OddSingersRefuse": {
|
||||
"downstream": [
|
||||
"Generate:CuteSidesBuy"
|
||||
],
|
||||
"downstream": [],
|
||||
"obj": {
|
||||
"component_name": "Retrieval",
|
||||
"inputs": [],
|
||||
@ -150,13 +125,12 @@
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"Answer:SocialAdsWonder"
|
||||
"RewriteQuestion:WildIdeasTell",
|
||||
"Generate:BlueShirtsLaugh"
|
||||
]
|
||||
},
|
||||
"Retrieval:SillyPartsCheer": {
|
||||
"downstream": [
|
||||
"Generate:CuteSidesBuy"
|
||||
],
|
||||
"downstream": [],
|
||||
"obj": {
|
||||
"component_name": "Retrieval",
|
||||
"inputs": [],
|
||||
@ -175,6 +149,35 @@
|
||||
"top_n": 18
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"RewriteQuestion:WildIdeasTell",
|
||||
"Generate:BlueShirtsLaugh"
|
||||
]
|
||||
},
|
||||
"RewriteQuestion:WildIdeasTell": {
|
||||
"downstream": [
|
||||
"Retrieval:OddSingersRefuse",
|
||||
"Retrieval:BrownStreetsRhyme",
|
||||
"Retrieval:SillyPartsCheer"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "RewriteQuestion",
|
||||
"params": {
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": true,
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 6,
|
||||
"parameter": "Precise",
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_p": 0.3
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"Answer:SocialAdsWonder"
|
||||
]
|
||||
@ -202,20 +205,34 @@
|
||||
"graph": {
|
||||
"edges": [
|
||||
{
|
||||
"id": "reactflow__edge-begin-Answer:SocialAdsWonderc",
|
||||
"id": "xy-edge__ExeSQL:QuietRosesRunc-Answer:SocialAdsWonderc",
|
||||
"markerEnd": "logo",
|
||||
"source": "begin",
|
||||
"sourceHandle": null,
|
||||
"source": "ExeSQL:QuietRosesRun",
|
||||
"sourceHandle": "c",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Answer:SocialAdsWonder",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
"type": "buttonEdge",
|
||||
"zIndex": 1001
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Answer:SocialAdsWonderb-Retrieval:SillyPartsCheerc",
|
||||
"id": "xy-edge__begin-Answer:SocialAdsWonderc",
|
||||
"markerEnd": "logo",
|
||||
"source": "begin",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Answer:SocialAdsWonder",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge",
|
||||
"zIndex": 1001
|
||||
},
|
||||
{
|
||||
"id": "xy-edge__Answer:SocialAdsWonderb-RewriteQuestion:WildIdeasTellc",
|
||||
"markerEnd": "logo",
|
||||
"source": "Answer:SocialAdsWonder",
|
||||
"sourceHandle": "b",
|
||||
@ -223,27 +240,15 @@
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Retrieval:SillyPartsCheer",
|
||||
"target": "RewriteQuestion:WildIdeasTell",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
"type": "buttonEdge",
|
||||
"zIndex": 1001
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Answer:SocialAdsWonderb-Retrieval:BrownStreetsRhymec",
|
||||
"id": "xy-edge__RewriteQuestion:WildIdeasTellb-Retrieval:OddSingersRefusec",
|
||||
"markerEnd": "logo",
|
||||
"source": "Answer:SocialAdsWonder",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Retrieval:BrownStreetsRhyme",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Answer:SocialAdsWonderb-Retrieval:OddSingersRefusec",
|
||||
"markerEnd": "logo",
|
||||
"source": "Answer:SocialAdsWonder",
|
||||
"source": "RewriteQuestion:WildIdeasTell",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
@ -251,51 +256,41 @@
|
||||
},
|
||||
"target": "Retrieval:OddSingersRefuse",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
"type": "buttonEdge",
|
||||
"zIndex": 1001
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Retrieval:SillyPartsCheerb-Generate:CuteSidesBuyb",
|
||||
"id": "xy-edge__RewriteQuestion:WildIdeasTellb-Retrieval:BrownStreetsRhymec",
|
||||
"markerEnd": "logo",
|
||||
"source": "Retrieval:SillyPartsCheer",
|
||||
"source": "RewriteQuestion:WildIdeasTell",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:CuteSidesBuy",
|
||||
"targetHandle": "b",
|
||||
"type": "buttonEdge"
|
||||
"target": "Retrieval:BrownStreetsRhyme",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge",
|
||||
"zIndex": 1001
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Retrieval:BrownStreetsRhymeb-Generate:CuteSidesBuyb",
|
||||
"id": "xy-edge__RewriteQuestion:WildIdeasTellb-Retrieval:SillyPartsCheerc",
|
||||
"markerEnd": "logo",
|
||||
"source": "Retrieval:BrownStreetsRhyme",
|
||||
"source": "RewriteQuestion:WildIdeasTell",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:CuteSidesBuy",
|
||||
"targetHandle": "b",
|
||||
"type": "buttonEdge"
|
||||
"target": "Retrieval:SillyPartsCheer",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge",
|
||||
"zIndex": 1001
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Retrieval:OddSingersRefuseb-Generate:CuteSidesBuyb",
|
||||
"id": "xy-edge__Generate:BlueShirtsLaughc-ExeSQL:QuietRosesRunb",
|
||||
"markerEnd": "logo",
|
||||
"source": "Retrieval:OddSingersRefuse",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:CuteSidesBuy",
|
||||
"targetHandle": "b",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "xy-edge__Generate:CuteSidesBuyc-ExeSQL:QuietRosesRunb",
|
||||
"markerEnd": "logo",
|
||||
"source": "Generate:CuteSidesBuy",
|
||||
"source": "Generate:BlueShirtsLaugh",
|
||||
"sourceHandle": "c",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
@ -307,16 +302,44 @@
|
||||
"zIndex": 1001
|
||||
},
|
||||
{
|
||||
"id": "xy-edge__ExeSQL:QuietRosesRunc-Answer:SocialAdsWonderc",
|
||||
"id": "xy-edge__Generate:BlueShirtsLaughb-Retrieval:SillyPartsCheerb",
|
||||
"markerEnd": "logo",
|
||||
"source": "ExeSQL:QuietRosesRun",
|
||||
"sourceHandle": "c",
|
||||
"source": "Generate:BlueShirtsLaugh",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Answer:SocialAdsWonder",
|
||||
"targetHandle": "c",
|
||||
"target": "Retrieval:SillyPartsCheer",
|
||||
"targetHandle": "b",
|
||||
"type": "buttonEdge",
|
||||
"zIndex": 1001
|
||||
},
|
||||
{
|
||||
"id": "xy-edge__Generate:BlueShirtsLaughb-Retrieval:BrownStreetsRhymeb",
|
||||
"markerEnd": "logo",
|
||||
"source": "Generate:BlueShirtsLaugh",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Retrieval:BrownStreetsRhyme",
|
||||
"targetHandle": "b",
|
||||
"type": "buttonEdge",
|
||||
"zIndex": 1001
|
||||
},
|
||||
{
|
||||
"id": "xy-edge__Generate:BlueShirtsLaughb-Retrieval:OddSingersRefuseb",
|
||||
"markerEnd": "logo",
|
||||
"source": "Generate:BlueShirtsLaugh",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Retrieval:OddSingersRefuse",
|
||||
"targetHandle": "b",
|
||||
"type": "buttonEdge",
|
||||
"zIndex": 1001
|
||||
}
|
||||
@ -362,8 +385,8 @@
|
||||
"width": 200
|
||||
},
|
||||
"position": {
|
||||
"x": -58.36886074370702,
|
||||
"y": 272.1213623212045
|
||||
"x": -265.59460323639587,
|
||||
"y": 271.1879130306969
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -58.36886074370702,
|
||||
@ -375,100 +398,6 @@
|
||||
"type": "logicNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "The large model modifies the original SQL statement based on the error message and returns the modified SQL statement."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: Fix SQL Statement"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 172,
|
||||
"id": "Note:SevenDancersMarry",
|
||||
"measured": {
|
||||
"height": 172,
|
||||
"width": 228
|
||||
},
|
||||
"position": {
|
||||
"x": -62.91736862436424,
|
||||
"y": 93.08952291375991
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -62.91736862436424,
|
||||
"y": 93.08952291375991
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 172,
|
||||
"width": 228
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 228
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"cite": false,
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": true,
|
||||
"max_tokens": 512,
|
||||
"message_history_window_size": 1,
|
||||
"parameter": "Precise",
|
||||
"parameters": [
|
||||
{
|
||||
"component_id": "Retrieval:SillyPartsCheer",
|
||||
"id": "2a77e574-a0a6-4a1a-af39-cb192f1d21f5",
|
||||
"key": "ddl_input"
|
||||
},
|
||||
{
|
||||
"component_id": "Retrieval:OddSingersRefuse",
|
||||
"id": "83941a85-0b59-408e-97e5-504964b0e090",
|
||||
"key": "db_input"
|
||||
},
|
||||
{
|
||||
"component_id": "Retrieval:BrownStreetsRhyme",
|
||||
"id": "c63d0ae6-7ee2-44a2-8a95-69d03c90cb44",
|
||||
"key": "sql_input"
|
||||
}
|
||||
],
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "\n##The user provides a question and you provide SQL. You will only respond with SQL code and not with any explanations.\n\n##You may use the following DDL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {ddl_input}.\n\n##You may use the following documentation as a reference for what tables might be available. Use responses to past questions also to guide you: {db_input}.\n\n##You may use the following SQL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {sql_input}.\n\n##Respond with only SQL code. Do not answer with any explanations -- just the code.",
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "Generate",
|
||||
"name": "Generate SQL Statement LLM"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 232,
|
||||
"id": "Generate:CuteSidesBuy",
|
||||
"measured": {
|
||||
"height": 232,
|
||||
"width": 200
|
||||
},
|
||||
"position": {
|
||||
"x": 191.98081287844155,
|
||||
"y": -255.36496490928363
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 191.98081287844155,
|
||||
"y": -255.36496490928363
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "generateNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
@ -495,8 +424,8 @@
|
||||
"width": 200
|
||||
},
|
||||
"position": {
|
||||
"x": 198.3020069445181,
|
||||
"y": -0.9595420072386389
|
||||
"x": 194.69889765569846,
|
||||
"y": 61.49435233230193
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 198.3020069445181,
|
||||
@ -534,8 +463,8 @@
|
||||
"width": 200
|
||||
},
|
||||
"position": {
|
||||
"x": 231.17453176754782,
|
||||
"y": 123.02661106951555
|
||||
"x": 240.78282320440022,
|
||||
"y": 162.66081324653166
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 231.17453176754782,
|
||||
@ -573,8 +502,8 @@
|
||||
"width": 200
|
||||
},
|
||||
"position": {
|
||||
"x": 267.7575479510707,
|
||||
"y": 249.15603226400776
|
||||
"x": 284.5720579655624,
|
||||
"y": 246.75395940479467
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 267.7575479510707,
|
||||
@ -596,15 +525,15 @@
|
||||
},
|
||||
"dragHandle": ".note-drag-handle",
|
||||
"dragging": false,
|
||||
"height": 176,
|
||||
"height": 165,
|
||||
"id": "Note:HeavyIconsFollow",
|
||||
"measured": {
|
||||
"height": 176,
|
||||
"width": 266
|
||||
"height": 165,
|
||||
"width": 347
|
||||
},
|
||||
"position": {
|
||||
"x": -626.6563777191027,
|
||||
"y": -48.82220889683933
|
||||
"x": -709.8631299685773,
|
||||
"y": 96.50319908555313
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -626.6563777191027,
|
||||
@ -619,7 +548,7 @@
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 266
|
||||
"width": 347
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
@ -631,15 +560,15 @@
|
||||
},
|
||||
"dragHandle": ".note-drag-handle",
|
||||
"dragging": false,
|
||||
"height": 162,
|
||||
"height": 159,
|
||||
"id": "Note:PinkTaxesClean",
|
||||
"measured": {
|
||||
"height": 162,
|
||||
"width": 210
|
||||
"height": 159,
|
||||
"width": 259
|
||||
},
|
||||
"position": {
|
||||
"x": -52.004609812312424,
|
||||
"y": 336.95180237635077
|
||||
"x": -253.39933811515345,
|
||||
"y": 353.7538896054877
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -52.004609812312424,
|
||||
@ -654,7 +583,7 @@
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 210
|
||||
"width": 259
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
@ -701,15 +630,15 @@
|
||||
},
|
||||
"dragHandle": ".note-drag-handle",
|
||||
"dragging": false,
|
||||
"height": 131,
|
||||
"height": 143,
|
||||
"id": "Note:HugeGroupsScream",
|
||||
"measured": {
|
||||
"height": 131,
|
||||
"width": 387
|
||||
"height": 143,
|
||||
"width": 390
|
||||
},
|
||||
"position": {
|
||||
"x": 606.1206536213404,
|
||||
"y": 113.09441734894426
|
||||
"x": 612.8793199038756,
|
||||
"y": 169.1868576959871
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 606.1206536213404,
|
||||
@ -724,7 +653,7 @@
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 387
|
||||
"width": 390
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
@ -736,15 +665,15 @@
|
||||
},
|
||||
"dragHandle": ".note-drag-handle",
|
||||
"dragging": false,
|
||||
"height": 266,
|
||||
"height": 208,
|
||||
"id": "Note:GreenCrewsArrive",
|
||||
"measured": {
|
||||
"height": 266,
|
||||
"width": 266
|
||||
"height": 208,
|
||||
"width": 467
|
||||
},
|
||||
"position": {
|
||||
"x": 545.3423934788841,
|
||||
"y": -166.58872868890683
|
||||
"x": 649.3481710005742,
|
||||
"y": -87.70873445087781
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 545.3423934788841,
|
||||
@ -759,7 +688,7 @@
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 266
|
||||
"width": 467
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
@ -771,15 +700,15 @@
|
||||
},
|
||||
"dragHandle": ".note-drag-handle",
|
||||
"dragging": false,
|
||||
"height": 175,
|
||||
"height": 196,
|
||||
"id": "Note:EightTurtlesLike",
|
||||
"measured": {
|
||||
"height": 175,
|
||||
"width": 265
|
||||
"height": 196,
|
||||
"width": 341
|
||||
},
|
||||
"position": {
|
||||
"x": 222.2150747084395,
|
||||
"y": -445.32694170868734
|
||||
"x": 134.0070839275931,
|
||||
"y": -345.41228234051727
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 222.2150747084395,
|
||||
@ -794,34 +723,34 @@
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 265
|
||||
"width": 341
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "Executes the SQL statement in the database and returns the result.\n\nAfter configuring an accessible database, press 'Test' to ensure the accessibility."
|
||||
"text": "Executes the SQL statement in the database and returns the result.\n\nAfter configuring an accessible database, press 'Test' to ensure the accessibility.\n\nThe large model modifies the original SQL statement based on the error message and returns the modified SQL statement."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: Execute SQL"
|
||||
},
|
||||
"dragHandle": ".note-drag-handle",
|
||||
"dragging": false,
|
||||
"height": 178,
|
||||
"height": 276,
|
||||
"id": "Note:FreshKidsTalk",
|
||||
"measured": {
|
||||
"height": 178,
|
||||
"width": 346
|
||||
"height": 276,
|
||||
"width": 336
|
||||
},
|
||||
"position": {
|
||||
"x": -293.35258272850365,
|
||||
"y": -206.3839921107096
|
||||
"x": -304.3577648765364,
|
||||
"y": -288.054469323955
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -251.5866574377311,
|
||||
"y": -372.2192837064241
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": true,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 178,
|
||||
@ -829,7 +758,7 @@
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 346
|
||||
"width": 336
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
@ -856,7 +785,7 @@
|
||||
"username": "root"
|
||||
},
|
||||
"label": "ExeSQL",
|
||||
"name": "ExeSQL_0"
|
||||
"name": "ExeSQL"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "ExeSQL:QuietRosesRun",
|
||||
@ -872,6 +801,79 @@
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "ragNode"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": true,
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 6,
|
||||
"parameter": "Precise",
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "RewriteQuestion",
|
||||
"name": "RefineQuestion"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "RewriteQuestion:WildIdeasTell",
|
||||
"measured": {
|
||||
"height": 106,
|
||||
"width": 200
|
||||
},
|
||||
"position": {
|
||||
"x": -7.734116293705583,
|
||||
"y": 236.92372325779243
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "rewriteNode"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"cite": false,
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": false,
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 1,
|
||||
"parameter": "Precise",
|
||||
"parameters": [],
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "\n##The user provides a question and you provide SQL. You will only respond with SQL code and not with any explanations.\n\n##You may use the following DDL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {Retrieval:SillyPartsCheer}.\n\n##You may use the following documentation as a reference for what tables might be available. Use responses to past questions also to guide you: {Retrieval:OddSingersRefuse}.\n\n##You may use the following SQL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {Retrieval:BrownStreetsRhyme}.\n\n##Respond with only SQL code. Do not answer with any explanations -- just the code.",
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "Generate",
|
||||
"name": "Generate SQL Statement LLM"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "Generate:BlueShirtsLaugh",
|
||||
"measured": {
|
||||
"height": 106,
|
||||
"width": 200
|
||||
},
|
||||
"position": {
|
||||
"x": 147.62383788095065,
|
||||
"y": -116.47462293167156
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "generateNode"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -10,93 +10,103 @@
|
||||
"downstream": [],
|
||||
"obj": {
|
||||
"component_name": "Answer",
|
||||
"inputs": [],
|
||||
"output": null,
|
||||
"params": {
|
||||
"debug_inputs": [],
|
||||
"inputs": [],
|
||||
"message_history_window_size": 22,
|
||||
"output": null,
|
||||
"output_var_name": "output",
|
||||
"post_answers": [],
|
||||
"query": []
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"Generate:ChubbyCougarsRush"
|
||||
"Generate:FuzzyEmusWork"
|
||||
]
|
||||
},
|
||||
"Generate:ChubbyCougarsRush": {
|
||||
"Generate:FuzzyEmusWork": {
|
||||
"downstream": [
|
||||
"Answer:TinyGamesGuess"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "Generate",
|
||||
"inputs": [],
|
||||
"output": null,
|
||||
"params": {
|
||||
"cite": false,
|
||||
"debug_inputs": [],
|
||||
"frequency_penalty": 0.7,
|
||||
"inputs": [],
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"max_tokens": 0,
|
||||
"message_history_window_size": 12,
|
||||
"message_history_window_size": 1,
|
||||
"output": null,
|
||||
"output_var_name": "output",
|
||||
"parameters": [
|
||||
{
|
||||
"component_id": "begin@lang",
|
||||
"id": "73f48a67-b78f-4bcd-8326-a83c31073ab9",
|
||||
"key": "target_lang"
|
||||
},
|
||||
{
|
||||
"component_id": "begin@file",
|
||||
"id": "c9142975-25b3-4199-8fce-aa0bc29a31f2",
|
||||
"key": "source_text"
|
||||
},
|
||||
{
|
||||
"component_id": "Generate:RichWordsDeny",
|
||||
"id": "6c824b2a-fe3b-4336-95b5-e85f676bef39",
|
||||
"key": "translation_1"
|
||||
},
|
||||
{
|
||||
"component_id": "Generate:SlimyFrogsArgue",
|
||||
"id": "f3bd4569-4852-43fa-b80a-e0dd27dd9e1c",
|
||||
"key": "reflection"
|
||||
}
|
||||
],
|
||||
"parameters": [],
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Your task is to carefully read, then edit, a translation to {target_lang}, taking into\naccount a list of expert suggestions and constructive criticisms.\n\nThe source text, the initial translation, and the expert linguist suggestions are delimited by XML tags <SOURCE_TEXT></SOURCE_TEXT>, <TRANSLATION></TRANSLATION> and <EXPERT_SUGGESTIONS></EXPERT_SUGGESTIONS> \\\nas follows:\n\n<SOURCE_TEXT>\n{source_text}\n</SOURCE_TEXT>\n\n<TRANSLATION>\n{translation_1}\n</TRANSLATION>\n\n<EXPERT_SUGGESTIONS>\n{reflection}\n</EXPERT_SUGGESTIONS>\n\nPlease take into account the expert suggestions when editing the translation. Edit the translation by ensuring:\n\n(i) accuracy (by correcting errors of addition, mistranslation, omission, or untranslated text),\n(ii) fluency (by applying {target_lang} grammar, spelling and punctuation rules and ensuring there are no unnecessary repetitions), \n(iii) style (by ensuring the translations reflect the style of the source text)\n(iv) terminology (inappropriate for context, inconsistent use), or\n(v) other errors.\n\nOutput only the new translation and nothing else.",
|
||||
"prompt": "Your task is to carefully read, then edit, a translation to {begin@lang}, taking into\naccount a list of expert suggestions and constructive criticisms.\n\nThe source text, the initial translation, and the expert linguist suggestions are delimited by XML tags <SOURCE_TEXT></SOURCE_TEXT>, <TRANSLATION></TRANSLATION> and <EXPERT_SUGGESTIONS></EXPERT_SUGGESTIONS>\nas follows:\n\n<SOURCE_TEXT>\n{begin@file}\n</SOURCE_TEXT>\n\n<TRANSLATION>\n{Generate:VastKeysKick}\n</TRANSLATION>\n\n<EXPERT_SUGGESTIONS>\n{Generate:ShinySquidsSneeze}\n</EXPERT_SUGGESTIONS>\n\nPlease take into account the expert suggestions when editing the translation. Edit the translation by ensuring:\n\n(i) accuracy (by correcting errors of addition, mistranslation, omission, or untranslated text),\n(ii) fluency (by applying {begin@lang} grammar, spelling and punctuation rules and ensuring there are no unnecessary repetitions), \n(iii) style (by ensuring the translations reflect the style of the source text)\n(iv) terminology (inappropriate for context, inconsistent use), or\n(v) other errors.\n\nOutput only the new translation and nothing else.",
|
||||
"query": [],
|
||||
"temperature": 0.1,
|
||||
"top_p": 0.3
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"Generate:SlimyFrogsArgue"
|
||||
"Generate:ShinySquidsSneeze"
|
||||
]
|
||||
},
|
||||
"Generate:RichWordsDeny": {
|
||||
"Generate:ShinySquidsSneeze": {
|
||||
"downstream": [
|
||||
"Generate:SlimyFrogsArgue"
|
||||
"Generate:FuzzyEmusWork"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "Generate",
|
||||
"inputs": [],
|
||||
"output": null,
|
||||
"params": {
|
||||
"cite": false,
|
||||
"debug_inputs": [],
|
||||
"frequency_penalty": 0.7,
|
||||
"inputs": [],
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"max_tokens": 0,
|
||||
"message_history_window_size": 12,
|
||||
"message_history_window_size": 1,
|
||||
"output": null,
|
||||
"output_var_name": "output",
|
||||
"parameters": [
|
||||
{
|
||||
"component_id": "begin@lang",
|
||||
"id": "a36e78fb-b431-4ae6-afa8-77839587fcf8",
|
||||
"key": "lang"
|
||||
},
|
||||
{
|
||||
"component_id": "begin@file",
|
||||
"id": "f8a704b7-693b-4480-aa9a-da4a83250059",
|
||||
"key": "file"
|
||||
}
|
||||
],
|
||||
"parameters": [],
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Role: You are a professional translator proficient in {lang}, with an exceptional ability to convert specialized academic papers into accessible popular science articles. Please assist me in translating the following paragraph into {lang}, ensuring that its style resembles that of popular science articles in {lang}.\n\nRequirements & Restrictions:\n - Use Markdown format to output.\n - DO NOT overlook any details.\n\n\n<ORIGINAL_TEXT>\n{file}\n\n<TRANSLATED_TEXT>",
|
||||
"prompt": "Your task is to carefully read a source text and a translation to {begin@lang}, and then give constructive criticisms and helpful suggestions to improve the translation. \n\nThe source text and initial translation, delimited by XML tags <SOURCE_TEXT></SOURCE_TEXT> and <TRANSLATION></TRANSLATION>, are as follows:\n\n<SOURCE_TEXT>\n{begin@file}\n</SOURCE_TEXT>\n\n<TRANSLATION>\n{Generate:VastKeysKick}\n</TRANSLATION>\n\nWhen writing suggestions, pay attention to whether there are ways to improve the translation's \n(i) accuracy (by correcting errors of addition, mistranslation, omission, or untranslated text),\n(ii) fluency (by applying {begin@lang} grammar, spelling and punctuation rules, and ensuring there are no unnecessary repetitions),\n(iii) style (by ensuring the translations reflect the style of the source text and take into account any cultural context),\n(iv) terminology (by ensuring terminology use is consistent and reflects the source text domain; and by only ensuring you use equivalent idioms {begin@lang}).\n\nWrite a list of specific, helpful and constructive suggestions for improving the translation.\nEach suggestion should address one specific part of the translation.\nOutput only the suggestions and nothing else.",
|
||||
"query": [],
|
||||
"temperature": 0.1,
|
||||
"top_p": 0.3
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"Generate:VastKeysKick"
|
||||
]
|
||||
},
|
||||
"Generate:VastKeysKick": {
|
||||
"downstream": [
|
||||
"Generate:ShinySquidsSneeze"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "Generate",
|
||||
"inputs": [],
|
||||
"output": null,
|
||||
"params": {
|
||||
"cite": false,
|
||||
"debug_inputs": [],
|
||||
"frequency_penalty": 0.7,
|
||||
"inputs": [],
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"max_tokens": 0,
|
||||
"message_history_window_size": 1,
|
||||
"output": null,
|
||||
"output_var_name": "output",
|
||||
"parameters": [],
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Role: You are a professional translator proficient in {begin@lang}, with an exceptional ability to convert specialized academic papers into accessible popular science articles. Please assist me in translating the following paragraph into {begin@lang}, ensuring that its style resembles that of popular science articles in {begin@lang}.\n\nRequirements & Restrictions:\n - Use Markdown format to output.\n - DO NOT overlook any details.\n\n\n<ORIGINAL_TEXT>\n{begin@file}\n\n<TRANSLATED_TEXT>",
|
||||
"query": [],
|
||||
"temperature": 0.1,
|
||||
"top_p": 0.3
|
||||
@ -106,58 +116,19 @@
|
||||
"begin"
|
||||
]
|
||||
},
|
||||
"Generate:SlimyFrogsArgue": {
|
||||
"downstream": [
|
||||
"Generate:ChubbyCougarsRush"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "Generate",
|
||||
"params": {
|
||||
"cite": false,
|
||||
"frequency_penalty": 0.7,
|
||||
"inputs": [],
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"max_tokens": 0,
|
||||
"message_history_window_size": 12,
|
||||
"output_var_name": "output",
|
||||
"parameters": [
|
||||
{
|
||||
"component_id": "begin@lang",
|
||||
"id": "b2f5e7ec-7f77-485f-af15-461d0f1ca913",
|
||||
"key": "target_lang"
|
||||
},
|
||||
{
|
||||
"component_id": "begin@file",
|
||||
"id": "fbc44092-9f9e-4e85-b5b1-dbd808239d3d",
|
||||
"key": "source_text"
|
||||
},
|
||||
{
|
||||
"component_id": "Generate:RichWordsDeny",
|
||||
"id": "c253af54-61d4-40f3-9990-604e2212506f",
|
||||
"key": "translation_1"
|
||||
}
|
||||
],
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Your task is to carefully read a source text and a translation to {target_lang}, and then give constructive criticisms and helpful suggestions to improve the translation. \n\nThe source text and initial translation, delimited by XML tags <SOURCE_TEXT></SOURCE_TEXT> and <TRANSLATION></TRANSLATION>, are as follows:\n\n<SOURCE_TEXT>\n{source_text}\n</SOURCE_TEXT>\n\n<TRANSLATION>\n{translation_1}\n</TRANSLATION>\n\nWhen writing suggestions, pay attention to whether there are ways to improve the translation's \n(i) accuracy (by correcting errors of addition, mistranslation, omission, or untranslated text),\n(ii) fluency (by applying {target_lang} grammar, spelling and punctuation rules, and ensuring there are no unnecessary repetitions),\n(iii) style (by ensuring the translations reflect the style of the source text and take into account any cultural context),\n(iv) terminology (by ensuring terminology use is consistent and reflects the source text domain; and by only ensuring you use equivalent idioms {target_lang}).\n\nWrite a list of specific, helpful and constructive suggestions for improving the translation.\nEach suggestion should address one specific part of the translation.\nOutput only the suggestions and nothing else.",
|
||||
"query": [],
|
||||
"temperature": 0.1,
|
||||
"top_p": 0.3
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"Generate:RichWordsDeny"
|
||||
]
|
||||
},
|
||||
"begin": {
|
||||
"downstream": [
|
||||
"Generate:RichWordsDeny"
|
||||
"Generate:VastKeysKick"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "Begin",
|
||||
"inputs": [],
|
||||
"output": null,
|
||||
"params": {
|
||||
"debug_inputs": [],
|
||||
"inputs": [],
|
||||
"message_history_window_size": 22,
|
||||
"output": {},
|
||||
"output": null,
|
||||
"output_var_name": "output",
|
||||
"prologue": "",
|
||||
"query": [
|
||||
@ -165,15 +136,13 @@
|
||||
"key": "lang",
|
||||
"name": "Target Language",
|
||||
"optional": false,
|
||||
"type": "line",
|
||||
"value": ""
|
||||
"type": "line"
|
||||
},
|
||||
{
|
||||
"key": "file",
|
||||
"name": "Files",
|
||||
"optional": false,
|
||||
"type": "file",
|
||||
"value": ""
|
||||
"type": "file"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -185,48 +154,36 @@
|
||||
"graph": {
|
||||
"edges": [
|
||||
{
|
||||
"id": "reactflow__edge-begin-Generate:RichWordsDenyc",
|
||||
"id": "xy-edge__begin-Generate:VastKeysKickc",
|
||||
"markerEnd": "logo",
|
||||
"source": "begin",
|
||||
"sourceHandle": null,
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:RichWordsDeny",
|
||||
"target": "Generate:VastKeysKick",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
"type": "buttonEdge",
|
||||
"zIndex": 1001
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Generate:RichWordsDenyb-Generate:SlimyFrogsArguec",
|
||||
"id": "xy-edge__Generate:VastKeysKickb-Generate:ShinySquidsSneezec",
|
||||
"markerEnd": "logo",
|
||||
"source": "Generate:RichWordsDeny",
|
||||
"source": "Generate:VastKeysKick",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:SlimyFrogsArgue",
|
||||
"target": "Generate:ShinySquidsSneeze",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
"type": "buttonEdge",
|
||||
"zIndex": 1001
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Generate:SlimyFrogsArgueb-Generate:ChubbyCougarsRushc",
|
||||
"id": "xy-edge__Generate:FuzzyEmusWorkb-Answer:TinyGamesGuessc",
|
||||
"markerEnd": "logo",
|
||||
"source": "Generate:SlimyFrogsArgue",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:ChubbyCougarsRush",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Generate:ChubbyCougarsRushb-Answer:TinyGamesGuessc",
|
||||
"markerEnd": "logo",
|
||||
"source": "Generate:ChubbyCougarsRush",
|
||||
"source": "Generate:FuzzyEmusWork",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
@ -234,7 +191,22 @@
|
||||
},
|
||||
"target": "Answer:TinyGamesGuess",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
"type": "buttonEdge",
|
||||
"zIndex": 1001
|
||||
},
|
||||
{
|
||||
"id": "xy-edge__Generate:ShinySquidsSneezeb-Generate:FuzzyEmusWorkc",
|
||||
"markerEnd": "logo",
|
||||
"source": "Generate:ShinySquidsSneeze",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:FuzzyEmusWork",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge",
|
||||
"zIndex": 1001
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
@ -247,15 +219,13 @@
|
||||
"key": "lang",
|
||||
"name": "Target Language",
|
||||
"optional": false,
|
||||
"type": "line",
|
||||
"value": ""
|
||||
"type": "line"
|
||||
},
|
||||
{
|
||||
"key": "file",
|
||||
"name": "Files",
|
||||
"optional": false,
|
||||
"type": "file",
|
||||
"value": ""
|
||||
"type": "file"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -265,188 +235,24 @@
|
||||
"dragging": false,
|
||||
"height": 128,
|
||||
"id": "begin",
|
||||
"measured": {
|
||||
"height": 128,
|
||||
"width": 200
|
||||
},
|
||||
"position": {
|
||||
"x": -383.5,
|
||||
"y": 143.5
|
||||
"y": 142.62256327439624
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -383.5,
|
||||
"y": 143.5
|
||||
},
|
||||
"selected": false,
|
||||
"selected": true,
|
||||
"sourcePosition": "left",
|
||||
"targetPosition": "right",
|
||||
"type": "beginNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"cite": false,
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": false,
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 12,
|
||||
"parameter": "Precise",
|
||||
"parameters": [
|
||||
{
|
||||
"component_id": "begin@lang",
|
||||
"id": "a36e78fb-b431-4ae6-afa8-77839587fcf8",
|
||||
"key": "lang"
|
||||
},
|
||||
{
|
||||
"component_id": "begin@file",
|
||||
"id": "f8a704b7-693b-4480-aa9a-da4a83250059",
|
||||
"key": "file"
|
||||
}
|
||||
],
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Role: You are a professional translator proficient in {lang}, with an exceptional ability to convert specialized academic papers into accessible popular science articles. Please assist me in translating the following paragraph into {lang}, ensuring that its style resembles that of popular science articles in {lang}.\n\nRequirements & Restrictions:\n - Use Markdown format to output.\n - DO NOT overlook any details.\n\n\n<ORIGINAL_TEXT>\n{file}\n\n<TRANSLATED_TEXT>",
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "Generate",
|
||||
"name": "Translate directly"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 190,
|
||||
"id": "Generate:RichWordsDeny",
|
||||
"position": {
|
||||
"x": -98,
|
||||
"y": 113.359375
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -98,
|
||||
"y": 113.359375
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "generateNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"cite": false,
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": false,
|
||||
"max_tokens": 512,
|
||||
"message_history_window_size": 12,
|
||||
"parameter": "Precise",
|
||||
"parameters": [
|
||||
{
|
||||
"component_id": "begin@lang",
|
||||
"id": "b2f5e7ec-7f77-485f-af15-461d0f1ca913",
|
||||
"key": "target_lang"
|
||||
},
|
||||
{
|
||||
"component_id": "begin@file",
|
||||
"id": "fbc44092-9f9e-4e85-b5b1-dbd808239d3d",
|
||||
"key": "source_text"
|
||||
},
|
||||
{
|
||||
"component_id": "Generate:RichWordsDeny",
|
||||
"id": "c253af54-61d4-40f3-9990-604e2212506f",
|
||||
"key": "translation_1"
|
||||
}
|
||||
],
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Your task is to carefully read a source text and a translation to {target_lang}, and then give constructive criticisms and helpful suggestions to improve the translation. \n\nThe source text and initial translation, delimited by XML tags <SOURCE_TEXT></SOURCE_TEXT> and <TRANSLATION></TRANSLATION>, are as follows:\n\n<SOURCE_TEXT>\n{source_text}\n</SOURCE_TEXT>\n\n<TRANSLATION>\n{translation_1}\n</TRANSLATION>\n\nWhen writing suggestions, pay attention to whether there are ways to improve the translation's \n(i) accuracy (by correcting errors of addition, mistranslation, omission, or untranslated text),\n(ii) fluency (by applying {target_lang} grammar, spelling and punctuation rules, and ensuring there are no unnecessary repetitions),\n(iii) style (by ensuring the translations reflect the style of the source text and take into account any cultural context),\n(iv) terminology (by ensuring terminology use is consistent and reflects the source text domain; and by only ensuring you use equivalent idioms {target_lang}).\n\nWrite a list of specific, helpful and constructive suggestions for improving the translation.\nEach suggestion should address one specific part of the translation.\nOutput only the suggestions and nothing else.",
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "Generate",
|
||||
"name": "Reflect"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 232,
|
||||
"id": "Generate:SlimyFrogsArgue",
|
||||
"position": {
|
||||
"x": 178.5,
|
||||
"y": 91.859375
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 178.5,
|
||||
"y": 91.859375
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "generateNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"cite": false,
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": false,
|
||||
"max_tokens": 512,
|
||||
"message_history_window_size": 12,
|
||||
"parameter": "Precise",
|
||||
"parameters": [
|
||||
{
|
||||
"component_id": "begin@lang",
|
||||
"id": "73f48a67-b78f-4bcd-8326-a83c31073ab9",
|
||||
"key": "target_lang"
|
||||
},
|
||||
{
|
||||
"component_id": "begin@file",
|
||||
"id": "c9142975-25b3-4199-8fce-aa0bc29a31f2",
|
||||
"key": "source_text"
|
||||
},
|
||||
{
|
||||
"component_id": "Generate:RichWordsDeny",
|
||||
"id": "6c824b2a-fe3b-4336-95b5-e85f676bef39",
|
||||
"key": "translation_1"
|
||||
},
|
||||
{
|
||||
"component_id": "Generate:SlimyFrogsArgue",
|
||||
"id": "f3bd4569-4852-43fa-b80a-e0dd27dd9e1c",
|
||||
"key": "reflection"
|
||||
}
|
||||
],
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Your task is to carefully read, then edit, a translation to {target_lang}, taking into\naccount a list of expert suggestions and constructive criticisms.\n\nThe source text, the initial translation, and the expert linguist suggestions are delimited by XML tags <SOURCE_TEXT></SOURCE_TEXT>, <TRANSLATION></TRANSLATION> and <EXPERT_SUGGESTIONS></EXPERT_SUGGESTIONS> \\\nas follows:\n\n<SOURCE_TEXT>\n{source_text}\n</SOURCE_TEXT>\n\n<TRANSLATION>\n{translation_1}\n</TRANSLATION>\n\n<EXPERT_SUGGESTIONS>\n{reflection}\n</EXPERT_SUGGESTIONS>\n\nPlease take into account the expert suggestions when editing the translation. Edit the translation by ensuring:\n\n(i) accuracy (by correcting errors of addition, mistranslation, omission, or untranslated text),\n(ii) fluency (by applying {target_lang} grammar, spelling and punctuation rules and ensuring there are no unnecessary repetitions), \n(iii) style (by ensuring the translations reflect the style of the source text)\n(iv) terminology (inappropriate for context, inconsistent use), or\n(v) other errors.\n\nOutput only the new translation and nothing else.",
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "Generate",
|
||||
"name": "Improve"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 274,
|
||||
"id": "Generate:ChubbyCougarsRush",
|
||||
"position": {
|
||||
"x": 437,
|
||||
"y": 70.859375
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 437,
|
||||
"y": 70.859375
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "generateNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {},
|
||||
@ -456,9 +262,13 @@
|
||||
"dragging": false,
|
||||
"height": 44,
|
||||
"id": "Answer:TinyGamesGuess",
|
||||
"measured": {
|
||||
"height": 44,
|
||||
"width": 200
|
||||
},
|
||||
"position": {
|
||||
"x": 688.5,
|
||||
"y": 183.859375
|
||||
"x": 645.5056004454161,
|
||||
"y": 182.98193827439627
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 688.5,
|
||||
@ -482,6 +292,10 @@
|
||||
"dragging": false,
|
||||
"height": 227,
|
||||
"id": "Note:MoodyKnivesCheat",
|
||||
"measured": {
|
||||
"height": 227,
|
||||
"width": 703
|
||||
},
|
||||
"position": {
|
||||
"x": 46.02198421645994,
|
||||
"y": -267.69527832581736
|
||||
@ -504,7 +318,7 @@
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "Many businesses use specialized terms that are not widely used on the internet and that LLMs thus don\u2019t know about, and there are also many terms that can be translated in multiple ways. For example, \u201dopen source\u201d in Spanish can be \u201cC\u00f3digo abierto\u201d or \u201cFuente abierta\u201d; both are fine, but it\u2019d better to pick one and stick with it for a single document.\n\nYou can add those glossary translation into prompt to any of `Translate directly` or 'Reflect'."
|
||||
"text": "Many businesses use specialized terms that are not widely used on the internet and that LLMs thus don’t know about, and there are also many terms that can be translated in multiple ways. For example, ”open source” in Spanish can be “Código abierto” or “Fuente abierta”; both are fine, but it’d better to pick one and stick with it for a single document.\n\nYou can add those glossary translation into prompt to any of `Translate directly` or 'Reflect'."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "Tip: Add glossary "
|
||||
@ -513,6 +327,10 @@
|
||||
"dragging": false,
|
||||
"height": 181,
|
||||
"id": "Note:SourCarrotsAct",
|
||||
"measured": {
|
||||
"height": 181,
|
||||
"width": 832
|
||||
},
|
||||
"position": {
|
||||
"x": 65.0676250238289,
|
||||
"y": 397.6323270065299
|
||||
@ -531,6 +349,120 @@
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 832
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"cite": false,
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": false,
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 1,
|
||||
"parameter": "Precise",
|
||||
"parameters": [],
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Role: You are a professional translator proficient in {begin@lang}, with an exceptional ability to convert specialized academic papers into accessible popular science articles. Please assist me in translating the following paragraph into {begin@lang}, ensuring that its style resembles that of popular science articles in {begin@lang}.\n\nRequirements & Restrictions:\n - Use Markdown format to output.\n - DO NOT overlook any details.\n\n\n<ORIGINAL_TEXT>\n{begin@file}\n\n<TRANSLATED_TEXT>",
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "Generate",
|
||||
"name": "Translate directly"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "Generate:VastKeysKick",
|
||||
"measured": {
|
||||
"height": 106,
|
||||
"width": 200
|
||||
},
|
||||
"position": {
|
||||
"x": -132.6338674989604,
|
||||
"y": 153.70663786774483
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "generateNode"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"cite": false,
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": false,
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 1,
|
||||
"parameter": "Precise",
|
||||
"parameters": [],
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Your task is to carefully read a source text and a translation to {begin@lang}, and then give constructive criticisms and helpful suggestions to improve the translation. \n\nThe source text and initial translation, delimited by XML tags <SOURCE_TEXT></SOURCE_TEXT> and <TRANSLATION></TRANSLATION>, are as follows:\n\n<SOURCE_TEXT>\n{begin@file}\n</SOURCE_TEXT>\n\n<TRANSLATION>\n{Generate:VastKeysKick}\n</TRANSLATION>\n\nWhen writing suggestions, pay attention to whether there are ways to improve the translation's \n(i) accuracy (by correcting errors of addition, mistranslation, omission, or untranslated text),\n(ii) fluency (by applying {begin@lang} grammar, spelling and punctuation rules, and ensuring there are no unnecessary repetitions),\n(iii) style (by ensuring the translations reflect the style of the source text and take into account any cultural context),\n(iv) terminology (by ensuring terminology use is consistent and reflects the source text domain; and by only ensuring you use equivalent idioms {begin@lang}).\n\nWrite a list of specific, helpful and constructive suggestions for improving the translation.\nEach suggestion should address one specific part of the translation.\nOutput only the suggestions and nothing else.",
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "Generate",
|
||||
"name": "Reflect"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "Generate:ShinySquidsSneeze",
|
||||
"measured": {
|
||||
"height": 106,
|
||||
"width": 200
|
||||
},
|
||||
"position": {
|
||||
"x": 121.1675336631696,
|
||||
"y": 152.92865408917177
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "generateNode"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"cite": false,
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": false,
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 1,
|
||||
"parameter": "Precise",
|
||||
"parameters": [],
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Your task is to carefully read, then edit, a translation to {begin@lang}, taking into\naccount a list of expert suggestions and constructive criticisms.\n\nThe source text, the initial translation, and the expert linguist suggestions are delimited by XML tags <SOURCE_TEXT></SOURCE_TEXT>, <TRANSLATION></TRANSLATION> and <EXPERT_SUGGESTIONS></EXPERT_SUGGESTIONS>\nas follows:\n\n<SOURCE_TEXT>\n{begin@file}\n</SOURCE_TEXT>\n\n<TRANSLATION>\n{Generate:VastKeysKick}\n</TRANSLATION>\n\n<EXPERT_SUGGESTIONS>\n{Generate:ShinySquidsSneeze}\n</EXPERT_SUGGESTIONS>\n\nPlease take into account the expert suggestions when editing the translation. Edit the translation by ensuring:\n\n(i) accuracy (by correcting errors of addition, mistranslation, omission, or untranslated text),\n(ii) fluency (by applying {begin@lang} grammar, spelling and punctuation rules and ensuring there are no unnecessary repetitions), \n(iii) style (by ensuring the translations reflect the style of the source text)\n(iv) terminology (inappropriate for context, inconsistent use), or\n(v) other errors.\n\nOutput only the new translation and nothing else.",
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "Generate",
|
||||
"name": "Improve"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "Generate:FuzzyEmusWork",
|
||||
"measured": {
|
||||
"height": 106,
|
||||
"width": 200
|
||||
},
|
||||
"position": {
|
||||
"x": 383.1474420163898,
|
||||
"y": 152.0472805236579
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "generateNode"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user