Repository: explodinggradients/ragas
Issue: Problem generating dataset
Root cause: Validation Gap

[ .] I have checked the [documentation](https://docs.ragas.io/) and related resources and couldn't resolve my bug.

**Describe the bug**
following [this guide](https://docs.ragas.io/en/stable/howtos/applications/compare_llms.html#id1) runs into an error instead of running successfully because of [this](https://github.com/explodinggradients/ragas/blob/f22e903ed303874c35576ee93bb5f1542743ac8f/src/ragas/testset/evolutions.py#L210)

```
        else:
            selected_nodes = [
                current_nodes.nodes[i - 1]
                for i in relevant_context_indices
                if i - 1 < len(current_nodes.nodes)
            ]
            relevant_context = (
                CurrentNodes(root_node=selected_nodes[0], nodes=selected_nodes)
                if selected_nodes
                else current_nodes
            )
```
Specifically here I get an error that says `i - 1` is not a valid operation between `str` and `int`

Here's the full stacktrace

```
Generating:   7%|███████▎                                                                                                | 7/100 [01:06<14:39,  9.45s/it]
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.10/dist-packages/ragas/executor.py", line 96, in run
    results = self.loop.run_until_complete(self._aresults())
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.10/dist-packages/ragas/executor.py", line 84, in _aresults
    raise e
  File "/usr/local/lib/python3.10/dist-packages/ragas/executor.py", line 79, in _aresults
    r = await future
  File "/usr/lib/python3.10/asyncio/tasks.py", line 571, in _wait_for_one
    return f.result()  # May raise f.exception().
  File "/usr/local/lib/python3.10/dist-packages/ragas/executor.py", line 38, in sema_coro
    return await coro
  File "/usr/local/lib/python3.10/dist-packages/ragas/executor.py", line 112, in wrapped_callable_async
    return counter, await callable(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/ragas/testset/evolutions.py", line 144, in evolve
    return await self.generate_datarow(
  File "/usr/local/lib/python3.10/dist-packages/ragas/testset/evolutions.py", line 210, in generate_datarow
    selected_nodes = [
  File "/usr/local/lib/python3.10/dist-packages/ragas/testset/evolutions.py", line 211, in <listcomp>
    current_nodes.nodes[i - 1] for i in relevant_context_indices if i - 1 < len(current_nodes.nodes)
TypeError: unsupported operand type(s) for -: 'str' and 'int'
```
It's also weird that it happens randomly during generation, for example sometimes after pbar says 10% and sometimes 30%.


Ragas version: 0.1.5
Python version:3.11

**Code to Reproduce**

```
import os
from llama_index import download_loader, SimpleDirectoryReader
from ragas.testset import TestsetGenerator
from ragas.testset.generator import TestsetGenerator
from ragas.testset.evolutions import simple, reasoning, multi_context
from langchain_openai import ChatOpenAI, OpenAIEmbeddings

os.environ['OPENAI_API_KEY'] = 'Your OPEN AI key'

# load documents
reader = SimpleDirectoryReader("./arxiv-papers/",num_files_limit=30)
documents = reader.load_data()

# generator with openai models
generator_llm = ChatOpenAI(model="gpt-3.5-turbo-16k")
critic_llm = ChatOpenAI(model="gpt-4")
embeddings = OpenAIEmbeddings()

generator = TestsetGenerator.from_langchain(
    generator_llm,
    critic_llm,
    embeddings
)

distributions = {
    simple: 0.5,
    multi_context: 0.4,
    reasoning: 0.1
}

# generate testset
testset = generator.generate_with_llama_index_docs(documents, 100,distributions)
testset.to_pandas()
```


<!-- PS: bugs suck but is also part of the process. We sincerely apologies for breaking your flow because of it, but don't worry, we got your back ❤️. We will get this fixed as fast as we can and thanks for helping us out by reporting it 🙏. -->


Hey @ShivanshuPurohit can you install from source? I have fixed this but haven't made a release yet

@shahules786  thanks for all your great work.  I am still not able to get pass below phase
 `Filename and doc_id are the same for all nodes.                                                                                                          
Generating:   0%|                                                                                                                  | 0/1 [00:00<?, ?it/s][ragas.testset.filters.DEBUG] node filter: {'score': 7.5}`
I did two things -
1. Built from the source for the latest version
2. Changed with Threshold to 7.0 
Looking forward for the fix. 
Thanks !

I am stuck here as well. 
```
Filename and doc_id are the same for all nodes.
Generating:   0%|                                                                                                          | 0/10 [00:00<?, ?it/s]
```

Any updates ? Thanks..