diff --git a/src/intelligence_layer/use_cases/qa/multiple_chunk_retriever_qa.py b/src/intelligence_layer/use_cases/qa/multiple_chunk_retriever_qa.py index 874ac8cdf..229af5f3a 100644 --- a/src/intelligence_layer/use_cases/qa/multiple_chunk_retriever_qa.py +++ b/src/intelligence_layer/use_cases/qa/multiple_chunk_retriever_qa.py @@ -53,22 +53,6 @@ class MultipleChunkRetrieverQa( k: number of top chunk search results to inject into :class:`SingleChunkQa`-task. qa_task: The task that is used to generate an answer for a single chunk (retrieved through the retriever). Defaults to :class:`SingleChunkQa`. - - Example: - >>> import os - >>> from intelligence_layer.connectors import DocumentIndexClient - >>> from intelligence_layer.connectors import DocumentIndexRetriever - >>> from intelligence_layer.core import InMemoryTracer - >>> from intelligence_layer.use_cases import MultipleChunkRetrieverQa, RetrieverBasedQaInput - - - >>> token = os.getenv("AA_TOKEN") - >>> document_index = DocumentIndexClient(token) - >>> retriever = DocumentIndexRetriever(document_index, "aleph-alpha", "wikipedia-de", 3) - >>> task = MultipleChunkRetrieverQa(retriever) - >>> input_data = RetrieverBasedQaInput(question="When was Rome founded?") - >>> tracer = InMemoryTracer() - >>> output = task.run(input_data, tracer) """ def __init__( diff --git a/tests/use_cases/qa/test_multiple_chunk_retriever_qa.py b/tests/use_cases/qa/test_multiple_chunk_retriever_qa.py index c905e33ff..ed8003744 100644 --- a/tests/use_cases/qa/test_multiple_chunk_retriever_qa.py +++ b/tests/use_cases/qa/test_multiple_chunk_retriever_qa.py @@ -21,4 +21,4 @@ def test_retriever_based_qa_using_in_memory_retriever( output = multiple_chunk_retriever_qa.run(input, no_op_tracer) assert output.answer assert "1888" in output.answer - assert len(output.sources) == 2 + assert len(output.sources) == 5