Index Error when trying to evaluate() a simple example #1710
Labels
answered
🤖 The question has been answered. Will be closed automatically if no new comments
bug
Something isn't working
module-metrics
this is part of metrics module
question
Further information is requested
[ ] I checked the issues and you site, and couldn't find an answer to my question.
My understanding + question
As I understand, to use the evaluate(), you can send your LLM (you can also not send and it will take a default chatgpt 4o one). The important point is that you don't need to send an object that combines both the LLM and the retrieval object, because when you send the dataset to the evaluate() it is already after performing retrieval and generation beforehand, and you just want to evaluate (dah).
If my understanding is correct, I don't know why the following code fails with the next Error:
Token indices sequence length is longer than the specified maximum sequence length for this model (1921 > 1024). Running this sequence through the model will result in indexing errors
Exception raised in Job[0]: IndexError(index out of range in self)
As you will see in the code below, I have a very simple example of the data, with probably few dozens of tokens, so why it says it somehow exceeds the maximum input number of tokens for the model (which 1024). I don't understand how it gets to 1921.
Ragas version: 0.2.6
Python version: 3.10.8
Code
Additional context
I have closed my other issue (#1700), since there I used a RetrievalQA.from_chain_type(llm=llm, retriever=retriever) in the evaluate(), while as I understand it is not needed, and only the llm object is. Now I get a different error as mentioned above, I would really appreciate your help. I think I wrote the simplest example that should work.
The text was updated successfully, but these errors were encountered: