3 ms·
How do you end up handling line numbers in patches? Counting has always been a sticking point for LLMs.
by carom 2y ago
How do you end up handling line numbers in patches? Counting has always been a sticking point for LLMs.
- jahooma 2y agoI wrote a custom `applyPatch` function that tries to use the line numbers, but falls back to searching for the context lines to line up the +/- patched lines. It actually got line number not too wrong, and so they might have been helpful. (I included the line numbers for the original file in context). Ultimately though, this approach was still error prone enough that we recently switched away.