Feature/new context retrieval strategy#92
Merged
Conversation
…ge and correcting typos
…ove query handling
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.
This pull request introduces significant changes to the
prometheuscodebase, focusing on improving the context retrieval workflow, enhancing exception handling, and refining utility functions. The most notable updates include replacing the context selection process with a new context extraction mechanism, introducing a base exception class for file operations, and updating graph traversal functions to return richer data structures.Context Retrieval Workflow Enhancements:
ContextSelectionNodewith a newly implementedContextExtractionNode, which extracts concise and relevant code snippets based on structured output models. This includes adding theContextExtractionNodeclass and its supporting logic inprometheus/lang_graph/nodes/context_extraction_node.py.ContextRetrievalSubgraphto integrate theContextExtractionNodein place of theContextSelectionNode, modifying the workflow and its edge connections accordingly [1] [2] [3] [4] [5].Exception Handling Improvements:
FileOperationExceptionbase class inprometheus/exceptions/file_operation_exceptions.pyto standardize exception handling for file-related operations.Utility and Graph Traversal Updates:
prometheus/tools/graph_traversal.pyto return tuples containing a string and a sequence of mappings, enabling richer data handling for file and AST node queries [1] [2] [3] [4] [5] [6].pre_append_line_numbersinprometheus/tools/graph_traversal.pyfor line number processing.Prompt and Documentation Refinements:
ContextProviderNodeto clarify its role in understanding project logic and fixed minor typos in the prompt text [1] [2] [3].ContextRefineNodeto escape curly braces and improve clarity.Codebase Simplification:
ContextSelectionNodeand its associated logic fromprometheus/lang_graph/nodes/context_selection_node.py, simplifying the codebase.These changes collectively enhance the robustness, clarity, and functionality of the context retrieval system while improving maintainability and error handling.