Code retrieval test claims far fewer wasted agent tokens

Many tools for chatting with a codebase split code into chunks, turn those chunks into vectors, and return the chunks that look most similar to the question. archex uses more than that single search method. It combines exact word and symbol matching with meaning-based search, then reranks the results locally.

It also follows , such as imports, so related code is included in the same bundle. The final output is meant to be a ready-to-use code bundle for an agent, not just a list of search hits. In 19 tasks on outside , archex was compared with cocoindex-code, an baseline.

The reported results were recall 0.95 versus 0.32, precision 0.51 versus 0.36, F1 0.66 versus 0.31, 0.76 versus 0.48, and -penalty tokens 922 versus 11,188.

Key points

  • The approach mixes exact code-name search with meaning-based search.
  • It expands results through so related code is included together.
  • The comparison used 19 tasks on external .
  • Reported recall, precision, F1, and were all higher than the baseline.
  • Reported -penalty tokens fell from 11,188 to 922.
Read original