eca icon indicating copy to clipboard operation
eca copied to clipboard

Support pass repo-map to LLM context

Open ericdallo opened this issue 1 year ago • 3 comments

This should be one of the most important features of ECA, passing context is crucial for LLM good assertive response.

Currently the context passed to LLM is naive and can be divided into:

  • Rules: defined by system and user which turn into markdown text passed to LLM
  • Contexts: files passed as text to LLM.

The problem with current solution is that is pretty easy to pass the LLM context window limit passing long texts, I have low experience and context about how to improve but this is what I know:

  • Repo-map: aider and other tools use this concept, creating a repo map of your codebase/text so you send only the specific parts of the code, not the entire code, letting the LLM ask about particular parts/files if needed (How that works?)
  • Embedding vectors: Cursor and other tools use this approach to generate vectors of the chunks of your code, which is way better, passing to the LLM only the important parts, more complex.

Any help on how to achieve any of those is very welcome.

ericdallo avatar Jun 20 '25 14:06 ericdallo

https://platform.openai.com/docs/guides/embeddings

ericdallo avatar Jun 28 '25 14:06 ericdallo

Ok, I think a easy way to solve this doing the same Continue and aider does is pass a repo-map of the paths of the projects only, eca now should be able to read the files for more context if needed and that should improve a lot LLM visibility about the project.

ericdallo avatar Jul 17 '25 13:07 ericdallo

This was implemented on 0.8.0, repoMap is a context that can be passed and currently only list the git files in a tree view to the LLM, it's quite enough for the LLM know project files and read or grep for what it wants, in the future we can improve adding the functions/methods/classes of those files.

ericdallo avatar Jul 23 '25 21:07 ericdallo