# Response from retrieval chain is truncated

**URL:** <https://discuss.huggingface.co/t/response-from-retrieval-chain-is-truncated/61942>\
**Category:** Beginners\
**Created:** [November 11, 2023, 8:31pm UTC](https://discuss.huggingface.co/t/response-from-retrieval-chain-is-truncated/61942 "2023-11-11T20:31:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![santa1666](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@santa1666](https://discuss.huggingface.co/u/santa1666)\
**Post date:** [November 11, 2023, 8:31pm UTC](https://discuss.huggingface.co/t/response-from-retrieval-chain-is-truncated/61942/1 "2023-11-11T20:31:37Z")

</div>

Hello fellow HFers,

any help would be appreciated. I am running open source LLM such as Bloom or Llama2-7b-hf or Flan-t5 and I am having same issue with each. The response from the chain retrieval is truncated after a certain number of characters. I tried searching online and looking at the API params but couldn’t find anything. Here is the relevant code snippet

def get\_vector\_store(text\_chunks):

```
# For Huggingface Embeddings

embeddings = HuggingFaceInstructEmbeddings(model_name = "hkunlp/instructor-large")

vectorstore = FAISS.from_texts(texts = text_chunks, embedding = embeddings)

# For Huggingface Embeddings
llm = HuggingFaceHub(repo_id="bigscience/bloom", model_kwargs={"temperature":0.5, "max_length":512})

memory = ConversationBufferMemory(memory_key='chat_history', return_messages=True)

conversation_chain = ConversationalRetrievalChain.from_llm(
    llm = llm,
    retriever = vectorstore.as_retriever(),
    memory = memory

```

)

Any help would be appreciated
