Repository navigation
Refact: update pipeline template - #14036
Conversation
📝 WalkthroughWalkthroughRewrote three ingestion pipeline templates: extractor chains replaced with new extractor/tokenizer flows, parser Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
agent/templates/advanced_ingestion_pipeline.json (1)
169-282:⚠️ Potential issue | 🟠 MajorInconsistent
setupsformat betweencomponentsandgraph.nodes.Same issue as in
chunk_summary.json:components.Parseruses object-keyed format (Lines 169-282) whilegraph.nodesuses array format withfileFormatproperty (Lines 440-506).Also applies to: 440-506
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@agent/templates/advanced_ingestion_pipeline.json` around lines 169 - 282, The "setups" structure under components.Parser is using an object-keyed map while graph.nodes expects an array of setups with a fileFormat property (inconsistent with graph.nodes). Update components.Parser's "setups" to the same array format used by graph.nodes: convert each key (e.g., "doc", "pdf", "image", "email", "markdown", "text&code", etc.) into an array element object that includes fileFormat (the original key), plus the existing properties like output_format, preprocess, parse_method, suffix, fields, vlm, system_prompt; or alternatively convert graph.nodes entries to the object-keyed map—choose and apply the same format across both "components.Parser.setups" and "graph.nodes" so they match (ensure use of the exact symbols "components.Parser", "setups", "graph.nodes", and "fileFormat" when making the change).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@agent/templates/advanced_ingestion_pipeline.json`:
- Around line 17-55: The Extractor:CleverPianosInvite node is currently
configured as a summarizer but labeled/expected to produce auto-questions;
change its field_name from "summary" to a unique name like "questions" to avoid
collision with Extractor:EasyToesFail, and replace the current sys_prompt (which
instructs summarization) with a Q&A-focused prompt that instructs generation of
concise, source-faithful question-answer pairs (e.g., roles, expected output
format, constraints on invented facts). Ensure you update any downstream
expectations (e.g., Tokenizer:ShyBalloonsSmell) to consume the new "questions"
field if needed.
- Around line 38-43: The graph node `prompts` entries are plain strings while
the `components` `prompts` use an array of message objects (e.g., { "content":
"...", "role": "user" }), causing format inconsistency; update the
`graph.nodes[*].prompts` to match the component format by replacing string
prompts with an array of message objects (same shape as in
`components.prompts`), or conversely normalize `components.prompts` if you
intend nodes to be strings—ensure both `components` and `graph.nodes` use the
identical prompts schema (message object array) like in `chunk_summary.json` so
downstream code expecting message objects will work.
In `@agent/templates/chunk_summary.json`:
- Around line 38-43: The file has an inconsistent type for "prompts" between the
"components" section (an array of message objects with "content" and "role") and
the "graph.nodes" entry (a plain string); update the graph.nodes "prompts" to
match the components shape by turning the string into an array of message
objects (each with "content" and "role", e.g., role: "user") so both "prompts"
usages share the same schema, and validate any code that reads "prompts" to
expect an array of {content, role}.
In `@agent/templates/title_chunker.json`:
- Line 179: The "hierarchy" field has inconsistent types: in the "components"
object it's a number (hierarchy: 3) but in "graph.nodes" it's a string
("hierarchy": "3"); update the "graph.nodes" entries (or all occurrences) so the
hierarchy value is consistently a number (remove the quotes) across the template
(look for "components" and "graph.nodes" objects and the "hierarchy" property)
to prevent type mismatches at runtime.
- Around line 181-215: The TitleChunker configuration has inconsistent shapes:
under components the "levels" in the TitleChunker entry is an
array-of-arrays-of-strings (regex literals) while under graph.nodes it uses a
"rules" array with nested "levels" as arrays of objects with "expression" keys;
make both sides use the same shape (pick one) and convert the other to match —
e.g., either wrap each regex string in components' levels into objects like
{"expression": "..."} to match graph.nodes' rules, or collapse
graph.nodes.rules[*].levels to arrays of raw regex strings to match components;
update the TitleChunker configuration entries for "components", "graph.nodes",
and any other occurrences so "levels" consistently uses the same element type
(string vs object with "expression") and remove/adjust the redundant "rules"
wrapper if needed.
- Around line 52-165: The templates use an object-keyed "setups" (seen under
"setups") but elsewhere "components" / "graph.nodes" expect an array format with
a "fileFormat" field; make "setups" consistent by converting each entry to the
array-style entries that include fileFormat (e.g., turn the "doc", "pdf",
"image", etc. keys into array items that include a fileFormat property and the
same properties: output_format, preprocess, suffix, parse_method, vlm,
system_prompt, fields), and ensure graph.nodes deserialization logic still maps
fileFormat to the corresponding setup name so both "components" and
"graph.nodes" use the same array-of-objects format referencing "fileFormat".
---
Outside diff comments:
In `@agent/templates/advanced_ingestion_pipeline.json`:
- Around line 169-282: The "setups" structure under components.Parser is using
an object-keyed map while graph.nodes expects an array of setups with a
fileFormat property (inconsistent with graph.nodes). Update components.Parser's
"setups" to the same array format used by graph.nodes: convert each key (e.g.,
"doc", "pdf", "image", "email", "markdown", "text&code", etc.) into an array
element object that includes fileFormat (the original key), plus the existing
properties like output_format, preprocess, parse_method, suffix, fields, vlm,
system_prompt; or alternatively convert graph.nodes entries to the object-keyed
map—choose and apply the same format across both "components.Parser.setups" and
"graph.nodes" so they match (ensure use of the exact symbols
"components.Parser", "setups", "graph.nodes", and "fileFormat" when making the
change).
🪄 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: e920aa20-b1d9-4287-a7d3-aa2cf1d62afd
📒 Files selected for processing (3)
agent/templates/advanced_ingestion_pipeline.jsonagent/templates/chunk_summary.jsonagent/templates/title_chunker.json
| "Extractor:CleverPianosInvite": { | ||
| "downstream": [ | ||
| "Tokenizer:ShyBalloonsSmell" | ||
| ], | ||
| "obj": { | ||
| "component_name": "Extractor", | ||
| "params": { | ||
| "field_name": "summary", | ||
| "frequencyPenaltyEnabled": true, | ||
| "frequency_penalty": 0.7, | ||
| "llm_id": "Qwen/Qwen3-8B@SILICONFLOW", | ||
| "maxTokensEnabled": false, | ||
| "max_tokens": 256, | ||
| "outputs": { | ||
| "chunks": { | ||
| "type": "Array<Object>", | ||
| "value": [] | ||
| } | ||
| }, | ||
| "slides": { | ||
| "output_format": "json", | ||
| "suffix": [ | ||
| "pptx" | ||
| ] | ||
| } | ||
| "presencePenaltyEnabled": true, | ||
| "presence_penalty": 0.4, | ||
| "prompts": [ | ||
| { | ||
| "content": "Text to Summarize:\n[Insert text here]", | ||
| "role": "user" | ||
| } | ||
| ], | ||
| "sys_prompt": "Act as a precise summarizer. Your task is to create a summary of the provided content that is both concise and faithful to the original.\n\nKey Instructions:\n1. Accuracy: Strictly base the summary on the information given. Do not introduce any new facts, conclusions, or interpretations that are not explicitly stated.\n2. Language: Write the summary in the same language as the source text.\n3. Objectivity: Present the key points without bias, preserving the original intent and tone of the content. Do not editorialize.\n4. Conciseness: Focus on the most important ideas, omitting minor details and fluff.", | ||
| "temperature": 0.1, | ||
| "temperatureEnabled": true, | ||
| "tenant_llm_id": 54, | ||
| "topPEnabled": true, | ||
| "top_p": 0.3 | ||
| } | ||
| } | ||
| }, | ||
| "downstream": [ | ||
| "TokenChunker:KindDingosJam" | ||
| ], | ||
| "upstream": [ | ||
| "File" | ||
| ] | ||
| }, | ||
| "TokenChunker:KindDingosJam": { | ||
| "obj": { | ||
| "component_name": "TokenChunker", | ||
| "params": { | ||
| "chunk_token_size": 512, | ||
| "delimiters": [ | ||
| "\n" | ||
| ], | ||
| "outputs": { | ||
| "chunks": { | ||
| "type": "Array<Object>", | ||
| "value": [] | ||
| } | ||
| }, | ||
| "overlapped_percent": 0.002 | ||
| } | ||
| }, | ||
| "downstream": [ | ||
| "Extractor:NineTiesSin" | ||
| ], | ||
| "upstream": [ | ||
| "Parser:HipSignsRhyme" | ||
| ] | ||
| }, | ||
| "Extractor:NineTiesSin": { | ||
| "obj": { | ||
| "component_name": "Extractor", | ||
| "params": { | ||
| "field_name": "summary", | ||
| "frequencyPenaltyEnabled": false, | ||
| "frequency_penalty": 0.7, | ||
| "llm_id": "deepseek-chat@DeepSeek", | ||
| "maxTokensEnabled": false, | ||
| "max_tokens": 256, | ||
| "outputs": {}, | ||
| "presencePenaltyEnabled": false, | ||
| "presence_penalty": 0.4, | ||
| "prompts": [ | ||
| { | ||
| "content": "Text to Summarize:\n{TokenChunker:KindDingosJam@chunks}", | ||
| "role": "user" | ||
| } | ||
| ], | ||
| "sys_prompt": "Act as a precise summarizer. Your task is to create a summary of the provided content that is both concise and faithful to the original.\n\nKey Instructions:\n1. Accuracy: Strictly base the summary on the information given. Do not introduce any new facts, conclusions, or interpretations that are not explicitly stated.\n2. Language: Write the summary in the same language as the source text.\n3. Objectivity: Present the key points without bias, preserving the original intent and tone of the content. Do not editorialize.\n4. Conciseness: Focus on the most important ideas, omitting minor details and fluff.", | ||
| "temperature": 0.1, | ||
| "temperatureEnabled": false, | ||
| "topPEnabled": false, | ||
| "top_p": 0.3 | ||
| } | ||
| }, | ||
| "downstream": [ | ||
| "Extractor:TastyPointsLay" | ||
| ], | ||
| "upstream": [ | ||
| "TokenChunker:KindDingosJam" | ||
| ] | ||
| }, | ||
| "Extractor:TastyPointsLay": { | ||
| "obj": { | ||
| "component_name": "Extractor", | ||
| "params": { | ||
| "field_name": "keywords", | ||
| "frequencyPenaltyEnabled": false, | ||
| "frequency_penalty": 0.7, | ||
| "llm_id": "deepseek-chat@DeepSeek", | ||
| "maxTokensEnabled": false, | ||
| "max_tokens": 256, | ||
| "outputs": {}, | ||
| "presencePenaltyEnabled": false, | ||
| "presence_penalty": 0.4, | ||
| "prompts": [ | ||
| { | ||
| "content": "Text Content:\n{Extractor:NineTiesSin@chunks}\n", | ||
| "role": "user" | ||
| } | ||
| ], | ||
| "sys_prompt": "Role\nYou are a text analyzer.\n\nTask\nExtract the most important keywords/phrases of a given piece of text content.\n\nRequirements\n- Summarize the text content, and give the top 5 important keywords/phrases.\n- The keywords MUST be in the same language as the given piece of text content.\n- The keywords are delimited by ENGLISH COMMA.\n- Output keywords ONLY.", | ||
| "temperature": 0.1, | ||
| "temperatureEnabled": false, | ||
| "topPEnabled": false, | ||
| "top_p": 0.3 | ||
| } | ||
| }, | ||
| "downstream": [ | ||
| "Extractor:BlueResultsWink" | ||
| ], | ||
| "upstream": [ | ||
| "Extractor:NineTiesSin" | ||
| ] | ||
| }, | ||
| "Extractor:BlueResultsWink": { | ||
| "obj": { | ||
| "component_name": "Extractor", | ||
| "params": { | ||
| "field_name": "questions", | ||
| "frequencyPenaltyEnabled": false, | ||
| "frequency_penalty": 0.7, | ||
| "llm_id": "deepseek-chat@DeepSeek", | ||
| "maxTokensEnabled": false, | ||
| "max_tokens": 256, | ||
| "outputs": {}, | ||
| "presencePenaltyEnabled": false, | ||
| "presence_penalty": 0.4, | ||
| "prompts": [ | ||
| { | ||
| "content": "Text Content:\n\n{Extractor:TastyPointsLay@chunks}\n", | ||
| "role": "user" | ||
| } | ||
| ], | ||
| "sys_prompt": "Role\nYou are a text analyzer.\n\nTask\nPropose 3 questions about a given piece of text content.\n\nRequirements\n- Understand and summarize the text content, and propose the top 3 important questions.\n- The questions SHOULD NOT have overlapping meanings.\n- The questions SHOULD cover the main content of the text as much as possible.\n- The questions MUST be in the same language as the given piece of text content.\n- One question per line.\n- Output questions ONLY.", | ||
| "temperature": 0.1, | ||
| "temperatureEnabled": false, | ||
| "topPEnabled": false, | ||
| "top_p": 0.3 | ||
| } | ||
| }, | ||
| "downstream": [ | ||
| "Extractor:CuteBusesBet" | ||
| ], | ||
| "upstream": [ | ||
| "Extractor:TastyPointsLay" | ||
| ] | ||
| }, | ||
| "Extractor:CuteBusesBet": { | ||
| "obj": { | ||
| "component_name": "Extractor", | ||
| "params": { | ||
| "field_name": "metadata", | ||
| "frequencyPenaltyEnabled": false, | ||
| "frequency_penalty": 0.7, | ||
| "llm_id": "deepseek-chat@DeepSeek", | ||
| "maxTokensEnabled": false, | ||
| "max_tokens": 256, | ||
| "outputs": {}, | ||
| "presencePenaltyEnabled": false, | ||
| "presence_penalty": 0.4, | ||
| "prompts": [ | ||
| { | ||
| "content": "Content: \n\n{Extractor:BlueResultsWink@chunks}", | ||
| "role": "user" | ||
| } | ||
| ], | ||
| "sys_prompt": "Extract important structured information from the given content. Output ONLY a valid JSON string with no additional text. If no important structured information is found, output an empty JSON object: {}.\n\nImportant structured information may include: names, dates, locations, events, key facts, numerical data, or other extractable entities.", | ||
| "temperature": 0.1, | ||
| "temperatureEnabled": false, | ||
| "topPEnabled": false, | ||
| "top_p": 0.3 | ||
| } | ||
| }, | ||
| "downstream": [ | ||
| "Tokenizer:LegalHorsesCheer" | ||
| ], | ||
| "upstream": [ | ||
| "Extractor:BlueResultsWink" | ||
| ] | ||
| }, | ||
| "Tokenizer:LegalHorsesCheer": { | ||
| "obj": { | ||
| "component_name": "Tokenizer", | ||
| "params": { | ||
| "fields": "text", | ||
| "filename_embd_weight": 0.1, | ||
| "outputs": {}, | ||
| "search_method": [ | ||
| "embedding", | ||
| "full_text" | ||
| ] | ||
| } | ||
| }, | ||
| "downstream": [], | ||
| "upstream": [ | ||
| "Extractor:CuteBusesBet" | ||
| ] | ||
| } | ||
| }, | ||
| "globals": {}, | ||
| "graph": { | ||
| "nodes": [ | ||
| { | ||
| "data": { | ||
| "label": "File", | ||
| "name": "File" | ||
| }, | ||
| "dragging": false, | ||
| "id": "File", | ||
| "measured": { | ||
| "height": 48, | ||
| "width": 200 | ||
| "upstream": [ | ||
| "Extractor:SunnyCooksSpend" | ||
| ] | ||
| }, |
There was a problem hiding this comment.
Critical: Extractor:CleverPianosInvite is misconfigured as "Auto Questions" but performs summarization.
The template description promises "summaries, keywords, Q&A, and metadata" generation, but:
- Line 24:
field_nameis"summary"- same asExtractor:EasyToesFail, causing one to overwrite the other - Line 44:
sys_promptis for summarization ("Act as a precise summarizer..."), not Q&A generation - Line 675: Graph node names it "Auto Questions" but the actual behavior is summarization
This extractor should have a unique field_name (e.g., "questions") and a Q&A-focused system prompt.
🐛 Suggested fix for field_name and sys_prompt
"Extractor:CleverPianosInvite": {
...
"params": {
- "field_name": "summary",
+ "field_name": "questions",
...
- "sys_prompt": "Act as a precise summarizer. Your task is to create a summary of the provided content that is both concise and faithful to the original.\n\nKey Instructions:\n1. Accuracy: Strictly base the summary on the information given. Do not introduce any new facts, conclusions, or interpretations that are not explicitly stated.\n2. Language: Write the summary in the same language as the source text.\n3. Objectivity: Present the key points without bias, preserving the original intent and tone of the content. Do not editorialize.\n4. Conciseness: Focus on the most important ideas, omitting minor details and fluff.",
+ "sys_prompt": "Role\nYou are a Q&A generator.\n\nTask\nGenerate relevant questions and answers based on the given text content.\n\nRequirements\n- Generate 3-5 question-answer pairs that capture key information from the text.\n- Questions and answers MUST be in the same language as the source text.\n- Format output as: Q: [question]\\nA: [answer]",Also applies to: 649-676
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@agent/templates/advanced_ingestion_pipeline.json` around lines 17 - 55, The
Extractor:CleverPianosInvite node is currently configured as a summarizer but
labeled/expected to produce auto-questions; change its field_name from "summary"
to a unique name like "questions" to avoid collision with
Extractor:EasyToesFail, and replace the current sys_prompt (which instructs
summarization) with a Q&A-focused prompt that instructs generation of concise,
source-faithful question-answer pairs (e.g., roles, expected output format,
constraints on invented facts). Ensure you update any downstream expectations
(e.g., Tokenizer:ShyBalloonsSmell) to consume the new "questions" field if
needed.
| "prompts": [ | ||
| { | ||
| "content": "Text to Summarize:\n[Insert text here]", | ||
| "role": "user" | ||
| } | ||
| ], |
There was a problem hiding this comment.
Inconsistent prompts format between components and graph.nodes.
Same pattern as chunk_summary.json: component prompts is an array of message objects, but graph node prompts is a plain string (Line 580).
Also applies to: 580-580
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@agent/templates/advanced_ingestion_pipeline.json` around lines 38 - 43, The
graph node `prompts` entries are plain strings while the `components` `prompts`
use an array of message objects (e.g., { "content": "...", "role": "user" }),
causing format inconsistency; update the `graph.nodes[*].prompts` to match the
component format by replacing string prompts with an array of message objects
(same shape as in `components.prompts`), or conversely normalize
`components.prompts` if you intend nodes to be strings—ensure both `components`
and `graph.nodes` use the identical prompts schema (message object array) like
in `chunk_summary.json` so downstream code expecting message objects will work.
| "prompts": [ | ||
| { | ||
| "content": "Text to Summarize:\n[Insert text here]", | ||
| "role": "user" | ||
| } | ||
| ], |
There was a problem hiding this comment.
Inconsistent prompts format between components and graph.nodes.
- Line 38-43 (
components):promptsis an array of message objects withcontentandroleproperties - Line 476 (
graph.nodes):promptsis a plain string
This type mismatch could cause runtime errors depending on which configuration source is used.
Also applies to: 476-476
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@agent/templates/chunk_summary.json` around lines 38 - 43, The file has an
inconsistent type for "prompts" between the "components" section (an array of
message objects with "content" and "role") and the "graph.nodes" entry (a plain
string); update the graph.nodes "prompts" to match the components shape by
turning the string into an array of message objects (each with "content" and
"role", e.g., role: "user") so both "prompts" usages share the same schema, and
validate any code that reads "prompts" to expect an array of {content, role}.
| "setups": { | ||
| "doc": { | ||
| "output_format": "json", | ||
| "preprocess": "main_content", | ||
| "suffix": [ | ||
| "doc" | ||
| ] | ||
| }, | ||
| "docx": { | ||
| "output_format": "json", | ||
| "preprocess": "main_content", | ||
| "suffix": [ | ||
| "docx" | ||
| ], | ||
| "vlm": {} | ||
| }, | ||
| "email": { | ||
| "fields": [ | ||
| "from", | ||
| "to", | ||
| "cc", | ||
| "bcc", | ||
| "date", | ||
| "subject", | ||
| "body", | ||
| "attachments" | ||
| ], | ||
| "output_format": "text", | ||
| "preprocess": "main_content", | ||
| "suffix": [ | ||
| "eml", | ||
| "msg" | ||
| ] | ||
| }, | ||
| "html": { | ||
| "output_format": "json", | ||
| "preprocess": "main_content", | ||
| "suffix": [ | ||
| "htm", | ||
| "html" | ||
| ] | ||
| }, | ||
| "image": { | ||
| "output_format": "text", | ||
| "parse_method": "ocr", | ||
| "preprocess": "main_content", | ||
| "suffix": [ | ||
| "jpg", | ||
| "jpeg", | ||
| "png", | ||
| "gif" | ||
| ], | ||
| "system_prompt": "" | ||
| }, | ||
| "markdown": { | ||
| "output_format": "json", | ||
| "preprocess": "main_content", | ||
| "suffix": [ | ||
| "md", | ||
| "markdown", | ||
| "mdx" | ||
| ], | ||
| "vlm": {} | ||
| }, | ||
| "pdf": { | ||
| "output_format": "json", | ||
| "parse_method": "DeepDOC" | ||
| "parse_method": "DeepDOC", | ||
| "preprocess": "main_content", | ||
| "suffix": [ | ||
| "pdf" | ||
| ], | ||
| "vlm": {} | ||
| }, | ||
| { | ||
| "fileFormat": "text&markdown", | ||
| "output_format": "text" | ||
| "slides": { | ||
| "output_format": "json", | ||
| "parse_method": "DeepDOC", | ||
| "preprocess": "main_content", | ||
| "suffix": [ | ||
| "pptx", | ||
| "ppt" | ||
| ] | ||
| }, | ||
| { | ||
| "fileFormat": "word", | ||
| "output_format": "json" | ||
| "spreadsheet": { | ||
| "output_format": "html", | ||
| "parse_method": "DeepDOC", | ||
| "preprocess": "main_content", | ||
| "suffix": [ | ||
| "xls", | ||
| "xlsx", | ||
| "csv" | ||
| ], | ||
| "vlm": {} | ||
| }, | ||
| "text&code": { | ||
| "output_format": "json", | ||
| "preprocess": "main_content", | ||
| "suffix": [ | ||
| "txt", | ||
| "py", | ||
| "js", | ||
| "java", | ||
| "c", | ||
| "cpp", | ||
| "h", | ||
| "php", | ||
| "go", | ||
| "ts", | ||
| "sh", | ||
| "cs", | ||
| "kt", | ||
| "sql" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "label": "Parser", | ||
| "name": "Parser" | ||
| }, | ||
| "dragging": false, | ||
| "id": "Parser:HipSignsRhyme", | ||
| "measured": { | ||
| "height": 204, | ||
| "width": 200 | ||
| } |
There was a problem hiding this comment.
Inconsistent setups format between components and graph.nodes.
Same issue as the other template files: object-keyed format in components vs array format with fileFormat in graph.nodes.
Also applies to: 312-378
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@agent/templates/title_chunker.json` around lines 52 - 165, The templates use
an object-keyed "setups" (seen under "setups") but elsewhere "components" /
"graph.nodes" expect an array format with a "fileFormat" field; make "setups"
consistent by converting each entry to the array-style entries that include
fileFormat (e.g., turn the "doc", "pdf", "image", etc. keys into array items
that include a fileFormat property and the same properties: output_format,
preprocess, suffix, parse_method, vlm, system_prompt, fields), and ensure
graph.nodes deserialization logic still maps fileFormat to the corresponding
setup name so both "components" and "graph.nodes" use the same array-of-objects
format referencing "fileFormat".
There was a problem hiding this comment.
Actionable comments posted: 5
♻️ Duplicate comments (4)
agent/templates/title_chunker.json (1)
91-204:⚠️ Potential issue | 🟠 MajorParser config is still split across two incompatible schemas.
dsl.components.Parser.params.setupsis now a format-keyed object, butgraph.nodes[*].data.form.setupsis still the legacyfileFormatarray and drops fields likesuffixandvlm. Any canvas edit/save round-trip can silently lose parser options or hydrate the wrong defaults.Also applies to: 338-404
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@agent/templates/title_chunker.json` around lines 91 - 204, The parser setup schema is inconsistent: dsl.components.Parser.params.setups uses the new format-keyed object (with fields like suffix and vlm) while graph.nodes[*].data.form.setups still uses the legacy fileFormat array, causing loss of fields on save/load; update the graph node form serialization/deserialization so graph.nodes[*].data.form.setups uses the same format-keyed object shape as dsl.components.Parser.params.setups (preserve suffix, vlm, parse_method, output_format, preprocess, system_prompt, etc.), migrate any legacy array reading code to convert fileFormat arrays into the new keyed object on load, and ensure writers produce the new keyed object on save so edits round-trip without dropping options.agent/templates/advanced_ingestion_pipeline.json (2)
169-282:⚠️ Potential issue | 🟠 MajorThe canvas node forms still serialize the old schema.
componentsswitched to object-keyed parser setups and message-array prompts, butgraph.nodesstill uses the legacysetupsarray plus stringprompts. Re-opening and saving this template can discard parser details likesuffix/vlmand reintroduce the old prompt shape.Also applies to: 441-507, 581-582, 624-625, 667-668
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@agent/templates/advanced_ingestion_pipeline.json` around lines 169 - 282, graph.nodes serialization is still emitting the legacy schema (an array-style setups and string prompts) which causes loss of parser details; update the canvas node form serialization to match the new components schema by writing setups as an object keyed by parser name (preserving fields like suffix and vlm) and serialize prompts as an array of message objects instead of a single string; locate the code that builds/serializes graph.nodes and replace the legacy array/string mapping with the object-shaped setups and message-array prompts so reopening/saving preserves suffix/vlm and the new prompt shape (references: graph.nodes, setups, prompts, components).
24-44:⚠️ Potential issue | 🟠 Major
Auto Questionsis still configured as a summarizer.This stage still writes to
summaryand uses summarization instructions, so it duplicates/overwrites summaries instead of generating Q&A. That breaks the template’s advertised summary → keywords → questions flow.🐛 Suggested fix
- "field_name": "summary", + "field_name": "questions", ... - "content": "Text to Summarize:\n{Extractor:SunnyCooksSpend@chunks}", + "content": "Text Content:\n{Extractor:SunnyCooksSpend@chunks}", ... - "sys_prompt": "Act as a precise summarizer. Your task is to create a summary of the provided content that is both concise and faithful to the original.\n\nKey Instructions:\n1. Accuracy: Strictly base the summary on the information given. Do not introduce any new facts, conclusions, or interpretations that are not explicitly stated.\n2. Language: Write the summary in the same language as the source text.\n3. Objectivity: Present the key points without bias, preserving the original intent and tone of the content. Do not editorialize.\n4. Conciseness: Focus on the most important ideas, omitting minor details and fluff.", + "sys_prompt": "Role\nYou are a Q&A generator.\n\nTask\nGenerate concise, source-faithful question-answer pairs from the given text.\n\nRequirements\n- Generate 3-5 question-answer pairs.\n- Keep the same language as the source text.\n- Do not invent facts.\n- Output format: Q: ...\\nA: ...",Also applies to: 653-668, 675-676
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@agent/templates/advanced_ingestion_pipeline.json` around lines 24 - 44, The "Auto Questions" stage is still configured as a summarizer: change the stage configuration that currently targets field_name "summary" and uses the summarization sys_prompt and prompt (e.g., the prompt with "Text to Summarize:\n{Extractor:SunnyCooksSpend@chunks}" and the sys_prompt starting "Act as a precise summarizer...") so it instead writes to an appropriate questions field (e.g., "questions" or "auto_questions"), update outputs to produce a questions array (not "chunks"), replace the prompt content to request generation of Q&A (e.g., "Generate concise question and answer pairs from the following content:{Extractor:SunnyCooksSpend@chunks}") and replace the sys_prompt with instructions to produce objective Q&A pairs; apply the same changes to the other similar blocks referenced (lines ~653-668 and 675-676) so Auto Questions actually generates Q&A rather than overwriting the summary.agent/templates/chunk_summary.json (1)
91-204:⚠️ Potential issue | 🟠 MajorThe template still mixes new component schema with old canvas schema.
Parser
setupsis object-keyed incomponents, but the node form keeps the legacyfileFormatarray, andpromptsflips from a message array to a plain string. A canvas save will not round-trip this template faithfully.Also applies to: 338-404, 478-479
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@agent/templates/chunk_summary.json` around lines 91 - 204, The template mixes the new component schema with the legacy canvas schema: update the node forms under "components" to use the object-keyed "setups" structure instead of the old "fileFormat" array and ensure any "prompts" fields remain the message-array form (not plain strings) so saves round-trip correctly; specifically replace legacy "fileFormat" usages with references into "setups" and convert any "prompts" occurrences to the message-array shape used elsewhere (check the "setups", "components", "fileFormat", and "prompts" entries and mirror the structure present in the updated component schema).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@agent/templates/advanced_ingestion_pipeline.json`:
- Around line 319-326: The pipeline is only indexing "text" so generated outputs
like "summary", "keywords" and "questions" are never used; update the params in
the ingestion template (the "params" object that currently sets "fields": "text"
and "outputs": {}) to include all downstream fields produced by the pipeline
(e.g., add "summary", "keywords", "questions" to the "fields" array or otherwise
map them into the tokenizer/indexer) and ensure the "outputs" mapping reflects
these names so the indexing/tokenizer step (the component that consumes
"params.fields") will include them; apply the same change to the other
occurrence of this params block later in the file.
In `@agent/templates/chunk_summary.json`:
- Around line 242-249: The tokenizer configs currently use "fields": "text" so
the tokenizer ignores the extractor's "summary"; update each tokenizer config
that should back the text/vector indexes to use "fields": "summary" instead of
"fields": "text" (preserving other keys like "filename_embd_weight",
"search_method", and "outputs"), and verify the extractor continues to emit the
"summary" field so it becomes the indexed field; apply this change to all
occurrences where the tokenizer is intended to index the summary (including the
other two similar blocks noted).
In `@agent/templates/title_chunker.json`:
- Around line 38-44: Replace the literal placeholder in the graph-node prompt
messages so the summarizer receives the actual chunk output: change the
"prompts" array entry that currently has "content": "Text to Summarize:\n[Insert
text here]" to reference the TokenChunker output (e.g. use
{TokenChunker:FancyCitiesStick@chunks} or the appropriate variable name) and
ensure the "sys_prompt" and node use the same message-array schema as
"components" (i.e., an array of message objects with "role" and "content") so
the generated "summary" is produced from the real chunk data rather than the
placeholder.
- Around line 211-236: The template entry "TokenChunker:FancyCitiesStick" was
incorrectly converted to a token-size splitter; revert it to the
title/heading-aware chunker (e.g., "TitleChunker" or the original heading-aware
component) so the "Title Chunker" template returns heading-based sections rather
than fixed-size token chunks; replace the "obj.component_name" from
"TokenChunker" back to the heading-aware component, restore heading-specific
params (heading levels/markers, delimiter_mode appropriate for headings,
image_context_size/table_context_size as before) and keep its upstream
"Parser:HipSignsRhyme" and downstream "Extractor:PublicPlumsKiss" links; apply
the same change to the other occurrence referenced (lines ~424-458) to ensure
both title-chunk templates use the heading-aware chunker.
- Around line 242-249: The indexer config currently keeps "fields": "text" so
the extractor's generated summary is never indexed; update the template so the
extractor output (e.g. "summary" or the actual output key produced by the
extractor) is included in "fields" (replace or extend "text" to
["text","summary"]) and add an "outputs" entry mapping that summary key (so it's
not {}) and ensure the same change is applied to the other occurrences noted
(around the other blocks at 503-510 and 531-533); keep "search_method" and
"filename_embd_weight" as appropriate but make sure the summary field is part of
the indexed fields list.
---
Duplicate comments:
In `@agent/templates/advanced_ingestion_pipeline.json`:
- Around line 169-282: graph.nodes serialization is still emitting the legacy
schema (an array-style setups and string prompts) which causes loss of parser
details; update the canvas node form serialization to match the new components
schema by writing setups as an object keyed by parser name (preserving fields
like suffix and vlm) and serialize prompts as an array of message objects
instead of a single string; locate the code that builds/serializes graph.nodes
and replace the legacy array/string mapping with the object-shaped setups and
message-array prompts so reopening/saving preserves suffix/vlm and the new
prompt shape (references: graph.nodes, setups, prompts, components).
- Around line 24-44: The "Auto Questions" stage is still configured as a
summarizer: change the stage configuration that currently targets field_name
"summary" and uses the summarization sys_prompt and prompt (e.g., the prompt
with "Text to Summarize:\n{Extractor:SunnyCooksSpend@chunks}" and the sys_prompt
starting "Act as a precise summarizer...") so it instead writes to an
appropriate questions field (e.g., "questions" or "auto_questions"), update
outputs to produce a questions array (not "chunks"), replace the prompt content
to request generation of Q&A (e.g., "Generate concise question and answer pairs
from the following content:{Extractor:SunnyCooksSpend@chunks}") and replace the
sys_prompt with instructions to produce objective Q&A pairs; apply the same
changes to the other similar blocks referenced (lines ~653-668 and 675-676) so
Auto Questions actually generates Q&A rather than overwriting the summary.
In `@agent/templates/chunk_summary.json`:
- Around line 91-204: The template mixes the new component schema with the
legacy canvas schema: update the node forms under "components" to use the
object-keyed "setups" structure instead of the old "fileFormat" array and ensure
any "prompts" fields remain the message-array form (not plain strings) so saves
round-trip correctly; specifically replace legacy "fileFormat" usages with
references into "setups" and convert any "prompts" occurrences to the
message-array shape used elsewhere (check the "setups", "components",
"fileFormat", and "prompts" entries and mirror the structure present in the
updated component schema).
In `@agent/templates/title_chunker.json`:
- Around line 91-204: The parser setup schema is inconsistent:
dsl.components.Parser.params.setups uses the new format-keyed object (with
fields like suffix and vlm) while graph.nodes[*].data.form.setups still uses the
legacy fileFormat array, causing loss of fields on save/load; update the graph
node form serialization/deserialization so graph.nodes[*].data.form.setups uses
the same format-keyed object shape as dsl.components.Parser.params.setups
(preserve suffix, vlm, parse_method, output_format, preprocess, system_prompt,
etc.), migrate any legacy array reading code to convert fileFormat arrays into
the new keyed object on load, and ensure writers produce the new keyed object on
save so edits round-trip without dropping options.
🪄 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: 84d3897e-afa5-45ae-b20b-4f60c062fa9a
📒 Files selected for processing (3)
agent/templates/advanced_ingestion_pipeline.jsonagent/templates/chunk_summary.jsonagent/templates/title_chunker.json
| "params": { | ||
| "fields": "text", | ||
| "filename_embd_weight": 0.1, | ||
| "outputs": {}, | ||
| "search_method": [ | ||
| "embedding", | ||
| "full_text" | ||
| ] |
There was a problem hiding this comment.
Most generated fields never reach retrieval.
The only downstream tokenizer still indexes text, so summary, keywords, and the would-be questions output do not affect the built indexes at all. That makes most of this pipeline dead work relative to the template description.
Also applies to: 695-702
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@agent/templates/advanced_ingestion_pipeline.json` around lines 319 - 326, The
pipeline is only indexing "text" so generated outputs like "summary", "keywords"
and "questions" are never used; update the params in the ingestion template (the
"params" object that currently sets "fields": "text" and "outputs": {}) to
include all downstream fields produced by the pipeline (e.g., add "summary",
"keywords", "questions" to the "fields" array or otherwise map them into the
tokenizer/indexer) and ensure the "outputs" mapping reflects these names so the
indexing/tokenizer step (the component that consumes "params.fields") will
include them; apply the same change to the other occurrence of this params block
later in the file.
| "fields": "text", | ||
| "filename_embd_weight": 0.1, | ||
| "outputs": {}, | ||
| "search_method": [ | ||
| "embedding", | ||
| "full_text" | ||
| ] | ||
| }, | ||
| "label": "Tokenizer", | ||
| "name": "Indexer" | ||
| } |
There was a problem hiding this comment.
The summary never becomes the indexed field.
Both tokenizer configs keep fields: "text" even though this template and the note say the summary should back the text/vector indexes. As written, the extractor adds summary and the tokenizer immediately ignores it.
Also applies to: 506-512, 533-533
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@agent/templates/chunk_summary.json` around lines 242 - 249, The tokenizer
configs currently use "fields": "text" so the tokenizer ignores the extractor's
"summary"; update each tokenizer config that should back the text/vector indexes
to use "fields": "summary" instead of "fields": "text" (preserving other keys
like "filename_embd_weight", "search_method", and "outputs"), and verify the
extractor continues to emit the "summary" field so it becomes the indexed field;
apply this change to all occurrences where the tokenizer is intended to index
the summary (including the other two similar blocks noted).
| "prompts": [ | ||
| { | ||
| "content": "Text to Summarize:\n[Insert text here]", | ||
| "role": "user" | ||
| } | ||
| ], | ||
| [ | ||
| "^####[^#]" | ||
| ] | ||
| ], | ||
| "outputs": { | ||
| "chunks": { | ||
| "type": "Array<Object>", | ||
| "value": [] | ||
| } | ||
| "sys_prompt": "Act as a precise summarizer. Your task is to create a summary of the provided content that is both concise and faithful to the original.\n\nKey Instructions:\n1. Accuracy: Strictly base the summary on the information given. Do not introduce any new facts, conclusions, or interpretations that are not explicitly stated.\n2. Language: Write the summary in the same language as the source text.\n3. Objectivity: Present the key points without bias, preserving the original intent and tone of the content. Do not editorialize.\n4. Conciseness: Focus on the most important ideas, omitting minor details and fluff.", |
There was a problem hiding this comment.
Wire the summarizer to the actual chunk output.
Both prompt definitions still use the literal placeholder [Insert text here], so this extractor never receives {TokenChunker:FancyCitiesStick@chunks} and the generated summary field is detached from the document content. The graph-node prompt should also use the same message-array schema as components.
🐛 Suggested fix
"prompts": [
{
- "content": "Text to Summarize:\n[Insert text here]",
+ "content": "Text to Summarize:\n{TokenChunker:FancyCitiesStick@chunks}",
"role": "user"
}
],- "prompts": "Text to Summarize:\n[Insert text here]",
+ "prompts": [
+ {
+ "content": "Text to Summarize:\n{TokenChunker:FancyCitiesStick@chunks}",
+ "role": "user"
+ }
+ ],Also applies to: 476-477
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@agent/templates/title_chunker.json` around lines 38 - 44, Replace the literal
placeholder in the graph-node prompt messages so the summarizer receives the
actual chunk output: change the "prompts" array entry that currently has
"content": "Text to Summarize:\n[Insert text here]" to reference the
TokenChunker output (e.g. use {TokenChunker:FancyCitiesStick@chunks} or the
appropriate variable name) and ensure the "sys_prompt" and node use the same
message-array schema as "components" (i.e., an array of message objects with
"role" and "content") so the generated "summary" is produced from the real chunk
data rather than the placeholder.
| "TokenChunker:FancyCitiesStick": { | ||
| "downstream": [ | ||
| "Extractor:PublicPlumsKiss" | ||
| ], | ||
| "obj": { | ||
| "component_name": "TokenChunker", | ||
| "params": { | ||
| "children_delimiters": [], | ||
| "chunk_token_size": 512, | ||
| "delimiter_mode": "token_size", | ||
| "delimiters": [], | ||
| "image_context_size": 0, | ||
| "outputs": { | ||
| "chunks": { | ||
| "type": "Array<Object>", | ||
| "value": [] | ||
| } | ||
| }, | ||
| "overlapped_percent": 0, | ||
| "table_context_size": 0 | ||
| } | ||
| }, | ||
| "selected": false, | ||
| "sourcePosition": "right", | ||
| "targetPosition": "left", | ||
| "type": "parserNode" | ||
| "upstream": [ | ||
| "Parser:HipSignsRhyme" | ||
| ] | ||
| }, |
There was a problem hiding this comment.
This stopped being a title-based chunking template.
The refactor replaced the heading-aware chunker with a plain TokenChunker in token_size mode, so users selecting “Title Chunker” will now get fixed-size token splits instead of title/heading-based sections.
Also applies to: 424-458
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@agent/templates/title_chunker.json` around lines 211 - 236, The template
entry "TokenChunker:FancyCitiesStick" was incorrectly converted to a token-size
splitter; revert it to the title/heading-aware chunker (e.g., "TitleChunker" or
the original heading-aware component) so the "Title Chunker" template returns
heading-based sections rather than fixed-size token chunks; replace the
"obj.component_name" from "TokenChunker" back to the heading-aware component,
restore heading-specific params (heading levels/markers, delimiter_mode
appropriate for headings, image_context_size/table_context_size as before) and
keep its upstream "Parser:HipSignsRhyme" and downstream
"Extractor:PublicPlumsKiss" links; apply the same change to the other occurrence
referenced (lines ~424-458) to ensure both title-chunk templates use the
heading-aware chunker.
| "fields": "text", | ||
| "filename_embd_weight": 0.1, | ||
| "outputs": {}, | ||
| "search_method": [ | ||
| "embedding", | ||
| "full_text" | ||
| ] | ||
| }, | ||
| "label": "Tokenizer", | ||
| "name": "Indexer" | ||
| } |
There was a problem hiding this comment.
The indexer still ignores the generated summary.
Both tokenizer configs keep fields set to text, while the template note says the summary should build the indexes. As written, the new extractor output is dead data and retrieval still runs on raw chunk text only.
Also applies to: 503-510, 531-533
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@agent/templates/title_chunker.json` around lines 242 - 249, The indexer
config currently keeps "fields": "text" so the extractor's generated summary is
never indexed; update the template so the extractor output (e.g. "summary" or
the actual output key produced by the extractor) is included in "fields"
(replace or extend "text" to ["text","summary"]) and add an "outputs" entry
mapping that summary key (so it's not {}) and ensure the same change is applied
to the other occurrences noted (around the other blocks at 503-510 and 531-533);
keep "search_method" and "filename_embd_weight" as appropriate but make sure the
summary field is part of the indexed fields list.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14036 +/- ##
=======================================
Coverage 96.66% 96.66%
=======================================
Files 10 10
Lines 690 690
Branches 108 108
=======================================
Hits 667 667
Misses 8 8
Partials 15 15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
### What problem does this PR solve? Refact: update pipeline template ### Type of change - [x] Refactoring
Refact: update pipeline template - [x] Refactoring
Refact: update pipeline template - [x] Refactoring
### What problem does this PR solve? Refact: update pipeline template ### Type of change - [x] Refactoring
What problem does this PR solve?
Refact: update pipeline template
Type of change