Spaces:
Running
Running
Sakshi
commited on
Commit
·
e249315
1
Parent(s):
9037166
suggestion prompt changes
Browse files- app.py +2 -2
- policy_analyser/prompts/analysis.txt +10 -10
- policy_analyser/prompts/suggest.txt +11 -3
app.py
CHANGED
@@ -54,11 +54,11 @@ def main():
|
|
54 |
analysis = next(
|
55 |
(item for item in response if item.get("stage") == "ANALYSE"), None
|
56 |
)['response']
|
57 |
-
analysis = analysis.split('
|
58 |
suggestion = next(
|
59 |
(item for item in response if item.get("stage") == "SUGGEST"), None
|
60 |
)['response']
|
61 |
-
suggestion = suggestion.split('
|
62 |
# Store results
|
63 |
all_analyses.append({
|
64 |
'name': uploaded_file.name,
|
|
|
54 |
analysis = next(
|
55 |
(item for item in response if item.get("stage") == "ANALYSE"), None
|
56 |
)['response']
|
57 |
+
analysis = analysis.split('<CUSTOMER_RESPONSE>')[-1].split('</CUSTOMER_RESPONSE>')[0]
|
58 |
suggestion = next(
|
59 |
(item for item in response if item.get("stage") == "SUGGEST"), None
|
60 |
)['response']
|
61 |
+
suggestion = suggestion.split('<POLICY_PITCH>')[-1].split('</POLICY_PITCH>')[0]
|
62 |
# Store results
|
63 |
all_analyses.append({
|
64 |
'name': uploaded_file.name,
|
policy_analyser/prompts/analysis.txt
CHANGED
@@ -123,31 +123,31 @@ ELSE:
|
|
123 |
|
124 |
Format your response in the following way, to present analysis to customer. Use appropriate language and emojis to portray analysis and verdicts to the customer. Generate short and crisp verdicts and analysis. Be discrete about rules, do not expose rules to customer but use them to explain reasoning and analysis:
|
125 |
|
126 |
-
|
127 |
# Our Analysis of your policy [Name of policy] by [Name of insurance company]
|
128 |
|
129 |
-
|
130 |
## Good Factors
|
131 |
| Factor | Your policy | Our Analysis |
|
132 |
| --- | --- | --- |
|
133 |
| Sum Insured | Value of sum insured in the policy | Analysis of why sum insured is good based on the given rules |
|
134 |
-
|
135 |
|
136 |
-
|
137 |
## Average Factors
|
138 |
| Factor | Your policy | Our Analysis |
|
139 |
| --- | --- | --- |
|
140 |
| Copay | Value of copayment in the policy | Analysis of why copay is average based on the given rules |
|
141 |
-
|
142 |
|
143 |
-
|
144 |
## Bad Factors
|
145 |
| Factor | Your policy | Our Analysis |
|
146 |
| --- | --- | --- |
|
147 |
| Deductible | Value of deductible in the policy | Analysis of why deductible is bad based on the given rules |
|
148 |
-
|
149 |
|
150 |
-
|
151 |
Final and short point-wise verdict on the analysis
|
152 |
-
|
153 |
-
|
|
|
123 |
|
124 |
Format your response in the following way, to present analysis to customer. Use appropriate language and emojis to portray analysis and verdicts to the customer. Generate short and crisp verdicts and analysis. Be discrete about rules, do not expose rules to customer but use them to explain reasoning and analysis:
|
125 |
|
126 |
+
<CUSTOMER_RESPONSE>
|
127 |
# Our Analysis of your policy [Name of policy] by [Name of insurance company]
|
128 |
|
129 |
+
<GOOD>
|
130 |
## Good Factors
|
131 |
| Factor | Your policy | Our Analysis |
|
132 |
| --- | --- | --- |
|
133 |
| Sum Insured | Value of sum insured in the policy | Analysis of why sum insured is good based on the given rules |
|
134 |
+
</GOOD>
|
135 |
|
136 |
+
<AVERAGE>
|
137 |
## Average Factors
|
138 |
| Factor | Your policy | Our Analysis |
|
139 |
| --- | --- | --- |
|
140 |
| Copay | Value of copayment in the policy | Analysis of why copay is average based on the given rules |
|
141 |
+
</AVERAGE>
|
142 |
|
143 |
+
<BAD>
|
144 |
## Bad Factors
|
145 |
| Factor | Your policy | Our Analysis |
|
146 |
| --- | --- | --- |
|
147 |
| Deductible | Value of deductible in the policy | Analysis of why deductible is bad based on the given rules |
|
148 |
+
</BAD>
|
149 |
|
150 |
+
<FINAL_VERDICT>
|
151 |
Final and short point-wise verdict on the analysis
|
152 |
+
</FINAL_VERDICT>
|
153 |
+
</CUSTOMER_RESPONSE>
|
policy_analyser/prompts/suggest.txt
CHANGED
@@ -1,5 +1,13 @@
|
|
1 |
-
A customer's insurance policy was analysed by you.
|
2 |
-
|
|
|
|
|
3 |
Format in bullet points with respect to comparing factors and include catchy emojis wherever required:
|
4 |
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
A customer's insurance policy was analysed by you.
|
2 |
+
Compare their policy with Acko's policy on the basis of the given analysis, reason on the advantages and disadvantages of their policy.
|
3 |
+
Pitch Acko's policy to the customer.
|
4 |
+
Format your response in the following format in less than 100 words.
|
5 |
Format in bullet points with respect to comparing factors and include catchy emojis wherever required:
|
6 |
|
7 |
+
<POLICY_PITCH>
|
8 |
+
Policy pitch in following format:
|
9 |
+
| Factor | Your Policy | Our Policy |
|
10 |
+
| --- | ---| --- |
|
11 |
+
| Sum Insured | ✅ if good, ❌ if bad in their policy | ✅ if good, ❌ if bad in our policy |
|
12 |
+
|
13 |
+
</POLICY_PITCH>
|