repo_description: Running Llama 2 and other Open-Source LLMs on CPU Inference Locally for Document Q&A
repo_topics: c-transformers chatgpt cpu cpu-inference deep-learning document-qa faiss langchain language-models large-language-models llama llama-2 llm machine-learning natural-language-processing nlp open-source-llm python sentence-transformers transformers
code: '''
  ===========================================
          Module: Prompts collection
  ===========================================
  '''
  # Note: Precise formatting of spacing and indentation of the prompt template is important for Llama-2-7B-Chat,
  # as it is highly sensitive to whitespace changes. For example, it could have problems generating
  # a summary from the pieces of context if the spacing is not done correctly
  
  qa_template = """Use the following pieces of information to answer the user's question.
  If you don't know the answer, just say that you don't know, don't try to make up an answer.
  
  Context: {context}
  Question: {question}
  
  Only return the helpful answer below and nothing else.
  Helpful answer:
  """
  