Specific word crashing LLMChain
Labels: name: auto:bug, name: area: models

### Issue you'd like to raise.

I am using the LLMChain with the ConversationBufferMemory and it works pretty well. There is a case where the chain throws this exception: ValueError: unexpected '{' in field name. This happens only when I use the word "field" in my question. The code I have written is down below:

FUNCTION TO RETRIEVE LLMCHAIN:
```python
def get_llm_chain(OPENAI_API_KEY, context):
    global glob_llm_chain
    if glob_llm_chain is None:
        llm = ChatOpenAI(temperature=0, openai_api_key=OPENAI_API_KEY, model_name="gpt-4")
        sysprompttemplate = PromptTemplate.from_template("""Given the following extracted parts of a long document and a question, create a final answer in english with references SOURCES.
                                                If you dont know the answer, just say that you don't know. Dont try to make up an answer. ALWAYS return a SOURCES part in your answer.
                                                You also have the ability to remember the previous conversation you had with the human. Answer the question based on context provided.
                                                ============
                                                {context}
                                                ============""").format(context=context)
                
        messages = [ SystemMessagePromptTemplate.from_template(sysprompttemplate), MessagesPlaceholder(variable_name="chat_history"), HumanMessagePromptTemplate.from_template("{question}")]

        prompt = ChatPromptTemplate.from_messages(messages=messages)

        MEMORY = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
        llm_chain = LLMChain(prompt=prompt,
                            llm=llm,
                            verbose=True,
                            memory=MEMORY)
        
        glob_llm_chain = llm_chain
        
        return glob_llm_chain
    else:
        return glob_llm_chain
```

FUNCTION THAT RETURNS THE ANSWER
```python
def get_answer(question):
        
    embeddings = OpenAIEmbeddings()
    milvus_connection_properties = get_milvus_connection_properties()

    vector_store = retrieve_colection(embeddings, "langchain", milvus_connection_properties)
    docs = vector_store.similarity_search(question)
    
    context = get_full_context(docs)

    llm_chain = get_llm_chain(OPENAI_API_KEY, context)

    #result = llm_chain.predict(input={"question": question, "context":context})

    result = llm_chain({"question":question})
    
    return result
```
So, for example when I ask: What is a Field Dependency Map? I get:
```
ERROR:root:unexpected '{' in field name
Traceback (most recent call last):
  File "/home/ardit/projects/evolutivoAI/langchain/app.py", line 29, in <module>
    st.session_state.results = get_answer(question)
                               ^^^^^^^^^^^^^^^^^^^^
  File "/home/ardit/projects/evolutivoAI/langchain/scripts/retrieval.py", line 68, in get_answer
    llm_chain = get_llm_chain(OPENAI_API_KEY, context)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ardit/projects/evolutivoAI/langchain/scripts/retrieval.py", line 41, in get_llm_chain
    messages = [ SystemMessagePromptTemplate.from_template(sysprompttemplate), MessagesPlaceholder(variable_name="chat_history"), HumanMessagePromptTemplate.from_template("{question}")]
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ardit/projects/evolutivoAI/langchain/.venv/lib/python3.11/site-packages/langchain/prompts/chat.py", line 151, in from_template
    prompt = PromptTemplate.from_template(template, template_format=template_format)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ardit/projects/evolutivoAI/langchain/.venv/lib/python3.11/site-packages/langchain/prompts/prompt.py", line 204, in from_template
    input_variables = {
                      ^
  File "/home/ardit/projects/evolutivoAI/langchain/.venv/lib/python3.11/site-packages/langchain/prompts/prompt.py", line 204, in <setcomp>
    input_variables = {
                      ^
ValueError: unexpected '{' in field name
```

Any suggestion why this happens?