-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
Symbol embeddings currently use only the symbol's own name and source text. For nested symbols like methods within classes, this loses valuable hierarchical context.
Example: A process() method inside PaymentHandler class is embedded without any reference to its parent class. When a user searches for "payment processing" or "PaymentHandler", this method may not rank well because the parent class context isn't captured in the embedding.
Proposed Solution
Include parent symbol context in embeddings for nested symbols so that:
- Methods are associated with their containing class
- Nested classes include outer class context
- Searches for class names can find methods within them
Benefits
- Better semantic matching for class methods
- Aligns with how developers think about code (qualified names)
- Improves "find methods of X class" queries
Considerations
- Slightly longer embedding inputs
- Marginal indexing latency increase
- Would require re-indexing existing codebases
Acceptance Criteria
- Nested symbols include parent context in their embeddings
- Top-level symbols remain unchanged
- Existing tests pass
- Improved recall for method/class association searches
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels