Skip to content

A code repository indexing tool to supercharge your LLM completion experience.

License

Notifications You must be signed in to change notification settings

Davidyz/VectorCode

Repository files navigation

VectorCode

VectorCode is a code repository indexing tool. It helps you write better prompt for your coding LLMs by indexing and providing information about the code repository you're working on. This repository also contains the corresponding neovim plugin because that's what I used to write this tool.

Note

This project is in beta quality and only implements very basic retrieval and embedding functionalities. There are plenty of rooms for improvements and any help is welcomed.

Note

Chromadb, the vector database backend behind this project, supports multiple embedding engines. I developed this tool using SentenceTransformer, but if you encounter any issues with a different embedding function, please open an issue (or even better, a pull request :D).

Why VectorCode?

LLMs usually have very limited understanding about close-source and/or infamous projects, as well as cutting edge developments that have not made it into the releases. Their capabilities on these projects are quite limited. Take my little toy sudoku-solving project as an example: When I wrote the first few lines and want the LLM to fill in the list of solvers that I implemented in solver_candidates, without project context, the completions are simply random guesses that might be part of another sudoku project: But with RAG context provided by VectorCode, my completion LLM was able to provide completions that I actually implemented: This makes the completion results far more usable. A similar strategy is implemented in continue, a popular AI completion and chat plugin available on VSCode and JetBrain products.

Documentation

TODOs

  • query by file path excluded paths;
  • chunking support;
    • add metadata for files;
    • chunk-size configuration;
    • smarter chunking (semantics/syntax based);
    • configurable document selection from query results.
  • NeoVim Lua API with cache to skip the retrieval when a project has not been indexed Returns empty array instead;
  • job pool for async caching;
  • persistent-client;
  • proper remote Chromadb support (with authentication, etc.);
  • respect .gitignore;
  • implement some sort of project-root anchors (such as .git or a custom .vectorcode.json) that enhances automatic project-root detection. Implemented project-level .vectorcode/ and .git as root anchor

Credit

About

A code repository indexing tool to supercharge your LLM completion experience.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published