Type annotations specify the type of a value in Python, like integer or list. They help catch bugs and make code easier to maintain. Most Python projects lack them because manual annotation is slow and error-prone.
Researchers created SALT, a system that uses static analysis, checking code without running it, to guide a (LLM). SALT first resolves types with static analysis alone. For remaining functions, it prioritizes high-value LLM queries and provides concise, relevant context.
On 12 real-world projects, SALT improved annotation accuracy by 3.5% over the best existing method while reducing estimated LLM cost by up to 78.5%. This makes type annotation cheaper and more accurate, aiding large Python codebases.
