mirror of
https://github.com/VectifyAI/PageIndex.git
synced 2026-07-24 21:41:04 +02:00
fix: gate doc_description on node summaries in the SDK pipeline, matching legacy
Both legacy entry points nest if_add_doc_description inside the
if_add_node_summary branch: create_clean_structure_for_description keeps only
titles and summaries, so without summaries the description LLM call runs on a
bare title listing. The SDK pipeline (c7fe93b) hoisted the check to top level
with no stated rationale, so summary=False + description=True paid for an
extra LLM call and produced a low-quality description the legacy path
deliberately refuses to generate.
This commit is contained in:
parent
fdd075b92d
commit
93535fca7e
1 changed files with 4 additions and 1 deletions
|
|
@ -111,7 +111,10 @@ def build_index(parsed: ParsedDocument, model: str = None, opt=None) -> dict:
|
|||
"structure": structure,
|
||||
}
|
||||
|
||||
if opt.if_add_doc_description:
|
||||
# Description requires summaries (legacy gating): the clean structure
|
||||
# fed to the LLM carries only titles/summaries, so without summaries
|
||||
# the description would be generated from bare titles.
|
||||
if opt.if_add_node_summary and opt.if_add_doc_description:
|
||||
clean_structure = create_clean_structure_for_description(structure)
|
||||
result["doc_description"] = generate_doc_description(
|
||||
clean_structure, model=opt.model
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue