Aider-AI / aider

aider is AI pair programming in your terminal
https://aider.chat/
Apache License 2.0
20.73k stars 1.91k forks source link

Feature-Request : Agentic RAG for passing development docs, guidelines, markdown #908

Closed cryptekbits closed 1 month ago

cryptekbits commented 3 months ago

Issue

Currently, aider is able to automatically identify and add the files to the context, and it functions phenomenally ! Great job there.

Thanks for building aider ! I will forever be in debt :)

Version and model info

No response

xAlstrat commented 3 months ago

What's the real need here? You can already pass docs/markdown/guidelines/anything through files with the /add cmd.

  1. if the problem is daily rate limit, I suggest to change to another provider or to try a self-hosted model without any limitation
  2. I think the Agentic RAG can be on of the engines to: a. find files to edit, b. Find chunk of files to edit. But the ability to add docs/guidelines, already exist.
paul-gauthier commented 3 months ago

Thanks for trying aider and filing this issue.

What LLM are you using? Accessing models via openrouter is a good way to avoid the API rate limits that many providers enforce.

https://aider.chat/docs/llms/openrouter.html

cryptekbits commented 3 months ago

Hi @paul-gauthier , thanks for building aider !

I will appreciate if you have any solutions to the problem at hand ? I believe am using aider for a much bigger task than what it was intended for.

Going to have a logo on my site that says "Built with Aider" :)

cryptekbits commented 2 months ago

During an implementation ran into a problem for passing a "ReadtheDocs" page to aider, /web was a bit heavy. Came across this githubrepo for assistance : https://github.com/jerpint/RAGTheDocs . Not sure if we can borrow the intent and logic for such use cases.

fry69 commented 2 months ago

The same way Continue should learn about repository maps for its (currently non-existing) default context (see -> https://github.com/continuedev/continue/issues/1730), maybe Aider should learn from Continue how to include a documentation context provider?

The way Continue implements this is by using embeddings + SQLite full text search? See their short docs entry and their source for indexing -> https://github.com/continuedev/continue/tree/main/core/indexing

Also if SQLite/FTS gets used to store/retrieve the embeddings + tags/blurbs for documentation (or even more?), it may be possible to use the sqlite-lembed plugin to move the whole generating embeddings into SQLite (a common problem, Continue gets partially around this by using a transformers.js based embeddings model, but that does not work for their JetBrains extension and they require their customers to setup/run Ollama, which I'd rather not see as a requirement).

campers commented 2 months ago

@cryptekbits I'm a long time Aider user too, and have also been building my own AI platform with autonomous agents and code editing agents on top of Aider for a good few months now. I'm tidying up the few last things now before I start posting up the 'launch' of it shortly. The repo is at https://github.com/trafficguard/nous You could potentially use the autonomous agent, or build a workflow agent optimised for your case to look up the docs for a particular task and pass it to aider.

And I wanted to say thank you to @paul-gauthier as using Aider was a big part of the inspiration to build a layer above it, and has been a huge time saver, especially building the front end when its been a few since since doing any Angular.

OMGLASERSPEWPEWPEW commented 2 months ago

IDK if this is helpful but Microsoft recently released an opensource GraphRAG system that creates a knowledge graph of file collections and also generates embeddings for those files aiming to give the best of both worlds (knowledge graphs and vectorization)

Maybe some sort of auto git pull + re-indexing loop.

I'm a newish developer but wouldn't a good RAG system minimize the context one needs to provide the LLM on a per query system and cut costs while improving response quality?

Palkers76 commented 2 months ago

I like that idea, can't wait to see such feature in aider such solution will allow use aider to build code leveraging custom libraries not always stays in same repo as project

jawond commented 1 month ago

I'd like to see RAG as well. I've been working with langchain and langgraph and even including a file with example code in the context isn't helping aider produce reasonable or even workable code.

paul-gauthier commented 1 month ago

This looks like a duplicate of #1005, so I'm going to close it so discussion can happen there. Please let me know if you think it's actually a distinct issue.