Skip to content

feat: Integrate RagDB#8

Open
brandonzhou2002 wants to merge 1 commit into
castorini:mainfrom
brandonzhou2002:ragdb-integration
Open

feat: Integrate RagDB#8
brandonzhou2002 wants to merge 1 commit into
castorini:mainfrom
brandonzhou2002:ragdb-integration

Conversation

@brandonzhou2002

@brandonzhou2002 brandonzhou2002 commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

This PR adds a RagDB-backed sparse retrieval path to QuackIR by introducing RagDBIndexer and RagDBSearcher adapters.

Notes:

  1. fts_index is a deliberate no‑op and warns to clarify behaviour.
  2. Dense embeddings and RRF fusion are explicitly not supported for RagDB and raise clear errors. In the future, we may add the ability to load external embeddings directly, which would enable optional fusion techniques without compromising RagDB’s simplicity.

@brandonzhou2002

brandonzhou2002 commented Dec 9, 2025

Copy link
Copy Markdown
Contributor Author

Because ragdb is a pretty lightweight repo, I was able to read through the code fairly quickly. It doesn’t really try to push the boundaries of information retrieval but focuses on being simple, easy to use, and keeping everything in a single document store. That makes it convenient, but you can see the tradeoff in retrieval quality: the NDCG@10 score is 0.2448 on NFCorpus, which is kinda low comparatively. There’s definitely room to make the retrieval side more accurate in terms of performance, if that's the focus.
image

@brandonzhou2002

Copy link
Copy Markdown
Contributor Author

Hey @lilyjge, please take a look at this PR when you get a chance. It is independent of PR #6 and PR #7. Thanks!

cc: @lintool

@lilyjge

lilyjge commented Dec 24, 2025

Copy link
Copy Markdown
Member

hey @brandonzhou2002 what is ragdb? what's its use case? could you send a link? I can't seem to find much about it online. what retrieval algorithm did they use to get that score you provided?

@lintool

lintool commented Jan 3, 2026

Copy link
Copy Markdown
Member

not sure if it makes sense to integrate RagDB at this point... but I'm willing to be convinced!

@brandonzhou2002

Copy link
Copy Markdown
Contributor Author

hey @brandonzhou2002 what is ragdb? what's its use case? could you send a link? I can't seem to find much about it online. what retrieval algorithm did they use to get that score you provided?

More information can be found here: https://github.com/abkmystery/ragdb. The final score is a combination of the TF-IDF vector similarity and substring matching. But tbh I don't think it is really a new algorithm for searching but a lightweight system to process documents.

@brandonzhou2002

Copy link
Copy Markdown
Contributor Author

not sure if it makes sense to integrate RagDB at this point... but I'm willing to be convinced!

I actually agreed as when I developed and went through their repo, I didn't find much new or exciting about the search algorithm but probably an easy or lightweight way to store data and process the documents. So I think we can hold on this for now!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants