Originally published on AI Tech Connect.
What you need to know Code breaks differently from prose. A chunk boundary mid-function produces a fragment that is syntactically invalid, semantically orphaned and useless to retrieve. Chunk on the syntax tree. Parse with tree-sitter and cut on function, class and method boundaries. The cAST paper from Carnegie Mellon and Augment Code puts numbers on the gain. Metadata is half the retrieval signal. Prepend file path, symbol name, docstring, imports and callers to every chunk before embedding. Go hybrid, always. Developer queries are full of exact identifiers — process_partial, ERR_CONN_RESET — that BM25 nails and embeddings smear. Fuse both. Multi-hop questions need the symbol graph. "What breaks if I change this?" is a call-graph question, not a similarity question. Refresh on commit,…
Top comments (0)