Improve summarize function with enhanced processing#3
Open
Improve summarize function with enhanced processing#3
Conversation
Improved the /summarize endpoint to generate more structured, comprehensive, and high-quality document summaries. Key Enhancements: 1. Increased retrieval depth: - Expanded similarity search from k=6 to k=12 to improve document coverage. - Ensures more relevant context is available before summarization. 2. Implemented hybrid summarization pipeline: - Stage 1 (Extractive): Extract top 10 key factual points from retrieved chunks. - Stage 2 (Abstractive): Generate a structured summary using extracted key points. 3. Added summary length control: - Supports short, medium (default), and long summary modes. - Dynamically adjusts generation token limits and bullet count instructions. 4. Enforced structured output format: - Executive Summary - Key Findings - Conclusion 5. Added basic completeness validation: - Ensures summary is not overly short. - Appends fallback note if document has limited summarizable content. This update significantly improves summary clarity, structure, and flexibility while remaining fully backward compatible. No changes were made to session handling, /ask endpoint, /compare endpoint, or frontend logic.
Owner
Author
|
Hi Maintainers 👋 While working on the
These may lead to unexpected behavior or errors during execution. If this cleanup/refactor is still pending, I’d be happy to take it up and submit a structured fix to improve maintainability and stability. Please let me know if I can work on this 🙌 — Team 161 |
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.
Team Number : Team 161
Description
This PR significantly improves the
/summarizeendpoint to generate more comprehensive, structured, and higher-quality summaries.Previously, summarization:
This update introduces a multi-stage hybrid summarization pipeline to improve coverage, structure, and flexibility.
Related Issue
Closes #9
Type of Change
Changes Made
k=6→k=12Screenshots (if applicable)
Testing
Checklist
Additional Notes
This update enhances summary quality without modifying:
The improvement is fully backward compatible and does not introduce breaking API changes.