Split on syntax boundaries (functions, classes, methods) using an AST or a language-aware splitter, instead of fixed character counts that cut through functions.
Include context in each chunk: file path, class and function names, imports and docstrings.
Consider code-specific embedding models, hybrid search (exact identifiers matter), and retrieval that can follow references such as callers and definitions.
Loading…