Josix is Only Joking

Understanding Aider - An AI Programming Assistant

December 10, 2024

沒什麼組織、一些倏忽即逝有趣或不有趣的想法

Aider Introduction Core Concepts

Here is the core concepts, and the basic ideas behind Aider I will be discussing in this presentation.

Aider

Aider Core Concepts

  • What is Repo Map and how Aider leverages it? How Aider leverages Concrete Syntax Tree (CST)
  • How Aider build prompts in the custom way (diff mode, etc.)
  • How Aider is designed as-is to be used with LLM
    • Aider come up with the idea of Repo Map and CST to do the better retrieval of the code
    • Aider designed its prompt templates to be used with LLM in a good way

Experience with Aider

  • [[2024-11-15]]

  • [[2024-11-19]]

  • For designing LLM applications, we should focus on the following aspects:

    • How to design the prompt templates
    • How to design the retrieval of the codebase with better information quality
    • Choose the right LLM model

Do’s and Don’ts with Aider

  • https://aider.chat/docs/usage/tips.htmlhtml

  • Add the required-only files to the Aider workspace

  • Ask the right questions, get the right answers; give the right commands, get the right results

    • If you knows what/where resources is helpful for you, add them to the prompts.
  • Aider is doing well for code understanding, documentation, and code maintenance

  • Aider is lightweight (no dependencies to IDE, no language server required), flexible, and powerful, we should build the LLM applications based on Aider’s design principles

  • Don’t treat Aider as a search engine

    • Aider is not a search engine, it is more like a domain expert/QA system for your codebase. You should ask the right questions to get the right answers.
    • Don’t ask Aider for the things it doesn’t know
  • Don’t trust Aider blindly if you have no idea what you are asking

    • If you have no idea, ask Aider for help but don’t trust it blindly. You should verify the answers by yourself and go back to the point 1.

What Human Can Do

  • We are not typing machines anymore, we are thinking machines. We should focus on the high-level thinking and let the machine do the typing work.
    • Pay attention to the solution trade-off, making great decisions
    • Deliver the high-quality code, documentation, and design, helping the knowledge transfer effectively (if you use Aider correctly, it will help you to do this)
  • We should contribute our ideas/knowledge to the machine in structured format, and let the machine help us to retrieve the information we need

Josix Wang © 2024