Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
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=
|
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)
|