Context Retrieval and Context Minimization program for Rust code
This tool automates context retrieval and minimization for Rust code when working with LLMs. Programmers specify exactly what to fetch into the context window for a one-question/one-answer exchange: sig(function) fetches only the signature, @function captures the whole body, and sig(Struct) or sig(Trait) fetches the fields and signatures of all methods. It currently calls ast-grep under the hood, with plans to move to tree-sitter queries, and deliberately avoids giving the AI a whole view of the codebase, only the necessary points specified by the programmer.
What it addresses
Manually opening files and copying function/method signatures from all over the place is tedious, and giving the AI more information than needed confuses it, degrades accuracy, and makes calls slower and more expensive.
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
Context Retrieval and Context Minimization program for Rust code
This tool automates context retrieval and minimization for Rust code when working with LLMs. Programmers specify exactly what to fetch into the context window for a one-question/one-answer exchange: sig(function) fetches only the signature, @function captures the whole body, and sig(Struct) or sig(Trait) fetches the fields and signatures of all methods. It currently calls ast-grep under the hood, with plans to move to tree-sitter queries, and deliberately avoids giving the AI a whole view of the codebase, only the necessary points specified by the programmer.
Problem: Manually opening files and copying function/method signatures from all over the place is tedious, and giving the AI more information than needed confuses it, degrades accuracy, and makes calls slower and more expensive.
Audience: This targets programmers who use LLMs in their coding workflow; context is specified by the programmer.
Posted by @emporas · Original source ↗
Source text · @emporas · · Source ↗
I am writing a Context Retrieval and Context Minimization program for Rust code. I am trying to automate my own workflow in how I use LLMs.