Issue: While using Map Reduce Max number of limit exceed even though not exceed.
Labels: name: auto:question, name: area: models

### Issue you'd like to raise.

Python 3.10.7
langchain 0.0.301

I started exploring langchain features such as stuff mode, map reduce mode and refine mode.
i would like to know more about the map reduce and refine modes further. 

my understanding is that if the token limit of a document exceeds then the document goes through the spit and passes in the next call.

Using the following code 

``` 
import os

from langchain.document_loaders import WebBaseLoader
from langchain.chat_models import ChatOpenAI
from langchain.chains.combine_documents.stuff import StuffDocumentsChain
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain, ReduceDocumentsChain, MapReduceDocumentsChain
from langchain.text_splitter import CharacterTextSplitter

os.environ['OPENAI_API_KEY'] = "xxxxx-xxxxxxxxxxxxxxxxxxxxxxxxx"

loader = WebBaseLoader("https://lilianweng.github.io/posts/2023-06-23-agent/")
docs = loader.load()

#Map starts
map_template = """The following is a set of documents
{docs}
Based on this list of docs, please identify the main themes 
Helpful Answer:"""

map_prompt = PromptTemplate.from_template(map_template)

llm = ChatOpenAI(temperature=0)
map_chain = LLMChain(llm=llm, prompt=map_prompt)
#Map ends

#Reduce starts
reduce_template = """The following is set of summaries:
{doc_summaries}
Take these and distill it into a final, consolidated summary of the main themes. 
Helpful Answer:"""
reduce_prompt = PromptTemplate.from_template(reduce_template)
reduce_chain = LLMChain(llm=llm, prompt=reduce_prompt)

# Takes a list of documents, combines them into a single string, and passes this to an LLMChain
combine_documents_chain = StuffDocumentsChain(
    llm_chain=reduce_chain, document_variable_name="doc_summaries"
)

reduce_documents_chain = ReduceDocumentsChain(
    combine_documents_chain=combine_documents_chain,
    collapse_documents_chain=combine_documents_chain,
    token_max=4000,
)
#Reduce ends

#combine Map and Reduce starts
map_reduce_chain = MapReduceDocumentsChain(
    llm_chain=map_chain,
    reduce_documents_chain=reduce_documents_chain,
    document_variable_name="docs",
    return_intermediate_steps=False,
)
#combine Map and Reduce ends

text_splitter = CharacterTextSplitter.from_tiktoken_encoder(
    chunk_size=1000, chunk_overlap=0
)

split_docs = text_splitter.split_documents(docs)

print(map_reduce_chain.run(split_docs[:8]))

#print(split_docs[:8])
```

as we can see i am cnsidering the first 8 documents of the public dataset, which is having 8,104 Tokens  composed of 34312 Characters

As per the 4000 tokens limit the dataset shall break in to three parts and process the operation, but i am facing with the issue

> Retrying langchain.chat_models.openai.ChatOpenAI.completion_with_retry.<locals>._completion_with_retry in 4.0 seconds as it raised RateLimitError: Rate limit reached for default-gpt-3.5-turbo in organization org-xxxxxxxxxxxxxxxxx on requests per min. Limit: 3 / min. Please try again in 20s. Contact us through our help center at help.openai.com if you continue to have issues. Please add a payment method to your account to increase your rate limit. Visit https://platform.openai.com/account/billing to add a payment method..

could you please help me to under stand further how map reduce or refine actual workings.


### Suggestion:

_No response_