AnswerDotAI / AnswerDotAI/RAGatouille
TypeError: slice indices must be integers or None or have an __index__ method
- Dominant language
- Python
- Stars
- 4k
- Forks
- 276
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I've been making attempts to use RAGatouille for document retrievals. I'm currently testing it on a junk of 30k emails. After indexing a few of the documents I would want to use the ```add_to_index``` function to add new documents to the index. I'm adding 1000 new documents in a loop using ```add_to_index``` but it fails to do so after 21 iterations or after indexing 20000 documents and throws:
```
TypeError: slice indices must be integers or None or have an __index__ method
```
I've written all this code in this saved Kaggle [notebook](https://www.kaggle.com/code/kianindeed/ragatouille-testing/notebook). I would request you to check it out.
I've tested this multiple times for different numbers and lengths of chunks and seems to give the same ```TypeError``` after indexing a particular amount of document chunks.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the linked Kaggle notebook and reproducing the failure in the loop calling add_to_index after roughly 20,000 document chunks. Trace the TypeError from that call and verify that indexing the 30,000-email workload and adding later batches completes without the slice-index error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100