You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"text": """JPMorgan Chase & Co. is an American multinational finance company headquartered in New York City. It is the largest bank in the United States and the world's largest by market capitalization as of 2023. Founded in 1799, it is a major provider of investment banking services, with US$3.9 trillion in total assets, and ranked #1 in the Forbes Global 2000 ranking in 2023.""",
63
-
"keyphrases": [
64
-
"JPMorgan Chase & Co.",
65
-
"American multinational finance company",
66
-
"headquartered in New York City",
67
-
"largest bank in the United States",
68
-
"world's largest bank by market capitalization",
69
-
"founded in 1799",
70
-
"major provider of investment banking services",
71
-
"US$3.9 trillion in total assets",
72
-
"ranked #1 in Forbes Global 2000 ranking",
73
-
],
74
-
}
75
-
],
76
-
)
77
-
78
-
79
-
TEXT_GENERATE_QUESTIONS=Prompt(
80
-
name="text_generate_questions",
81
-
instruction="Based on the given text and keyphrases, generate closed-ended questions that can be answered with '1' if the question can be answered using the text, or '0' if it cannot. The questions should ALWAYS result in a '1' based on the given text.",
"text": """JPMorgan Chase & Co. is an American multinational finance company headquartered in New York City. It is the largest bank in the United States and the world's largest by market capitalization as of 2023. Founded in 1799, it is a major provider of investment banking services, with US$3.9 trillion in total assets, and ranked #1 in the Forbes Global 2000 ranking in 2023.""",
89
-
"keyphrases": [
90
-
"JPMorgan Chase & Co.",
91
-
"American multinational finance company",
92
-
"headquartered in New York City",
93
-
"largest bank in the United States",
94
-
"world's largest bank by market capitalization",
95
-
"founded in 1799",
96
-
"major provider of investment banking services",
97
-
"US$3.9 trillion in total assets",
98
-
"ranked #1 in Forbes Global 2000 ranking",
99
-
],
100
-
"questions": [
101
-
"Is JPMorgan Chase & Co. an American multinational finance company?",
102
-
"Is JPMorgan Chase & Co. headquartered in New York City?",
103
-
"Is JPMorgan Chase & Co. the largest bank in the United States?",
104
-
"Is JPMorgan Chase & Co. the world's largest bank by market capitalization as of 2023?",
105
-
"Was JPMorgan Chase & Co. founded in 1799?",
106
-
"Is JPMorgan Chase & Co. a major provider of investment banking services?",
107
-
"Does JPMorgan Chase & Co. have US$3.9 trillion in total assets?",
108
-
"Was JPMorgan Chase & Co. ranked #1 in the Forbes Global 2000 ranking in 2023?",
109
-
],
110
-
}
111
-
],
112
-
)
113
-
114
-
115
-
TEXT_GENERATE_ANSWERS=Prompt(
116
-
name="text_generate_answers",
117
-
instruction="Based on the list of close-ended '1' or '0' questions, generate a JSON with key 'answers', which is a list of strings that determines whether the provided summary contains sufficient information to answer EACH question. Answers should STRICTLY be either '1' or '0'. Answer '0' if the provided summary does not contain enough information to answer the question and answer '1' if the provided summary can answer the question.",
"summary": """JPMorgan Chase & Co., headquartered in New York City, is the largest bank in the US and the world's largest by market capitalization as of 2023. Founded in 1799, it offers extensive investment, private, asset management, and retail banking services, and has $3.9 trillion in assets, making it the fifth-largest bank globally. It operates the world's largest investment bank by revenue and was ranked #1 in the 2023 Forbes Global 2000.""",
125
-
"questions": [
126
-
"Is JPMorgan Chase & Co. an American multinational finance company?",
127
-
"Is JPMorgan Chase & Co. headquartered in New York City?",
128
-
"Is JPMorgan Chase & Co. the largest bank in the United States?",
129
-
"Is JPMorgan Chase & Co. the world's largest bank by market capitalization as of 2023?",
130
-
"Is JPMorgan Chase & Co. considered systemically important by the Financial Stability Board?",
131
-
"Was JPMorgan Chase & Co. founded in 1799 as the Chase Manhattan Company?",
132
-
"Is JPMorgan Chase & Co. a major provider of investment banking services?",
133
-
"Is JPMorgan Chase & Co. the fifth-largest bank in the world by assets?",
134
-
"Does JPMorgan Chase & Co. operate the largest investment bank by revenue?",
135
-
"Was JPMorgan Chase & Co. ranked #1 in the Forbes Global 2000 ranking?",
136
-
"Does JPMorgan Chase & Co. provide investment banking services?",
text="Apple Inc. is a technology company based in Cupertino, California. Founded by Steve Jobs in 1976, it reached a market capitalization of $3 trillion in 2023."
instruction: str="Based on the given text and keyphrases, generate closed-ended questions that can be answered with '1' if the question can be answered using the text, or '0' if it cannot. The questions should ALWAYS result in a '1' based on the given text."
text="Apple Inc. is a technology company based in Cupertino, California. Founded by Steve Jobs in 1976, it reached a market capitalization of $3 trillion in 2023.",
72
+
keyphrases=[
73
+
"Apple Inc.",
74
+
"Cupertino, California",
75
+
"Steve Jobs",
76
+
"1976",
77
+
"$3 trillion",
78
+
"2023",
79
+
],
80
+
),
81
+
QuestionsGenerated(
82
+
questions=[
83
+
"Is Apple Inc. a technology company?",
84
+
"Is Apple Inc. based in Cupertino, California?",
85
+
"Was Apple Inc. founded by Steve Jobs?",
86
+
"Was Apple Inc. founded in 1976?",
87
+
"Did Apple Inc. reach a market capitalization of $3 trillion?",
88
+
"Did Apple Inc. reach a market capitalization of $3 trillion in 2023?",
instruction: str="Based on the list of close-ended '1' or '0' questions, generate a JSON with key 'answers', which is a list of strings that determines whether the provided summary contains sufficient information to answer EACH question. Answers should STRICTLY be either '1' or '0'. Answer '0' if the provided summary does not contain enough information to answer the question and answer '1' if the provided summary can answer the question."
summary="Apple Inc. is a technology company based in Cupertino, California. Founded by Steve Jobs in 1976, it reached a market capitalization of $3 trillion in 2023.",
109
+
questions=[
110
+
"Is Apple Inc. a technology company?",
111
+
"Is Apple Inc. based in Cupertino, California?",
112
+
"Was Apple Inc. founded by Steve Jobs?",
113
+
"Was Apple Inc. founded in 1976?",
114
+
"Did Apple Inc. reach a market capitalization of $3 trillion?",
115
+
"Did Apple Inc. reach a market capitalization of $3 trillion in 2023?",
116
+
"Is Apple Inc. a major software company?",
117
+
"Is Apple Inc. known for the iPhone?",
118
+
"Was Steve Jobs the co-founder of Apple Inc.?",
119
+
],
120
+
),
121
+
AnswersGenerated(
122
+
answers=[
123
+
"1",
124
+
"1",
125
+
"1",
126
+
"1",
127
+
"1",
128
+
"1",
129
+
"0",
130
+
"0",
131
+
"1",
132
+
]
133
+
),
134
+
)
135
+
]
142
136
143
137
144
138
@dataclass
@@ -155,14 +149,14 @@ class SummarizationScore(MetricWithLLM, SingleTurnMetric):
0 commit comments