Spaces:
Runtime error
Runtime error
Commit
•
336a900
1
Parent(s):
cadbd48
Update greg_funcs.py
Browse files- greg_funcs.py +11 -7
greg_funcs.py
CHANGED
@@ -72,7 +72,7 @@ def get_text_fmt(qry, passages = mypassages, doc_embedding=mycorpus_embeddings):
|
|
72 |
|
73 |
template = """You are a friendly AI assistant for the insurance company Humana. Given the following extracted parts of a long document and a question, create a succinct final answer.
|
74 |
If you don't know the answer, just say that you don't know. Don't try to make up an answer.
|
75 |
-
If the question is not about Humana, politely inform the user that you are tuned to only answer questions about Humana.
|
76 |
QUESTION: {question}
|
77 |
=========
|
78 |
{context}
|
@@ -131,9 +131,9 @@ llm_math_chain = LLMMathChain(llm=llm, verbose=True)
|
|
131 |
|
132 |
"""# Greeting"""
|
133 |
|
134 |
-
template = """You are
|
135 |
-
Your name is
|
136 |
-
Offer polite greetings and brief small talk.
|
137 |
Respond to thanks with, 'Glad to help.'
|
138 |
If the question is not about Humana, politely guide the user to ask questions about Humana insurance benefits.
|
139 |
QUESTION: {question}
|
@@ -149,7 +149,9 @@ tools = [
|
|
149 |
Tool(
|
150 |
name = "Benefit",
|
151 |
func=get_llm_response,
|
152 |
-
description=
|
|
|
|
|
153 |
),
|
154 |
Tool(
|
155 |
name="Calculator",
|
@@ -159,12 +161,14 @@ tools = [
|
|
159 |
Tool(
|
160 |
name="Member DB",
|
161 |
func=db_qry,
|
162 |
-
description=
|
|
|
|
|
163 |
),
|
164 |
Tool(
|
165 |
name="Greeting",
|
166 |
func=greet_llm.run,
|
167 |
-
description="useful for when you need to respond to greetings, thanks and make small talk"
|
168 |
),
|
169 |
]
|
170 |
|
|
|
72 |
|
73 |
template = """You are a friendly AI assistant for the insurance company Humana. Given the following extracted parts of a long document and a question, create a succinct final answer.
|
74 |
If you don't know the answer, just say that you don't know. Don't try to make up an answer.
|
75 |
+
If the question is not about Humana, politely inform the user that you are tuned to only answer questions about Humana benefits.
|
76 |
QUESTION: {question}
|
77 |
=========
|
78 |
{context}
|
|
|
131 |
|
132 |
"""# Greeting"""
|
133 |
|
134 |
+
template = """You are an AI assistant for the insurance company Humana.
|
135 |
+
Your name is Jarvis and you were created by Humana's AI research team.
|
136 |
+
Offer polite, friendly greetings and brief small talk.
|
137 |
Respond to thanks with, 'Glad to help.'
|
138 |
If the question is not about Humana, politely guide the user to ask questions about Humana insurance benefits.
|
139 |
QUESTION: {question}
|
|
|
149 |
Tool(
|
150 |
name = "Benefit",
|
151 |
func=get_llm_response,
|
152 |
+
description='''useful for when you need to answer questions about plan benefits, premiums and payments.
|
153 |
+
This tool shows how much of a benefit is available in the plan.
|
154 |
+
You should ask targeted questions'''
|
155 |
),
|
156 |
Tool(
|
157 |
name="Calculator",
|
|
|
161 |
Tool(
|
162 |
name="Member DB",
|
163 |
func=db_qry,
|
164 |
+
description='''useful for when you need to answer questions about member details such their name, id and accumulated use of services.
|
165 |
+
This tool shows how much a benfit has already been consumed.
|
166 |
+
Input should be in the form of a question containing full context'''
|
167 |
),
|
168 |
Tool(
|
169 |
name="Greeting",
|
170 |
func=greet_llm.run,
|
171 |
+
description="useful for when you need to respond to greetings, thanks, answer questions about yourself, and make small talk"
|
172 |
),
|
173 |
]
|
174 |
|