Luciferalive commited on
Commit
06e0f51
·
verified ·
1 Parent(s): f84df2e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -11
app.py CHANGED
@@ -85,16 +85,10 @@ def answer_query_with_similarity(query, file_contents):
85
 
86
  Retrieve relevant information from your knowledge base to formulate accurate and informative responses.
87
  Always maintain a positive, friendly, and encouraging tone in your interactions with users.
88
- Show empathy and understanding when addressing sensitive topics or user concerns.
89
- Break down complex concepts into easily understandable explanations.
90
- Offer step-by-step guidance or examples when appropriate to help users grasp the information better.
91
- Encourage users to ask follow-up questions and provide additional context if needed for a more accurate response.
92
- If you are uncertain about an answer or lack sufficient information, honestly communicate this to the user and suggest alternative resources or ways they can find the information they need.
93
- Maintain a conversational and engaging style, using simple and clear language.
94
- Personalize your responses when appropriate to create a more meaningful connection with the user.
95
- Always prioritize the user's well-being, and avoid providing any information that could potentially cause harm or be misleading.
96
- Limit your answers to 150 words and make sure to give complete information.
97
- Give a precise answer to the question based on the context. Don't be verbose.
98
  Remember, your goal is to be a reliable, friendly, and supportive AI assistant that provides accurate information while creating a positive user experience, just like ChatGPT. Adapt your communication style to best suit each user's needs and preferences.
99
  ### Docs : {docs}
100
  ### Question : {question}
@@ -104,7 +98,7 @@ def answer_query_with_similarity(query, file_contents):
104
  repo_id = "meta-llama/Meta-Llama-3-8B-Instruct"
105
  llm = HuggingFaceEndpoint(repo_id=repo_id, temperature=0.1, token=HUGGINGFACEHUB_API_TOKEN,
106
  top_p=0.15,
107
- max_new_tokens=512,
108
  repetition_penalty=1.1
109
  )
110
  llm_chain = LLMChain(prompt=prompt, llm=llm)
 
85
 
86
  Retrieve relevant information from your knowledge base to formulate accurate and informative responses.
87
  Always maintain a positive, friendly, and encouraging tone in your interactions with users.
88
+ Strictly write the crisp and clear answers, dont write unnecesary stuff.
89
+ Only answer to the asked question, don't hellucinate of print any pre information.
90
+ After providing the answer, always ask a for any other help needed in the next paragraph
91
+ Writing in the bullet format is our top preference
 
 
 
 
 
 
92
  Remember, your goal is to be a reliable, friendly, and supportive AI assistant that provides accurate information while creating a positive user experience, just like ChatGPT. Adapt your communication style to best suit each user's needs and preferences.
93
  ### Docs : {docs}
94
  ### Question : {question}
 
98
  repo_id = "meta-llama/Meta-Llama-3-8B-Instruct"
99
  llm = HuggingFaceEndpoint(repo_id=repo_id, temperature=0.1, token=HUGGINGFACEHUB_API_TOKEN,
100
  top_p=0.15,
101
+ max_new_tokens=256,
102
  repetition_penalty=1.1
103
  )
104
  llm_chain = LLMChain(prompt=prompt, llm=llm)