# Getting empty response from meta-llama/Meta-Llama-3-8B

**URL:** <https://discuss.huggingface.co/t/getting-empty-response-from-meta-llama-meta-llama-3-8b/84493>\
**Category:** Models\
**Created:** [April 30, 2024, 9:39am UTC](https://discuss.huggingface.co/t/getting-empty-response-from-meta-llama-meta-llama-3-8b/84493 "2024-04-30T09:39:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anusha64](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Anusha64](https://discuss.huggingface.co/u/Anusha64)\
**Post date:** [April 30, 2024, 9:39am UTC](https://discuss.huggingface.co/t/getting-empty-response-from-meta-llama-meta-llama-3-8b/84493/1 "2024-04-30T09:39:27Z")

</div>

llm\_chain = prompt | llm | StrOutputParser()  
setup\_and\_retrieval = RunnableParallel(  
{“context”: retriever, “question”: RunnablePassthrough()}  
)  
rag\_chain = setup\_and\_retrieval | llm\_chain  
result=rag\_chain.invoke(user\_question)  
print(result,“resss”)

Note: Getting empty responses even when trying with different prompts.  
I have followed below prompt template  
\<|begin\_of\_text|\>\<|start\_header\_id|\>system\<|end\_header\_id|\>

{{ system\_prompt }}\<|eot\_id|\>\<|start\_header\_id|\>user\<|end\_header\_id|\>

{{ user\_message\_1 }}\<|eot\_id|\>\<|start\_header\_id|\>assistant\<|end\_header\_id|\>

{{ model\_answer\_1 }}\<|eot\_id|\>\<|start\_header\_id|\>user\<|end\_header\_id|\>

{{ user\_message\_2 }}\<|eot\_id|\>\<|start\_header\_id|\>assistant\<|end\_header\_id|\>

---

<div class="post-metadata">

**Author:** ![Mayukh](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mayukh/32/22012_2.png) [@Mayukh](https://discuss.huggingface.co/u/Mayukh)\
**Post date:** [June 19, 2024, 5:24am UTC](https://discuss.huggingface.co/t/getting-empty-response-from-meta-llama-meta-llama-3-8b/84493/2 "2024-06-19T05:24:40Z")

</div>

Use the prompt format from this example here

> <https://github.com/langchain-ai/langgraph/blob/main/examples/rag/langgraph_rag_agent_llama3_local.ipynb>

I had the same issue and it looks like the way the prompt is formatted when using context and question variables was the issue.
