Repository navigation
Fix: agent template smart_customer_service_specialist.json - #15565
Conversation
📝 WalkthroughWalkthroughThis PR standardizes LLM model identifiers across 12 agent templates to a normalized ChangesLLM Model ID Standardization Across Templates
Parser Setup Schema Migration: Array Format Conversion
Customer Service Workflow Response Assembly Refactoring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (2)
agent/templates/smart_customer_service_specialist.json (2)
438-447: 💤 Low valueEdge styling inconsistent with sibling agent→aggregator edges.
The
Agent:ShinyCooksCall→VariableAggregatoredge omitsmarkerEnd,style,type: "buttonEdge", andzIndex, while the analogousAgent:DeepCoatsDress(Lines 465-472) andAgent:PlentyCandiesRefuse(Lines 478-485) edges include them. This is purely cosmetic but will render this one edge differently in the canvas.♻️ Align edge definition with siblings
{ "data": { "isHovered": false }, "id": "xy-edge__Agent:ShinyCooksCallstart-VariableAggregator:GentleLawsSneezeend", + "markerEnd": "logo", "source": "Agent:ShinyCooksCall", "sourceHandle": "start", + "style": { + "stroke": "rgba(91, 93, 106, 1)", + "strokeWidth": 1 + }, "target": "VariableAggregator:GentleLawsSneeze", - "targetHandle": "end" + "targetHandle": "end", + "type": "buttonEdge", + "zIndex": 1001 },🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@agent/templates/smart_customer_service_specialist.json` around lines 438 - 447, The edge object with id "xy-edge__Agent:ShinyCooksCallstart-VariableAggregator:GentleLawsSneezeend" (source "Agent:ShinyCooksCall", target "VariableAggregator:GentleLawsSneeze") is missing the visual properties present on sibling edges (e.g., the edges from "Agent:DeepCoatsDress" and "Agent:PlentyCandiesRefuse"); update this edge to include the same markerEnd, style, type: "buttonEdge", and zIndex properties so it renders consistently with the other agent→aggregator edges.
295-331: 🏗️ Heavy liftVariableAggregator won’t stall on a divergent Categorize flow; it picks the first available agent
@contentfrom the canvas.
VariableAggregatoronly setsanswerwhencanvas.get_variable_value(<Agent...@content>)returns a truthy value, so unexecuted branches simply contribute nothing and the downstreamMessagecan still resolve.- Missing
meta_data_filteronRetrieval:EagerTipsFeelis runtime-neutral becauseRetrievaldefaultsmeta_data_filter = {}when omitted.- Cosmetic:
Agent:ShinyCooksCall -> VariableAggregator:GentleLawsSneezeedge lackstype: buttonEdge,markerEnd, andzIndexpresent on the other agent→aggregator edges.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@agent/templates/smart_customer_service_specialist.json` around lines 295 - 331, Ensure VariableAggregator:GentleLawsSneeze deterministically aggregates agent outputs by checking for undefined explicitly (use canvas.get_variable_value(...) !== undefined) so it doesn't treat falsy but valid values as missing and continues to iterate agents in order (Agent:PlentyCandiesRefuse, Agent:ShinyCooksCall, Agent:DeepCoatsDress) rather than stalling or picking an unintended first truthy value; also add an explicit meta_data_filter: {} to Retrieval:EagerTipsFeel to mirror the default behavior and avoid implicit assumptions; finally add the missing edge attributes on the Agent:ShinyCooksCall -> VariableAggregator:GentleLawsSneeze edge (type: buttonEdge, markerEnd, zIndex) to match the other agent→aggregator edges so the canvas behavior and rendering remain consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@agent/templates/data_analysis_beginner_assistant.json`:
- Around line 31-54: The runtime sys_prompt/instructions in the template still
mandates "Use `CodeExec` (Python) for all computational tasks" causing a
Python-only runtime; update the sys_prompt's <instructions> step 4 to "Use
CodeExec (Python/SQL/R) for all computational tasks" and adjust the
corresponding <constraints> entry to allow programmatic outputs from Python,
SQL, or R so the template matches the DSL graph node (dsl.components) and
supports Python/SQL/R execution.
In `@agent/templates/smart_customer_service_specialist.json`:
- Line 276: The Retrieval node for EagerTipsFeel is missing the meta_data_filter
key while Retrieval:EightyDaysHappen includes "meta_data_filter": {}, causing
inconsistent schemas; update the EagerTipsFeel Retrieval node (component named
Retrieval:EagerTipsFeel) to include meta_data_filter with the same shape (e.g.,
add "meta_data_filter": {}) so both branches follow the expected Retrieval
schema and behave consistently.
In `@agent/templates/user_interaction.json`:
- Line 53: The Planning Agent sys_prompt contains a malformed closing tag:
change the trailing "<objectives>" to the proper closing tag "</objectives>" in
the sys_prompt string(s) so the XML-like prompt structure is balanced; locate
the sys_prompt field in agent/templates/user_interaction.json (the Planning
Agent prompt instance) and replace the duplicated opening tag at the end with
"</objectives>" wherever it appears (both serialized sections referenced),
ensuring the prompt text remains otherwise identical.
In `@agent/templates/web_search_assistant.json`:
- Around line 299-304: The template contains captured runtime state (globals
like sys.conversation_turns, sys.query, sys.user_id and non-empty
history/path/retrieval) that must be removed; edit the JSON template (look for
the "globals" object and the sections referenced around functions/keys history,
path, retrieval) to clear or replace runtime values with safe defaults (e.g.,
remove the concrete sys.user_id, set sys.conversation_turns to 0 or omit it, set
sys.query to an empty string, ensure sys.files is an empty array) and purge any
non-empty history/path/retrieval entries so new instances start from a clean,
non-identifying state.
- Line 48: The prompt template currently feeds the web-search result twice by
using {Agent:WildGoatsRule@content} for both "Web search result" and "Retrieval
result"; update the second occurrence so "Retrieval result" passes the KB output
token {Agent:WarmTimesRun@formalized_content} instead of WildGoatsRule. Locate
the string in the template that defines "Web search result" and "Retrieval
result" (the JSON keys around content) and replace the duplicate
{Agent:WildGoatsRule@content} for the Retrieval result with
{Agent:WarmTimesRun@formalized_content} so the Answer Organizer receives the
actual knowledge-base retrieval.
In `@agent/templates/your_starter_dataset_chatbot.json`:
- Line 52: The sys_prompt string opens a markdown code fence (```markdown) but
never closes it, causing formatting leaks in both serialized copies of the
template; update the sys_prompt value(s) (the JSON key "sys_prompt") to append a
closing triple-backtick (```) at the end of the prompt content to properly
terminate the fenced block so the prompt is well-formed in both serialized
occurrences.
---
Nitpick comments:
In `@agent/templates/smart_customer_service_specialist.json`:
- Around line 438-447: The edge object with id
"xy-edge__Agent:ShinyCooksCallstart-VariableAggregator:GentleLawsSneezeend"
(source "Agent:ShinyCooksCall", target "VariableAggregator:GentleLawsSneeze") is
missing the visual properties present on sibling edges (e.g., the edges from
"Agent:DeepCoatsDress" and "Agent:PlentyCandiesRefuse"); update this edge to
include the same markerEnd, style, type: "buttonEdge", and zIndex properties so
it renders consistently with the other agent→aggregator edges.
- Around line 295-331: Ensure VariableAggregator:GentleLawsSneeze
deterministically aggregates agent outputs by checking for undefined explicitly
(use canvas.get_variable_value(...) !== undefined) so it doesn't treat falsy but
valid values as missing and continues to iterate agents in order
(Agent:PlentyCandiesRefuse, Agent:ShinyCooksCall, Agent:DeepCoatsDress) rather
than stalling or picking an unintended first truthy value; also add an explicit
meta_data_filter: {} to Retrieval:EagerTipsFeel to mirror the default behavior
and avoid implicit assumptions; finally add the missing edge attributes on the
Agent:ShinyCooksCall -> VariableAggregator:GentleLawsSneeze edge (type:
buttonEdge, markerEnd, zIndex) to match the other agent→aggregator edges so the
canvas behavior and rendering remain consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 28f84477-98ff-40f9-a83a-400ddb7573cb
📒 Files selected for processing (19)
agent/templates/advanced_ingestion_pipeline.jsonagent/templates/chunk_summary.jsonagent/templates/customer_feedback_dispatcher.jsonagent/templates/cv_analysis_and_candidate_evaluation.jsonagent/templates/data_analysis_beginner_assistant.jsonagent/templates/deep_research.jsonagent/templates/ingestion_pipeline_resume.jsonagent/templates/market_seo_article_writer.jsonagent/templates/photo_text_translator.jsonagent/templates/reflective_academic_paper_generator.jsonagent/templates/seo_article_writer.jsonagent/templates/smart_customer_service_specialist.jsonagent/templates/stock_market_research_assistant.jsonagent/templates/text2sql_data_expert.jsonagent/templates/title_chunker.jsonagent/templates/trip_planner.jsonagent/templates/user_interaction.jsonagent/templates/web_search_assistant.jsonagent/templates/your_starter_dataset_chatbot.json
| "65cb5150819b11f08347047c16ec874f" | ||
| ], | ||
| "keywords_similarity_weight": 0.7, | ||
| "meta_data_filter": {}, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
FILE="agent/templates/smart_customer_service_specialist.json"
# Show around the referenced line numbers (small windows)
python3 - <<'PY'
import itertools,sys
file_path="agent/templates/smart_customer_service_specialist.json"
targets=[220,226,232,260,270,276,286,580,590,597,605,680,689,700,712]
with open(file_path,'r',encoding='utf-8') as f:
lines=f.readlines()
for t in targets:
start=max(1,t-8)
end=min(len(lines),t+8)
print(f"\n--- {file_path}:{start}-{end} (around {t}) ---")
for i in range(start,end+1):
print(f"{i:4d}:{lines[i-1].rstrip()}")
PY
# Also extract any occurrences of meta_data_filter in the file with line numbers
rg -n '"meta_data_filter"' "$FILE" || trueRepository: infiniflow/ragflow
Length of output: 12694
🏁 Script executed:
#!/bin/bash
set -euo pipefail
FILE="agent/templates/smart_customer_service_specialist.json"
echo "== meta_data_filter occurrences =="
rg -n '"meta_data_filter"\s*:\s*\{\}' "$FILE" || true
echo
echo "== Blocks around Retrieval:EagerTipsFeel =="
rg -n 'Retrieval:EagerTipsFeel' "$FILE" || true
python3 - <<'PY'
import re
path="agent/templates/smart_customer_service_specialist.json"
with open(path,'r',encoding='utf-8') as f:
lines=f.readlines()
def dump_around(idx, window=60):
start=max(0,idx-window)
end=min(len(lines)-1, idx+window)
print(f"\n--- around line {idx+1} ---")
for i in range(start,end+1):
print(f"{i+1:4d}:{lines[i].rstrip()}")
# find all occurrences
targets=[]
for i,l in enumerate(lines):
if 'Retrieval:EagerTipsFeel' in l:
targets.append(i)
for t in targets:
dump_around(t, window=70)
PYRepository: infiniflow/ragflow
Length of output: 50374
🏁 Script executed:
#!/bin/bash
set -euo pipefail
FILE="agent/templates/smart_customer_service_specialist.json"
python3 - <<'PY'
import re
path="agent/templates/smart_customer_service_specialist.json"
s=open(path,'r',encoding='utf-8').read()
def extract_block(node_id):
# Grab from the `"id": "<node_id>"` line up to the next occurrence of `"id": "` at same nesting-ish level
m=re.search(rf'"id"\s*:\s*"{re.escape(node_id)}"', s)
if not m:
return None
start=m.start()
# find next `"id": "` after start
m2=re.search(r'"id"\s*:\s*"', s[start+1:])
# above search finds next id marker but could be within strings; acceptable
# Better: find next `"id": "` occurrence after current start
# We'll locate the second quote pattern using regex with finditer
ids=[m_.start() for m_ in re.finditer(r'"id"\s*:\s*"', s)]
idx=next(i for i,x in enumerate(ids) if x>=start)
end=ids[idx+1] if idx+1<len(ids) else len(s)
return s[start:end]
for nid in ["Retrieval:EightyDaysHappen","Retrieval:EagerTipsFeel"]:
block=extract_block(nid)
has="meta_data_filter" in block if block else False
print(f"{nid}: meta_data_filter present? {has}")
if block:
# print a tiny excerpt around meta_data_filter if present else around kb_ids
if has:
k=block.find("meta_data_filter")
print(block[k-80:k+80].replace("\n","\\n"))
else:
kb=re.search(r'"kb_ids"\s*:\s*\[[^\]]*\]', block)
if kb:
print("kb_ids:", kb.group(0))
PY
# Also confirm component-side params for each Retrieval node
python3 - <<'PY'
import json
path="agent/templates/smart_customer_service_specialist.json"
# Not valid JSON overall? It's a JSON file; parse.
data=json.load(open(path,'r',encoding='utf-8'))
# component graph is under likely "nodes"?? We'll just re-search by string in raw for component param blocks.
s=open(path,'r',encoding='utf-8').read()
for nid in ["Retrieval:EightyDaysHappen","Retrieval:EagerTipsFeel"]:
# find the component entry: "Retrieval:E..": { ... "component_name":"Retrieval" ... "params": { ... }
import re
m=re.search(rf'"{re.escape(nid)}"\s*:\s*\{{', s)
if not m:
print(nid, "component not found")
continue
start=m.start()
# take next top-level key at same indentation by searching for \n "something":
# we'll just slice until next occurrence of '\n "Retrieval:' after start
m2=re.search(r'\n\s+"[A-Za-z0-9_:-]+":\s*\{{', s[start+1:]) # not robust
# simpler: just check in next 4000 chars
chunk=s[start:start+4000]
print(f"{nid} component params: meta_data_filter in next 4000 chars? {'meta_data_filter' in chunk}")
PYRepository: infiniflow/ragflow
Length of output: 350
🏁 Script executed:
#!/bin/bash
set -euo pipefail
FILE="agent/templates/smart_customer_service_specialist.json"
python3 - <<'PY'
import json,sys
path="agent/templates/smart_customer_service_specialist.json"
with open(path,'r',encoding='utf-8') as f:
data=json.load(f)
targets={"Retrieval:EagerTipsFeel","Retrieval:EightyDaysHappen"}
def walk(obj, path=""):
if isinstance(obj, dict):
# If this dict looks like a node with id, inspect it
node_id=obj.get("id")
if node_id in targets:
yield (node_id, path, obj)
for k,v in obj.items():
new_path=f"{path}.{k}" if path else str(k)
yield from walk(v,new_path)
elif isinstance(obj, list):
for i,v in enumerate(obj):
new_path=f"{path}[{i}]"
yield from walk(v,new_path)
found=list(walk(data))
print("Found node dicts:", len(found))
for node_id, path, obj in found:
print("\n---", node_id, "at", path, "---")
# Try to find meta_data_filter in common places
# graph node seems to have obj["data"]["form"]["meta_data_filter"]
data_block=obj.get("data") if isinstance(obj,dict) else None
meta=None
places=[]
if isinstance(data_block, dict):
form=data_block.get("form")
if isinstance(form, dict) and "meta_data_filter" in form:
meta=form.get("meta_data_filter")
places.append(f"data.form.meta_data_filter={meta!r}")
# component params might be under obj["obj"]["params"] or obj["obj"]["component_name"] structure
obj_block=obj.get("obj") if isinstance(obj,dict) else None
if isinstance(obj_block, dict):
params=obj_block.get("params")
if isinstance(params, dict) and "meta_data_filter" in params:
meta=params.get("meta_data_filter")
places.append(f"obj.params.meta_data_filter={meta!r}")
# params directly
if "meta_data_filter" in obj:
places.append(f"direct.meta_data_filter={obj.get('meta_data_filter')!r}")
if places:
for p in places:
print(p)
else:
print("meta_data_filter not found in inspected locations.")
PYRepository: infiniflow/ragflow
Length of output: 276
Align meta_data_filter across Retrieval nodes.
meta_data_filter: {} is present for Retrieval:EightyDaysHappen (e.g., around lines 276 and 597) but is missing from Retrieval:EagerTipsFeel (component around lines 232-262 / node). If the Retrieval schema expects this key, the two branches may behave differently; otherwise, this is still a consistency gap worth fixing.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agent/templates/smart_customer_service_specialist.json` at line 276, The
Retrieval node for EagerTipsFeel is missing the meta_data_filter key while
Retrieval:EightyDaysHappen includes "meta_data_filter": {}, causing inconsistent
schemas; update the EagerTipsFeel Retrieval node (component named
Retrieval:EagerTipsFeel) to include meta_data_filter with the same shape (e.g.,
add "meta_data_filter": {}) so both branches follow the expected Retrieval
schema and behave consistently.
| "role": "user" | ||
| } | ||
| ], | ||
| "sys_prompt": "<role>\nYou are the Planning Agent in a multi-agent RAG workflow.\nYour sole job is to design a crisp, executable Search Plan for the next agent. Do not search or answer the user’s question.\n</role>\n<objectives>\nUnderstand the user’s task and decompose it into evidence-seeking steps.\nProduce high-quality queries and retrieval settings tailored to the task type (fact lookup, multi-hop reasoning, comparison, statistics, how-to, etc.).\nIdentify missing information that would materially change the plan (≤3 concise questions).\nOptimize for source trustworthiness, diversity, and recency; define stopping criteria to avoid over-searching.\nAnswer in 150 words.\n<objectives>", |
There was a problem hiding this comment.
Fix malformed closing tag in Planning Agent prompt.
The final <objectives> should be a closing tag (</objectives>). The current typo is duplicated in both serialized sections and can weaken prompt structure consistency.
Suggested fix
- "sys_prompt": "...Answer in 150 words.\n<objectives>",
+ "sys_prompt": "...Answer in 150 words.\n</objectives>",Also applies to: 309-309
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agent/templates/user_interaction.json` at line 53, The Planning Agent
sys_prompt contains a malformed closing tag: change the trailing "<objectives>"
to the proper closing tag "</objectives>" in the sys_prompt string(s) so the
XML-like prompt structure is balanced; locate the sys_prompt field in
agent/templates/user_interaction.json (the Planning Agent prompt instance) and
replace the duplicated opening tag at the end with "</objectives>" wherever it
appears (both serialized sections referenced), ensuring the prompt text remains
otherwise identical.
| "presence_penalty": 0.4, | ||
| "prompts": [ | ||
| { | ||
| "content": "User's query:\n{sys.query}\n\nRefined question:\n{Agent:ThreePathsDecide@content}\n\nWeb search result:\n{Agent:WildGoatsRule@content}\n\nRetrieval result:\n{Agent:WildGoatsRule@content}", |
There was a problem hiding this comment.
Pass the actual knowledge-base retrieval output to the Answer Organizer.
Retrieval result is wired to {Agent:WildGoatsRule@content} in both copies of the prompt, so the final agent receives the web-search result twice and never sees Retrieval:WarmTimesRun@formalized_content. That breaks the template’s KB + web-search merge behavior.
Proposed fix
- "content": "User's query:\n{sys.query}\n\nRefined question:\n{Agent:ThreePathsDecide@content}\n\nWeb search result:\n{Agent:WildGoatsRule@content}\n\nRetrieval result:\n{Agent:WildGoatsRule@content}",
+ "content": "User's query:\n{sys.query}\n\nRefined question:\n{Agent:ThreePathsDecide@content}\n\nWeb search result:\n{Agent:WildGoatsRule@content}\n\nRetrieval result:\n{Retrieval:WarmTimesRun@formalized_content}",Also applies to: 668-668
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agent/templates/web_search_assistant.json` at line 48, The prompt template
currently feeds the web-search result twice by using
{Agent:WildGoatsRule@content} for both "Web search result" and "Retrieval
result"; update the second occurrence so "Retrieval result" passes the KB output
token {Agent:WarmTimesRun@formalized_content} instead of WildGoatsRule. Locate
the string in the template that defines "Web search result" and "Retrieval
result" (the JSON keys around content) and replace the duplicate
{Agent:WildGoatsRule@content} for the Retrieval result with
{Agent:WarmTimesRun@formalized_content} so the Answer Organizer receives the
actual knowledge-base retrieval.
| "globals": { | ||
| "sys.conversation_turns": 1, | ||
| "sys.files": [], | ||
| "sys.query": "你好", | ||
| "sys.user_id": "d6d98fd652f911f0a8fb047c16ec874f" | ||
| }, |
There was a problem hiding this comment.
Remove captured runtime state from the template.
This file still contains live session data: sys.conversation_turns = 1, sys.query = "你好", a concrete sys.user_id, plus non-empty history, path, and retrieval. New template instances will start from stale state, and committing the user ID is a privacy leak.
Proposed fix
- "globals": {
- "sys.conversation_turns": 1,
- "sys.files": [],
- "sys.query": "你好",
- "sys.user_id": "d6d98fd652f911f0a8fb047c16ec874f"
- },
+ "globals": {
+ "sys.conversation_turns": 0,
+ "sys.files": [],
+ "sys.query": "",
+ "sys.user_id": ""
+ },
@@
- "history": [
- [
- "user",
- "你好"
- ]
- ],
+ "history": [],
"memory": [],
"messages": [],
- "path": [
- "begin",
- "Agent:ThreePathsDecide"
- ],
- "retrieval": [
- {
- "chunks": [],
- "doc_aggs": []
- },
- {
- "chunks": {},
- "doc_aggs": {}
- }
- ],
+ "path": [],
+ "retrieval": [],Also applies to: 851-873
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agent/templates/web_search_assistant.json` around lines 299 - 304, The
template contains captured runtime state (globals like sys.conversation_turns,
sys.query, sys.user_id and non-empty history/path/retrieval) that must be
removed; edit the JSON template (look for the "globals" object and the sections
referenced around functions/keys history, path, retrieval) to clear or replace
runtime values with safe defaults (e.g., remove the concrete sys.user_id, set
sys.conversation_turns to 0 or omit it, set sys.query to an empty string, ensure
sys.files is an empty array) and purge any non-empty history/path/retrieval
entries so new instances start from a clean, non-identifying state.
| "role": "user" | ||
| } | ||
| ], | ||
| "sys_prompt": "# Role\n\nYou are the **Docs QA Agent**, a specialized knowledge base assistant responsible for providing accurate answers based strictly on the connected documentation repository.\n\n# Core Principles\n\n1. **Knowledge Base Only**: Answer questions EXCLUSIVELY based on information retrieved from the connected knowledge base.\n\n2. **No Content Creation**: Never generate, infer, or create information that is not explicitly present in the retrieved documents.\n\n3. **Source Transparency**: Always indicate when information comes from the knowledge base vs. when it's unavailable.\n\n4. **Accuracy Over Completeness**: Prefer incomplete but accurate answers over complete but potentially inaccurate ones.\n\n# Response Guidelines\n\n## When Information is Available\n\n- Provide direct answers based on retrieved content\n\n- Quote relevant sections when helpful\n\n- Cite the source document/section if available\n\n- Use phrases like: \"According to the documentation...\" or \"Based on the knowledge base...\"\n\n## When Information is Unavailable\n\n- Clearly state: \"I cannot find this information in the current knowledge base.\"\n\n- Do NOT attempt to fill gaps with general knowledge\n\n- Suggest alternative questions that might be covered in the docs\n\n- Use phrases like: \"The documentation does not cover...\" or \"This information is not available in the knowledge base.\"\n\n# Response Format\n\n```markdown\n\n## Answer\n\n[Your response based strictly on knowledge base content]\n\n**Always do these:**\n\n- Use the Retrieval tool for every question\n\n- Be transparent about information availability\n\n- Stick to documented facts only\n\n- Acknowledge knowledge base limitations\n\n", |
There was a problem hiding this comment.
Close the markdown code fence in sys_prompt.
The prompt opens with ```markdown but never closes, and this is duplicated in both serialized copies. Close the fence to avoid unintended formatting carry-over.
Suggested fix
- "...- Acknowledge knowledge base limitations\n\n",
+ "...- Acknowledge knowledge base limitations\n\n```",Also applies to: 203-203
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agent/templates/your_starter_dataset_chatbot.json` at line 52, The sys_prompt
string opens a markdown code fence (```markdown) but never closes it, causing
formatting leaks in both serialized copies of the template; update the
sys_prompt value(s) (the JSON key "sys_prompt") to append a closing
triple-backtick (```) at the end of the prompt content to properly terminate the
fenced block so the prompt is well-formed in both serialized occurrences.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15565 +/- ##
=======================================
Coverage 93.16% 93.16%
=======================================
Files 10 10
Lines 717 717
Branches 118 118
=======================================
Hits 668 668
Misses 29 29
Partials 20 20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
What problem does this PR solve?
agent template smart_customer_service_specialist.json
Type of change