Improve node summary prompt and add timestamped output filenames#124
Open
kasatgauravrisa wants to merge 1 commit intoVectifyAI:mainfrom
Open
Improve node summary prompt and add timestamped output filenames#124kasatgauravrisa wants to merge 1 commit intoVectifyAI:mainfrom
kasatgauravrisa wants to merge 1 commit intoVectifyAI:mainfrom
Conversation
…mped output files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
generate_node_summaryto include the section title and instruct the LLM to focus only on that specific section's content, rather than treating the entire page text generically. This produces more accurate, scoped summaries.YYYYMMDD_HHMMSS) to the output JSON filename inrun_pageindex.py, so multiple runs on the same PDF don't overwrite previous results.Motivation
The original summary prompt passed the full page text without any section context, leading to summaries that could drift to cover content from other sections on the same page. By anchoring the prompt to the node's title, the LLM generates more relevant descriptions.
Timestamped filenames are a simple quality-of-life improvement for users who iterate on the same document.
Files Changed
pageindex/utils.py— Updated prompt ingenerate_node_summary()run_pageindex.py— Added datetime-based suffix to output filenameMade with Cursor