Skip to content

Conversation

Davidyz
Copy link
Owner

@Davidyz Davidyz commented Sep 1, 2025

Part of #221.

This will most likely be incompatible with the existing configuration, in the sense that we'd need to follow similar patterns for embedding functions and rerankers. As a temporary solution, we could maybe add a function that transforms the old config to the new one internally.

I'm not committed to this implementation, but I need some hands-on experience to know what we'd need from the abstraction layer. If this works out, we could just go with this.
Having spent some time looking into langchain implementations, I thought their approach is a bit bloated for our simple RAG tool that specialises in local files that are organised in directories (and makes extensive use of metadata). As such, I decided to follow this PR and implement my own database connector (mostly based on chromadb API design), which we can then use to implement supports for new databases.

@Davidyz Davidyz linked an issue Sep 1, 2025 that may be closed by this pull request
@Davidyz Davidyz force-pushed the feat/db_layer branch 4 times, most recently from 54787ef to c3b83f8 Compare September 6, 2025 04:34
@Davidyz Davidyz force-pushed the feat/db_layer branch 4 times, most recently from 6f91093 to 7a432fc Compare September 16, 2025 09:43
@Davidyz Davidyz marked this pull request as ready for review September 16, 2025 10:05
@Davidyz Davidyz force-pushed the feat/db_layer branch 6 times, most recently from edd3382 to 21b820b Compare September 19, 2025 09:24
Copy link

codecov bot commented Sep 19, 2025

Codecov Report

❌ Patch coverage is 99.80139% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.76%. Comparing base (a8b5e0a) to head (c59136b).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/vectorcode/database/chroma.py 99.09% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #282      +/-   ##
==========================================
+ Coverage   99.72%   99.76%   +0.03%     
==========================================
  Files          25       32       +7     
  Lines        1838     2091     +253     
==========================================
+ Hits         1833     2086     +253     
  Misses          5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Davidyz
Copy link
Owner Author

Davidyz commented Sep 27, 2025

For the sake of easily configuring database settings for all projects, I'm planning to modify the config file resolution so that project configs will be merged with the global config. This means you can only configure the db/embedding/reranker only once in the global config.

@Davidyz
Copy link
Owner Author

Davidyz commented Oct 5, 2025

As a proof-of-concept, I'll try to get chromadb 1.x working as part of this PR. This is likely going to introduce packaging change. Specifically, the default chromadb version constraint will be <2.0.0, with an optional dep group that pin to ==0.6.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: Enable the use of multiple DB types

1 participant