RetrievalQA output repeats prompt and context sources

I have a python script that leverages langchain, huggingface and Llama3 to serve as a RAG for answering questions on our private data and to fallback to the LLM as well.

The output includes the prompt and also list all the context used in the answer. Is there a way to limit it from repeating the prompt and to hide the context sources?

Here is the goods on the code:

 # Initialize the RetrievalQA chain
    qa_chain = RetrievalQA.from_chain_type(
        llm=llm, chain_type="stuff", retriever=index.as_retriever()
    )

    result = qa_chain(query)
    print(result)


def main():
    query = input("Type in your question: \n")
    while query != "exit":
        query_docs(query)
        query = input("Type in your question: \n")


if __name__ == "__main__":
    main()