KVBench - Add support for different random distributions (random, uniform, zipfian) when selecting chunks for RAG usecase
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 203
- Forks
- 67
- Avg merge
- 20m
- Merged PRs (30d)
- 8
Description
When selecting chunks for RAG, the current implementation does a np.random.choice to get retrieved_indices in RAGDocumentManager.retrieve_chunks().
There should be an option to define a different random distribution to change the hit rate histogram of chunks
Priority:
Zipfian or Power
Others:
uniform
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at RAGDocumentManager.retrieve_chunks(), where retrieved_indices are selected with np.random.choice, and trace how chunk-selection settings are passed into the RAG use case. Define how random, uniform, and Zipfian or Power distributions should be selected, then verify that the resulting hit-rate histogram changes as expected while uniform selection remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100