bug: map_reduce (RetrievalQAWithSourcesChain.from_chain_type) with embeddings - reproducible 
Labels: name: area: embeddings, name: area: doc loader, name: area: vector store, name: auto:bug, name: area: models, name: integration: chroma

### System Info

```
langchain==0.0.291
chromadb==0.4.10
Python 3.10.0
22.6.0 Darwin Kernel
```

### Who can help?

@agola11  @hwchase17 bug map_reduce - reproducible

### Information

- [X] The official example notebooks/scripts
- [X] My own modified scripts

### Related Components

- [X] LLMs/Chat Models
- [X] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [X] Document Loaders
- [X] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

## Description

The bug arrises when using `map_reduce` with `RetrievalQAWithSourcesChain.from_chain_type` and `Chroma,` and adding more than 1 document.

Specifically, we have `paper.pdf` and `paper2.pdf`.
`paper.pdf` talks about `'x=3'`
`paper2.pdf` talks about `'y=5'`

*This is key*: Embedding and searching for each one individually with just *one* works perfectly.

If you embed and add the two (or anything more than 1) back to back, and you search with `map_reduce` get this error:
(NOTE: *this is also key*, for the same embedding, if you switch to using `RetrievalQAWithSourcesChain.from_chain_type` with `stuff`, it also *works perfectly*)


## Example of Error:
```
--------------> PDF1
[Document(page_content='This is a sample paper!This paper talks about x.In this case, we are going to say that "x = 3"', metadata={'source': '/Users/user/Desktop/paper.pdf', 'page': 0, 'start_index': 0})]
Number of requested results 4 is greater than number of elements in index 1, updating n_results = 1
========================
{'question': 'what is x?', 'answer': 'x = 3.\n', 'sources': '/Users/user/Desktop/paper.pdf', 'source_documents': [Document(page_content='This is a sample paper!This paper talks about x.In this case, we are going to say that "x = 3"', metadata={'page': 0, 'source': '/Users/user/Desktop/paper.pdf', 'start_index': 0})]}
========================


--------------> PDF2
[Document(page_content='This is another sample paper!  This paper talks about y.  In this case, we are going to say that "y = 5"', metadata={'source': '/Users/user/Desktop/paper2.pdf', 'page': 0, 'start_index': 0})]
Number of requested results 4 is greater than number of elements in index 2, updating n_results = 2
========================
{'question': 'what is y?', 'answer': 'There is no relevant text provided to answer the question "what is y?"\n', 'sources': '/Users/user/Desktop/paper.pdf', 'source_documents': [Document(page_content='This is another sample paper!  This paper talks about y.  In this case, we are going to say that "y = 5"', metadata={'page': 0, 'source': '/Users/user/Desktop/paper2.pdf', 'start_index': 0}), Document(page_content='This is a sample paper!This paper talks about x.In this case, we are going to say that "x = 3"', metadata={'page': 0, 'source': '/Users/user/Desktop/paper.pdf', 'start_index': 0})]}
========================
```

Again,  -- each one by itself works. (both `paper.pdf` and `paper2.pdf` produces the correct answer individually). Also, moving to the `stuff` chain, produces the correct result for both or more documents.

```
--------------> PDF1
[Document(page_content='This is a sample paper!\r\nThis paper talks about x.\r\nIn this case, we are going to say that "x = 3"', metadata={'source': '/Users/user/Desktop/paper.pdf', 'page': 0, 'start_index': 0})]
Number of requested results 4 is greater than number of elements in index 1, updating n_results = 1
========================
{'question': 'what is x?', 'answer': 'x = 3\n', 'sources': '/Users/user/Desktop/paper.pdf', 'source_documents': [Document(page_content='This is a sample paper!\r\nThis paper talks about x.\r\nIn this case, we are going to say that "x = 3"', metadata={'page': 0, 'source': '/Users/user/Desktop/paper.pdf', 'start_index': 0})]}
========================
--------------> PDF2
[Document(page_content='This is another sample paper!\r\nThis paper talks about y.\r\nIn this case, we are going to say that "y = 5"', metadata={'source': '/Users/user/Desktop/paper2.pdf', 'page': 0, 'start_index': 0})]
Number of requested results 4 is greater than number of elements in index 2, updating n_results = 2
========================
{'question': 'what is y?', 'answer': 'y = 5\n', 'sources': '/Users/user/Desktop/paper2.pdf', 'source_documents': [Document(page_content='This is another sample paper!\r\nThis paper talks about y.\r\nIn this case, we are going to say that "y = 5"', metadata={'page': 0, 'source': '/Users/user/Desktop/paper2.pdf', 'start_index': 0}), Document(page_content='This is a sample paper!\r\nThis paper talks about x.\r\nIn this case, we are going to say that "x = 3"', metadata={'page': 0, 'source': '/Users/user/Desktop/paper.pdf', 'start_index': 0})]}
========================
```


## Reproduce:

Create a llm (OpenAI or AzureChatOpenAI):

1.) 
```
llm = AzureChatOpenAI(
    temperature=0,
    openai_api_base=openai_api_base,
    openai_api_version=openai_api_version,
    openai_api_key=openai_api_key,
    openai_api_type=openai_api_type,
    deployment_name=openai_model
)   
```

2.) Create embeddings:
```
embeddings = OpenAIEmbeddings(deployment=openai_embedding_model, chunk_size=1)
text_splitter = RecursiveCharacterTextSplitter(chunk_size=200, chunk_overlap=20, length_function = len, add_start_index = True)
```

3.) Setup Chroma and Retriever
```
db = Chroma(embedding_function=embeddings)

# Again a note: if you replace `map_reduce` with `stuff` -- works perfectly!
qa = RetrievalQAWithSourcesChain.from_chain_type(llm=llm, chain_type="map_reduce", retriever=db.as_retriever(search_kwargs={"k": 4}), return_source_documents=True)
```

4.) Embed the files `db.add_documents()` and search!
```
NOTE: I have tried with multiple PDF loaders and the same problem exists even with plain text -- so this is not the issue

print("--------------> PDF1")
loader = PyPDFium2Loader('/Users/user/Desktop/paper.pdf')
docs = loader.load_and_split(text_splitter)
print(docs)
db.add_documents(docs)
text = 'what is x?'
result = qa({"question": text})
print("========================")
print(result)
print("========================")

print("--------------> PDF2")
loader = PyPDFium2Loader('/Users/user/Desktop/paper2.pdf')
docs = loader.load_and_split(text_splitter)
print(docs)
db.add_documents(docs)
text = 'what is y?'
result = qa({"question": text})
print("========================")
print(result)
print("========================")
```

## Key Summary:
* As you will see, the correct documents are retrieved -- it's just the injections/`map_reduce` that's causing a problem
* With `map_reduce` - if there is a single `Document()` it works fine -- for both `paper.pdf` and `paper2.pdf`
* With `map_reduce`, more than 1 document causes the issue.
* If you use the same embeddings and the same code with `stuff` chain it works perfectly with multiple documents.

## Files Attached for testing:
[paper.pdf](https://github.com/langchain-ai/langchain/files/12647756/paper.pdf)
[paper2.pdf](https://github.com/langchain-ai/langchain/files/12647750/paper2.pdf)


see a self-contained example here:
https://github.com/langchain-ai/langchain/issues/10735#issuecomment-1723595341

### Expected behavior

For `RetrievalQAWithSourcesChain.from_chain_type` to be able to inject the correct documents that it finds with `map_reduce` (similar to `stuff` which works):

```
--------------> PDF1
[Document(page_content='This is a sample paper!\r\nThis paper talks about x.\r\nIn this case, we are going to say that "x = 3"', metadata={'source': '/Users/user/Desktop/paper.pdf', 'page': 0, 'start_index': 0})]
Number of requested results 4 is greater than number of elements in index 1, updating n_results = 1
========================
{'question': 'what is x?', 'answer': 'x = 3\n', 'sources': '/Users/user/Desktop/paper.pdf', 'source_documents': [Document(page_content='This is a sample paper!\r\nThis paper talks about x.\r\nIn this case, we are going to say that "x = 3"', metadata={'page': 0, 'source': '/Users/user/Desktop/paper.pdf', 'start_index': 0})]}
========================


--------------> PDF2
[Document(page_content='This is another sample paper!\r\nThis paper talks about y.\r\nIn this case, we are going to say that "y = 5"', metadata={'source': '/Users/user/Desktop/paper2.pdf', 'page': 0, 'start_index': 0})]
Number of requested results 4 is greater than number of elements in index 2, updating n_results = 2
========================
{'question': 'what is y?', 'answer': 'y = 5\n', 'sources': '/Users/user/Desktop/paper2.pdf', 'source_documents': [Document(page_content='This is another sample paper!\r\nThis paper talks about y.\r\nIn this case, we are going to say that "y = 5"', metadata={'page': 0, 'source': '/Users/user/Desktop/paper2.pdf', 'start_index': 0}), Document(page_content='This is a sample paper!\r\nThis paper talks about x.\r\nIn this case, we are going to say that "x = 3"', metadata={'page': 0, 'source': '/Users/user/Desktop/paper.pdf', 'start_index': 0})]}
========================
```