evalscope 0.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- evalscope/__init__.py +3 -0
- evalscope/backend/__init__.py +3 -0
- evalscope/backend/base.py +27 -0
- evalscope/backend/opencompass/__init__.py +3 -0
- evalscope/backend/opencompass/api_meta_template.py +64 -0
- evalscope/backend/opencompass/backend_manager.py +247 -0
- evalscope/backend/opencompass/tasks/__init__.py +1 -0
- evalscope/backend/opencompass/tasks/eval_api.py +30 -0
- evalscope/backend/opencompass/tasks/eval_datasets.py +71 -0
- evalscope/backend/vlm_eval_kit/__init__.py +1 -0
- evalscope/backend/vlm_eval_kit/backend_manager.py +153 -0
- evalscope/benchmarks/__init__.py +4 -0
- evalscope/benchmarks/arc/__init__.py +5 -0
- evalscope/benchmarks/arc/ai2_arc.py +148 -0
- evalscope/benchmarks/arc/arc_adapter.py +231 -0
- evalscope/benchmarks/bbh/__init__.py +6 -0
- evalscope/benchmarks/bbh/bbh_adapter.py +308 -0
- evalscope/benchmarks/bbh/cot_prompts/boolean_expressions.txt +23 -0
- evalscope/benchmarks/bbh/cot_prompts/causal_judgement.txt +25 -0
- evalscope/benchmarks/bbh/cot_prompts/date_understanding.txt +33 -0
- evalscope/benchmarks/bbh/cot_prompts/disambiguation_qa.txt +37 -0
- evalscope/benchmarks/bbh/cot_prompts/dyck_languages.txt +72 -0
- evalscope/benchmarks/bbh/cot_prompts/formal_fallacies.txt +44 -0
- evalscope/benchmarks/bbh/cot_prompts/geometric_shapes.txt +78 -0
- evalscope/benchmarks/bbh/cot_prompts/hyperbaton.txt +28 -0
- evalscope/benchmarks/bbh/cot_prompts/logical_deduction_five_objects.txt +37 -0
- evalscope/benchmarks/bbh/cot_prompts/logical_deduction_seven_objects.txt +37 -0
- evalscope/benchmarks/bbh/cot_prompts/logical_deduction_three_objects.txt +37 -0
- evalscope/benchmarks/bbh/cot_prompts/movie_recommendation.txt +42 -0
- evalscope/benchmarks/bbh/cot_prompts/multistep_arithmetic_two.txt +25 -0
- evalscope/benchmarks/bbh/cot_prompts/navigate.txt +43 -0
- evalscope/benchmarks/bbh/cot_prompts/object_counting.txt +37 -0
- evalscope/benchmarks/bbh/cot_prompts/penguins_in_a_table.txt +41 -0
- evalscope/benchmarks/bbh/cot_prompts/reasoning_about_colored_objects.txt +63 -0
- evalscope/benchmarks/bbh/cot_prompts/ruin_names.txt +44 -0
- evalscope/benchmarks/bbh/cot_prompts/salient_translation_error_detection.txt +40 -0
- evalscope/benchmarks/bbh/cot_prompts/snarks.txt +30 -0
- evalscope/benchmarks/bbh/cot_prompts/sports_understanding.txt +10 -0
- evalscope/benchmarks/bbh/cot_prompts/temporal_sequences.txt +77 -0
- evalscope/benchmarks/bbh/cot_prompts/tracking_shuffled_objects_five_objects.txt +40 -0
- evalscope/benchmarks/bbh/cot_prompts/tracking_shuffled_objects_seven_objects.txt +40 -0
- evalscope/benchmarks/bbh/cot_prompts/tracking_shuffled_objects_three_objects.txt +40 -0
- evalscope/benchmarks/bbh/cot_prompts/web_of_lies.txt +28 -0
- evalscope/benchmarks/bbh/cot_prompts/word_sorting.txt +17 -0
- evalscope/benchmarks/benchmark.py +65 -0
- evalscope/benchmarks/ceval/__init__.py +5 -0
- evalscope/benchmarks/ceval/ceval_adapter.py +340 -0
- evalscope/benchmarks/ceval/ceval_exam.py +159 -0
- evalscope/benchmarks/cmmlu/__init__.py +5 -0
- evalscope/benchmarks/cmmlu/cmmlu.py +166 -0
- evalscope/benchmarks/cmmlu/cmmlu_adapter.py +369 -0
- evalscope/benchmarks/competition_math/__init__.py +5 -0
- evalscope/benchmarks/competition_math/competition_math.py +88 -0
- evalscope/benchmarks/competition_math/competition_math_adapter.py +470 -0
- evalscope/benchmarks/data_adapter.py +263 -0
- evalscope/benchmarks/general_qa/__init__.py +5 -0
- evalscope/benchmarks/general_qa/general_qa_adapter.py +186 -0
- evalscope/benchmarks/gsm8k/__init__.py +5 -0
- evalscope/benchmarks/gsm8k/gsm8k.py +127 -0
- evalscope/benchmarks/gsm8k/gsm8k_adapter.py +236 -0
- evalscope/benchmarks/hellaswag/__init__.py +5 -0
- evalscope/benchmarks/hellaswag/hellaswag.py +116 -0
- evalscope/benchmarks/hellaswag/hellaswag_adapter.py +222 -0
- evalscope/benchmarks/humaneval/__init__.py +5 -0
- evalscope/benchmarks/humaneval/humaneval.py +82 -0
- evalscope/benchmarks/humaneval/humaneval_adapter.py +21 -0
- evalscope/benchmarks/mmlu/__init__.py +5 -0
- evalscope/benchmarks/mmlu/mmlu.py +174 -0
- evalscope/benchmarks/mmlu/mmlu_adapter.py +375 -0
- evalscope/benchmarks/race/__init__.py +5 -0
- evalscope/benchmarks/race/race.py +118 -0
- evalscope/benchmarks/race/race_adapter.py +229 -0
- evalscope/benchmarks/trivia_qa/__init__.py +5 -0
- evalscope/benchmarks/trivia_qa/trivia_qa.py +104 -0
- evalscope/benchmarks/trivia_qa/trivia_qa_adapter.py +207 -0
- evalscope/benchmarks/truthful_qa/__init__.py +5 -0
- evalscope/benchmarks/truthful_qa/truthful_qa.py +167 -0
- evalscope/benchmarks/truthful_qa/truthful_qa_adapter.py +351 -0
- evalscope/cache.py +98 -0
- evalscope/cli/__init__.py +1 -0
- evalscope/cli/base.py +20 -0
- evalscope/cli/cli.py +26 -0
- evalscope/cli/start_perf.py +37 -0
- evalscope/cli/start_server.py +138 -0
- evalscope/config.py +165 -0
- evalscope/constants.py +150 -0
- evalscope/evaluator/__init__.py +3 -0
- evalscope/evaluator/evaluator.py +689 -0
- evalscope/evaluator/rating_eval.py +178 -0
- evalscope/evaluator/reviewer/__init__.py +1 -0
- evalscope/evaluator/reviewer/auto_reviewer.py +411 -0
- evalscope/metrics/__init__.py +1 -0
- evalscope/metrics/bundled_rouge_score/__init__.py +14 -0
- evalscope/metrics/bundled_rouge_score/rouge_scorer.py +342 -0
- evalscope/metrics/code_metric.py +104 -0
- evalscope/metrics/math_accuracy.py +60 -0
- evalscope/metrics/metrics.py +405 -0
- evalscope/metrics/rouge_metric.py +129 -0
- evalscope/models/__init__.py +4 -0
- evalscope/models/custom/__init__.py +4 -0
- evalscope/models/custom/custom_model.py +53 -0
- evalscope/models/dummy_chat_model.py +50 -0
- evalscope/models/model.py +88 -0
- evalscope/models/model_adapter.py +586 -0
- evalscope/models/openai_model.py +103 -0
- evalscope/models/template.py +1446 -0
- evalscope/perf/__init__.py +0 -0
- evalscope/perf/_logging.py +32 -0
- evalscope/perf/api_plugin_base.py +60 -0
- evalscope/perf/custom_api.py +87 -0
- evalscope/perf/dashscope_api.py +84 -0
- evalscope/perf/dataset_plugin_base.py +64 -0
- evalscope/perf/datasets/__init__.py +0 -0
- evalscope/perf/datasets/line_by_line.py +18 -0
- evalscope/perf/datasets/longalpaca_12k.py +20 -0
- evalscope/perf/datasets/openqa.py +22 -0
- evalscope/perf/how_to_analysis_result.py +24 -0
- evalscope/perf/http_client.py +756 -0
- evalscope/perf/openai_api.py +130 -0
- evalscope/perf/plugin_registry.py +35 -0
- evalscope/perf/query_parameters.py +42 -0
- evalscope/perf/server_sent_event.py +43 -0
- evalscope/preprocess/__init__.py +1 -0
- evalscope/preprocess/tokenizers/__init__.py +0 -0
- evalscope/preprocess/tokenizers/gpt2_tokenizer.py +221 -0
- evalscope/registry/__init__.py +1 -0
- evalscope/registry/tasks/arc.yaml +29 -0
- evalscope/registry/tasks/bbh.yaml +27 -0
- evalscope/registry/tasks/bbh_mini.yaml +27 -0
- evalscope/registry/tasks/ceval.yaml +27 -0
- evalscope/registry/tasks/ceval_mini.yaml +27 -0
- evalscope/registry/tasks/cmmlu.yaml +27 -0
- evalscope/registry/tasks/eval_qwen-7b-chat_v100.yaml +28 -0
- evalscope/registry/tasks/general_qa.yaml +27 -0
- evalscope/registry/tasks/gsm8k.yaml +29 -0
- evalscope/registry/tasks/mmlu.yaml +29 -0
- evalscope/registry/tasks/mmlu_mini.yaml +27 -0
- evalscope/run.py +404 -0
- evalscope/run_arena.py +204 -0
- evalscope/run_ms.py +140 -0
- evalscope/summarizer.py +144 -0
- evalscope/third_party/__init__.py +1 -0
- evalscope/third_party/toolbench_static/__init__.py +3 -0
- evalscope/third_party/toolbench_static/eval.py +219 -0
- evalscope/third_party/toolbench_static/infer.py +278 -0
- evalscope/third_party/toolbench_static/llm/__init__.py +1 -0
- evalscope/third_party/toolbench_static/llm/swift_infer.py +45 -0
- evalscope/third_party/toolbench_static/toolbench_static.py +50 -0
- evalscope/tools/__init__.py +1 -0
- evalscope/tools/combine_reports.py +140 -0
- evalscope/tools/gen_mmlu_subject_mapping.py +90 -0
- evalscope/tools/rewrite_eval_results.py +95 -0
- evalscope/utils/__init__.py +4 -0
- evalscope/utils/arena_utils.py +247 -0
- evalscope/utils/completion_parsers.py +87 -0
- evalscope/utils/logger.py +64 -0
- evalscope/utils/task_cfg_parser.py +10 -0
- evalscope/utils/task_utils.py +19 -0
- evalscope/utils/utils.py +625 -0
- evalscope/version.py +4 -0
- evalscope-0.5.0.dist-info/METADATA +566 -0
- evalscope-0.5.0.dist-info/RECORD +165 -0
- evalscope-0.5.0.dist-info/WHEEL +5 -0
- evalscope-0.5.0.dist-info/entry_points.txt +3 -0
- evalscope-0.5.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Evaluate the result of a random Boolean expression.
|
|
2
|
+
|
|
3
|
+
Q: not ( ( not not True ) ) is
|
|
4
|
+
A: Let's think step by step.
|
|
5
|
+
Remember that (i) expressions inside brackets are always evaluated first and that (ii) the order of operations from highest priority to lowest priority is "not", "and", "or", respectively.
|
|
6
|
+
We first simplify this expression "Z" as follows: "Z = not ( ( not not True ) ) = not ( ( A ) )" where "A = not not True".
|
|
7
|
+
Let's evaluate A: A = not not True = not (not True) = not False = True.
|
|
8
|
+
Plugging in A, we get: Z = not ( ( A ) ) = not ( ( True ) ) = not True = False. So the answer is False.
|
|
9
|
+
|
|
10
|
+
Q: True and False and not True and True is
|
|
11
|
+
A: Let's think step by step.
|
|
12
|
+
Remember that (i) expressions inside brackets are always evaluated first and that (ii) the order of operations from highest priority to lowest priority is "not", "and", "or", respectively.
|
|
13
|
+
We first simplify this expression "Z" as follows: "Z = True and False and not True and True = A and B" where "A = True and False" and "B = not True and True".
|
|
14
|
+
Let's evaluate A: A = True and False = False.
|
|
15
|
+
Let's evaluate B: B = not True and True = not (True and True) = not (True) = False.
|
|
16
|
+
Plugging in A and B, we get: Z = A and B = False and False = False. So the answer is False.
|
|
17
|
+
|
|
18
|
+
Q: not not ( not ( False ) ) is
|
|
19
|
+
A: Let's think step by step.
|
|
20
|
+
Remember that (i) expressions inside brackets are always evaluated first and that (ii) the order of operations from highest priority to lowest priority is "not", "and", "or", respectively.
|
|
21
|
+
We first simplify this expression "Z" as follows: "Z = not not ( not ( False ) ) = not not ( A )" where "A = not ( False )".
|
|
22
|
+
Let's evaluate A: A = not ( False ) = not False = True.
|
|
23
|
+
Plugging in A, we get: Z = not not ( A ) = not not (True) = not not False = True. So the answer is True.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Answer questions about causal attribution.
|
|
2
|
+
|
|
3
|
+
Q: How would a typical person answer each of the following questions about causation?
|
|
4
|
+
Frank T., had an ongoing dispute with his neighbor over a stretch of land and one day decided to shoot his neighbor in the body. Frank T. had no experience with guns, his hand slipped on the barrel of the gun, and the shot went wild. Nonetheless, the bullet bounced off a large boulder several feet away and hit the neighbor's body, causing significant injury. Did Frank T. intentionally shoot his neighbor in the body?
|
|
5
|
+
Options:
|
|
6
|
+
- Yes
|
|
7
|
+
- No
|
|
8
|
+
A: Let's think step by step.
|
|
9
|
+
Here in this question, we are told that "Frank T. had no experience with guns, his hand slipped on the barrel of the gun, and the shot went wild." A typical person would assume that this passage suggests that Frank T. had no intention of shooting and injuring someone and that the bullet accidentally hit the neighbor's body; therefore, we conclude that Frank T. did not intentionally hit his neighbor. So the answer is No.
|
|
10
|
+
|
|
11
|
+
Q: How would a typical person answer each of the following questions about causation?
|
|
12
|
+
Suzy and Billy are working on a project that is very important for our nation's security. The boss tells them both: "Be sure that you are here at exactly 9 am. It is absolutely essential that you arrive at that time." Both Billy and Suzy arrive at 9 am. As it happens, there was a motion detector installed in the room where they arrived. The motion detector was set up to be triggered if at least one person appeared in the room at the same time. So the motion detector went off. Did Billy cause the motion detector to go off?
|
|
13
|
+
Options:
|
|
14
|
+
- Yes
|
|
15
|
+
- No
|
|
16
|
+
A: Let's think step by step.
|
|
17
|
+
Here in this question, we are told that the boss ordered them both to arrive at the meeting room at the same time and that the motion detector was set up to be triggered if at least one person appeared in the room at the same time." A typical person would assume that the person probably meant to say the detector was set up to be triggered if "both persons" appeared in the room at the same time, not at least one person, since otherwise the phrase "at the same time" would not make much sense in that sentence. Because the motion detector went off, a typical person would therefore come to the conclusion that both Suzy and Billy triggered the motion detector to go off; hence, Billy did indeed cause the motion detector to go off. So the answer is Yes.
|
|
18
|
+
|
|
19
|
+
Q: How would a typical person answer each of the following questions about causation?
|
|
20
|
+
George and his sister Lena reunite at their parents' house for Thanksgiving. Whereas George just got into medical school, Lena is unhappy in her marriage and recently lost her job. Over the course of the day, George and Lena get into a number of heated arguments. Later in the afternoon they play a game of darts. They split the first two games, and the third game is close until the end. Who will win comes down to George's last shot. If he hits a high point region, he wins; if he hits a low point region, Lena wins. George thinks of the difficult time Lena is having, and he really wants to let her win. He aims the dart at the low point region. He sets up his shot and the dart lands in the low point region. After his shot, Lena wins the game and is very happy. Did George hit the low point region intentionally?
|
|
21
|
+
Options:
|
|
22
|
+
- Yes
|
|
23
|
+
- No
|
|
24
|
+
A: Let's think step by step.
|
|
25
|
+
Here in this question, we are told that "He aims the dart at the low point region." A typical person might therefore think George did intentionally hit the low point region, because he wanted to lift up the spirit of his sister Lena. So the answer is Yes.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Infer the date from context.
|
|
2
|
+
|
|
3
|
+
Q: Today is Christmas Eve of 1937. What is the date 10 days ago in MM/DD/YYYY?
|
|
4
|
+
Options:
|
|
5
|
+
(A) 12/14/2026
|
|
6
|
+
(B) 12/14/1950
|
|
7
|
+
(C) 12/14/2007
|
|
8
|
+
(D) 12/14/1937
|
|
9
|
+
(E) 07/14/1938
|
|
10
|
+
(F) 12/14/1988
|
|
11
|
+
A: Let's think step by step.
|
|
12
|
+
If today is Christmas Eve of 1937, then today's date is December 24, 1937. 10 days before today is December 14, 1937, that is 12/14/1937. So the answer is (D).
|
|
13
|
+
|
|
14
|
+
Q: Tomorrow is 11/12/2019. What is the date one year ago from today in MM/DD/YYYY?
|
|
15
|
+
Options:
|
|
16
|
+
(A) 09/04/2018
|
|
17
|
+
(B) 11/11/2018
|
|
18
|
+
(C) 08/25/2018
|
|
19
|
+
(D) 11/02/2018
|
|
20
|
+
(E) 11/04/2018
|
|
21
|
+
A: Let's think step by step.
|
|
22
|
+
If tomorrow is 11/12/2019, then today is 11/11/2019. The date one year ago from today is 11/11/2018. So the answer is (B).
|
|
23
|
+
|
|
24
|
+
Q: Jane and John married on Jan 2, 1958. It is their 5-year anniversary today. What is the date tomorrow in MM/DD/YYYY?
|
|
25
|
+
Options:
|
|
26
|
+
(A) 01/11/1961
|
|
27
|
+
(B) 01/03/1963
|
|
28
|
+
(C) 01/18/1961
|
|
29
|
+
(D) 10/14/1960
|
|
30
|
+
(E) 01/03/1982
|
|
31
|
+
(F) 12/03/1960
|
|
32
|
+
A: Let's think step by step.
|
|
33
|
+
If Jane and John married on Jan 2, 1958, then and if it is their 5-year anniversary today, then today's date is Jan 2, 1963. The date tomorrow is Jan 3, 1963, that is 01/03/1963. So the answer is (B).
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Clarify the meaning of sentences with ambiguous pronouns.
|
|
2
|
+
|
|
3
|
+
Q: In the following sentences, explain the antecedent of the pronoun (which thing the pronoun refers to), or state that it is ambiguous.
|
|
4
|
+
Sentence: The chief told the counselor that they took the day off.
|
|
5
|
+
Options:
|
|
6
|
+
(A) The chief took the day off
|
|
7
|
+
(B) The counselor took the day off
|
|
8
|
+
(C) Ambiguous
|
|
9
|
+
A: Let's think step by step.
|
|
10
|
+
Here we need to determine who the pronoun "they" might be referring to. There are two possible referents for "they", namely the chief and the counselor. The verb "told" might be able to help us determine which one is more likely (if either). Let X be the chief and Y the counselor. The sentence is then of the form "X told Y that (X or Y) did something."
|
|
11
|
+
Let's consider Y first: "X told Y that Y did something." This case does not make much sense, as Y would already have the information that Y did something, because it is information about themself.
|
|
12
|
+
Now, consider X: "X told Y that X did something." This makes sense, because X would be sharing some information about themself that Y might not have known before.
|
|
13
|
+
Because in this context, X is the chief and Y is the counselor, the answer should be the chief. So the answer is (A).
|
|
14
|
+
|
|
15
|
+
Q: In the following sentences, explain the antecedent of the pronoun (which thing the pronoun refers to), or state that it is ambiguous.
|
|
16
|
+
Sentence: The manager sent a message to the secretary, but he didn't reply yet.
|
|
17
|
+
Options:
|
|
18
|
+
(A) The secretary didn't reply yet
|
|
19
|
+
(B) The manager didn't reply yet
|
|
20
|
+
(C) Ambiguous
|
|
21
|
+
A: Let's think step by step.
|
|
22
|
+
Here we need to determine who the pronoun "he" might be referring to. There are two possible referents for "he", namely the manager and the secretary. The verbs "sent" and "reply" might be able to help us determine which one is more likely (if either). Let X be the manager and Y the secretary. The sentence is then of the form "X sent a message to Y, but (X or Y) didn't reply yet."
|
|
23
|
+
Let's consider Y first: "X sent a message to Y, but Y didn't reply yet." This case makes sense, because of the implicit causality of the sentence. Y was the receiver of the message, but Y didn't get back to X yet.
|
|
24
|
+
Now, consider X: "X sent a message to Y, but X didn't reply yet." This case doesn't make sense, because X was the initial sender of the message, so it is now Y's turn to write back to X.
|
|
25
|
+
Because in this context, X is the manager and Y is the secretary, the answer should be the secretary. So the answer is (A).
|
|
26
|
+
|
|
27
|
+
Q: In the following sentences, explain the antecedent of the pronoun (which thing the pronoun refers to), or state that it is ambiguous.
|
|
28
|
+
Sentence: Bailey will plan to meet the director at his office
|
|
29
|
+
Options:
|
|
30
|
+
(A) It will be Bailey's office
|
|
31
|
+
(B) It will be the director's office
|
|
32
|
+
(C) Ambiguous
|
|
33
|
+
A: Let's think step by step.
|
|
34
|
+
Here we need to determine who the pronoun "his" might be referring to. There are two possible referents for "his", namely Bailey's and the director's. The verb phrase "plan to meet" might be able to help us determine which one is more likely (if either). Let X be Bailey and Y the director. The sentence is then of the form "X will plan to meet Y at (X or Y)'s office."
|
|
35
|
+
Let's consider Y first: "X will plan to meet Y at Y's office." This case makes sense, because X might want to meet up with Y at Y's office.
|
|
36
|
+
Now, consider X: "X will plan to meet Y at X's office." This case also makes sense, because X might want to meet up with Y at X's own office.
|
|
37
|
+
Because both X and Y are possible at the same time, we conclude that the antecedent of the pronoun is ambiguous. So the answer is (C).
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
Correctly close a Dyck-n word.
|
|
2
|
+
|
|
3
|
+
Q: Complete the rest of the sequence, making sure that the parentheses are closed properly. Input: [ { [
|
|
4
|
+
A: Let's think step by step.
|
|
5
|
+
We should process each input one by one and keep track of the stack configuration.
|
|
6
|
+
0: empty stack
|
|
7
|
+
1: [ ; stack: [
|
|
8
|
+
2: { ; stack: [ {
|
|
9
|
+
3: [ ; stack: [ { [
|
|
10
|
+
Now, we have reached the end. The final stack is "[ { [".
|
|
11
|
+
We will need to pop out "[", "{", "[" one by one in that order.
|
|
12
|
+
So, we need "]", "}", "]". So the answer is ] } ].
|
|
13
|
+
|
|
14
|
+
Q: Complete the rest of the sequence, making sure that the parentheses are closed properly. Input: < > ( ( [ [ ( { } ) [ < > ] ]
|
|
15
|
+
A: Let's think step by step.
|
|
16
|
+
We should process each input one by one and keep track of the stack configuration.
|
|
17
|
+
0: empty stack
|
|
18
|
+
1: < ; stack: <
|
|
19
|
+
2: > ; stack: empty
|
|
20
|
+
3: ( ; stack: (
|
|
21
|
+
4: ( ; stack: ( (
|
|
22
|
+
5: [ ; stack: ( ( [
|
|
23
|
+
6: [ ; stack: ( ( [ [
|
|
24
|
+
7: ( ; stack: ( ( [ [ (
|
|
25
|
+
8: { ; stack: ( ( [ [ ( {
|
|
26
|
+
9: } ; stack: ( ( [ [ (
|
|
27
|
+
10: ) ; stack: ( ( [ [
|
|
28
|
+
11: [ ; stack: ( ( [ [ [
|
|
29
|
+
12: < ; stack: ( ( [ [ [ <
|
|
30
|
+
13: > ; stack: ( ( [ [ [
|
|
31
|
+
14: ] ; stack: ( ( [ [
|
|
32
|
+
15: ] ; stack: ( ( [
|
|
33
|
+
Now, we have reached the end. The final stack is "( ( [".
|
|
34
|
+
We will need to pop out "[", "(", "(" one by one in that order.
|
|
35
|
+
So, we need "]", ")", ")". So the answer is ] ) ).
|
|
36
|
+
|
|
37
|
+
Q: Complete the rest of the sequence, making sure that the parentheses are closed properly. Input: < [ < [ { < [ ] < { } > > } ] > { { ( ) } { < [ < > ] > }
|
|
38
|
+
A: Let's think step by step.
|
|
39
|
+
We should process each input one by one and keep track of the stack configuration.
|
|
40
|
+
0: empty stack
|
|
41
|
+
1: < ; stack: <
|
|
42
|
+
2: [ ; stack: < [
|
|
43
|
+
3: < ; stack: < [ <
|
|
44
|
+
4: [ ; stack: < [ < [
|
|
45
|
+
5: { ; stack: < [ < [ {
|
|
46
|
+
6: < ; stack: < [ < [ { <
|
|
47
|
+
7: [ ; stack: < [ < [ { < [
|
|
48
|
+
8: ] ; stack: < [ < [ { <
|
|
49
|
+
9: < ; stack: < [ < [ { < <
|
|
50
|
+
10: { ; stack: < [ < [ { < < {
|
|
51
|
+
11: } ; stack: < [ < [ { < <
|
|
52
|
+
12: > ; stack: < [ < [ { <
|
|
53
|
+
13: > ; stack: < [ < [ {
|
|
54
|
+
14: } ; stack: < [ < [
|
|
55
|
+
15: ] ; stack: < [ <
|
|
56
|
+
16: > ; stack: < [
|
|
57
|
+
17: { ; stack: < [ {
|
|
58
|
+
18: { ; stack: < [ { {
|
|
59
|
+
19: ( ; stack: < [ { { (
|
|
60
|
+
20: ) ; stack: < [ { {
|
|
61
|
+
21: } ; stack: < [ {
|
|
62
|
+
22: { ; stack: < [ { {
|
|
63
|
+
23: < ; stack: < [ { { <
|
|
64
|
+
24: [ ; stack: < [ { { < [
|
|
65
|
+
25: < ; stack: < [ { { < [ <
|
|
66
|
+
26: > ; stack: < [ { { < [
|
|
67
|
+
27: ] ; stack: < [ { { <
|
|
68
|
+
28: > ; stack: < [ { {
|
|
69
|
+
29: } ; stack: < [ {
|
|
70
|
+
Now, we have reached the end. The final stack is "< [ {".
|
|
71
|
+
We will need to pop out "{", "[", "<" one by one in that order.
|
|
72
|
+
So, we need "}", "]", ">". So the answer is } ] >.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Distinguish deductively valid arguments from formal fallacies.
|
|
2
|
+
|
|
3
|
+
Q: "It is not always easy to see who is related to whom -- and in which ways. The following argument pertains to this question: To begin with, Lesley is a close friend of Fernando. Moreover, being a close friend of Fernando or a schoolmate of Lowell is sufficient for being a great-grandfather of Leroy. It follows that Lesley is a great-grandfather of Leroy."
|
|
4
|
+
Is the argument, given the explicitly stated premises, deductively valid or invalid?
|
|
5
|
+
Options:
|
|
6
|
+
- valid
|
|
7
|
+
- invalid
|
|
8
|
+
A: Let's think step by step.
|
|
9
|
+
(1) Lesley is a close friend of Fernando: Lesley = friend(Fernando).
|
|
10
|
+
(2) Being a close friend of Fernando or a schoolmate of Lowell is sufficient for being a great-grandfather of Leroy: If X = friend(Fernando) OR SCHOOLMATE(Lowell), then X = great-grandfather(Leroy).
|
|
11
|
+
Hypothesis: Does it follow that Lesley is a great-grandfather of Leroy: Lesley = great-grandfather(Leroy)?
|
|
12
|
+
Let’s see whether the Hypothesis can be deduced from the arguments (1) and (2) by logical reasoning?
|
|
13
|
+
By (1), we have Lesley = friend(Fernando). By (2), we have if Lesley = friend(Fernando), then Lesley = great-grandfather(Leroy).
|
|
14
|
+
So, it is true that Lesley is a great-grandfather of Leroy. So the answer is valid.
|
|
15
|
+
|
|
16
|
+
Q: "It is not always easy to see who is related to whom -- and in which ways. The following argument pertains to this question: Whoever is not a great-grandfather of Clyde is a stepbrother of Brian. Being an ancestor of Dana is sufficient for not being a great-grandfather of Clyde. We may conclude: Everyone who is an ancestor of Dana is a stepbrother of Brian, too."
|
|
17
|
+
Is the argument, given the explicitly stated premises, deductively valid or invalid?
|
|
18
|
+
Options:
|
|
19
|
+
- valid
|
|
20
|
+
- invalid
|
|
21
|
+
A: Let's think step by step.
|
|
22
|
+
(1) Whoever is not a great-grandfather of Clyde is a stepbrother of Brian: If X = NOT (great-grandfather(Clyde)), then X = stepbrother(Brian).
|
|
23
|
+
(2): Being an ancestor of Dana is sufficient for not being a great-grandfather of Clyde: If X = ancestor(Dana), X = NOT (great-grandfather(Clyde)).
|
|
24
|
+
Hypothesis: Does it follow that everyone who is an ancestor of Dana is a stepbrother of Brian, too: If X = ancestor(Dana), then X = stepbrother(Brian)?
|
|
25
|
+
Let’s see whether the Hypothesis can be deduced from the arguments (1) and (2) by logical reasoning?
|
|
26
|
+
By (2), we have if X = ancestor(Dana), X = NOT (great-grandfather(Clyde)).
|
|
27
|
+
Furthermore, by (1), we have if X = NOT (great-grandfather(Clyde)), then X = stepbrother(Brian).
|
|
28
|
+
By the transitive relation rule in first-order logic, we then have: if X = ancestor(Dana), then X = stepbrother(Brian).
|
|
29
|
+
So, it is true that everyone who is an ancestor of Dana is a stepbrother of Brian. So the answer is valid.
|
|
30
|
+
|
|
31
|
+
Q: "It is not always easy to grasp who is consuming which products. The following argument pertains to this question: Every infrequent user of Paul Mitchell shampoo is either a rare consumer of Nioxin shampoo or a loyal buyer of Caress soap, or both. No regular consumer of Lush soap is a rare consumer of Nioxin shampoo and, in the same time, a loyal buyer of Caress soap. It follows that whoever is an infrequent user of Paul Mitchell shampoo is not a regular consumer of Lush soap."
|
|
32
|
+
Is the argument, given the explicitly stated premises, deductively valid or invalid?
|
|
33
|
+
Options:
|
|
34
|
+
- valid
|
|
35
|
+
- invalid
|
|
36
|
+
A: Let's think step by step.
|
|
37
|
+
(1) Every infrequent user of Paul Mitchell shampoo is either a rare consumer of Nioxin shampoo or a loyal buyer of Caress soap, or both: If X = infrequent-user(Paul Mitchell), then X = rare-consumer(Nioxin) OR X = loyal-buyer(Caress).
|
|
38
|
+
(2): No regular consumer of Lush soap is a rare consumer of Nioxin shampoo and a loyal buyer of Caress soap at the same time. If X = regular-consumer(Lush), then X = NOT (rare-consumer(Nioxin) AND loyal-buyer(Caress)).
|
|
39
|
+
Hypothesis: Does it follow that whoever is an infrequent user of Paul Mitchell shampoo is not a regular consumer of Lush soap: If X = infrequent-user(Paul Mitchell), then X = NOT (regular-consumer(Lush))?
|
|
40
|
+
Let’s see whether the Hypothesis can be deduced from the arguments (1) and (2) by logical reasoning?
|
|
41
|
+
By (1), we have if X = infrequent-user(Paul Mitchell), then X = rare-consumer(Nioxin) OR X = loyal-buyer(Caress). We need to consider both cases separately:
|
|
42
|
+
The case X = rare-consumer(Nioxin) does not appear in (2).
|
|
43
|
+
The case X = loyal-buyer(Caress) does not appear in (2), either.
|
|
44
|
+
So, from (1) and (2), we cannot necessarily deduce the Hypothesis. So the answer is invalid.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
Name geometric shapes from their SVG paths.
|
|
2
|
+
|
|
3
|
+
Q: This SVG path element <path d="M 31.00,73.00 L 32.00,59.00 L 44.00,50.00 L 49.00,41.00 L 64.00,37.00 L 71.00,55.00 L 64.00,76.00 L 52.00,61.00 L 31.00,73.00"/> draws a
|
|
4
|
+
Options:
|
|
5
|
+
(A) circle
|
|
6
|
+
(B) heptagon
|
|
7
|
+
(C) hexagon
|
|
8
|
+
(D) kite
|
|
9
|
+
(E) line
|
|
10
|
+
(F) octagon
|
|
11
|
+
(G) pentagon
|
|
12
|
+
(H) rectangle
|
|
13
|
+
(I) sector
|
|
14
|
+
(J) triangle
|
|
15
|
+
A: Let's think step by step.
|
|
16
|
+
This SVG path element contains "M" and "L" commands. M takes two parameters (x,y) and moves the current point to the coordinates (x,y). L takes two parameters (x,y) and draws a line from the previous coordinate to the new coordinate (x,y).
|
|
17
|
+
This path can be decomposed into 9 separate commands.
|
|
18
|
+
(1) M 31.00,73.00: Move the current point to 31.00,73.00.
|
|
19
|
+
(2) L 32.00,59.00: Create a line from 31.00,73.00 to 32.00,59.00.
|
|
20
|
+
(3) L 44.00,50.00: Create a line from 32.00,59.00 to 44.00,50.00.
|
|
21
|
+
(4) L 49.00,41.00: Create a line from 44.00,50.00 to 49.00,41.00.
|
|
22
|
+
(5) L 64.00,37.00: Create a line from 49.00,41.00 to 64.00,37.00.
|
|
23
|
+
(6) L 71.00,55.00: Create a line from 64.00,37.00 to 71.00,55.00.
|
|
24
|
+
(7) L 64.00,76.00: Create a line from 71.00,55.00 to 64.00,76.00.
|
|
25
|
+
(8) L 52.00,61.00: Create a line from 64.00,76.00 to 52.00,61.00.
|
|
26
|
+
(9) L 31.00,73.00: Create a line from 52.00,61.00 to 31.00,73.00.
|
|
27
|
+
This SVG path starts at point 31.00,73.00, creates eight consecutive and touching lines, and then returns back its starting point, thereby creating an eight-sided shape. It does not have any curves or arches. "octagon" is the only eight-sided object on the list. So the answer is (F).
|
|
28
|
+
|
|
29
|
+
Q: This SVG path element <path d="M 14.19,26.04 L 51.43,39.21 L 58.44,36.69 L 56.63,30.17 L 48.53,26.66 L 14.19,26.04"/> draws a
|
|
30
|
+
Options:
|
|
31
|
+
(A) circle
|
|
32
|
+
(B) heptagon
|
|
33
|
+
(C) hexagon
|
|
34
|
+
(D) kite
|
|
35
|
+
(E) line
|
|
36
|
+
(F) octagon
|
|
37
|
+
(G) pentagon
|
|
38
|
+
(H) rectangle
|
|
39
|
+
(I) sector
|
|
40
|
+
(J) triangle
|
|
41
|
+
A: Let's think step by step.
|
|
42
|
+
This SVG path element contains "M" and "L" commands. M takes two parameters (x,y) and moves the current point to the coordinates (x,y). L takes two parameters (x,y) and draws a line from the previous coordinate to the new coordinate (x,y).
|
|
43
|
+
This path can be decomposed into 6 separate commands.
|
|
44
|
+
(1) M 14.19,26.04: Move the current point to 14.19,26.04.
|
|
45
|
+
(2) L 51.43,39.21: Create a line from 14.19,26.04 to 51.43,39.21.
|
|
46
|
+
(3) L 58.44,36.69: Create a line from 51.43,39.21 to 58.44,36.69.
|
|
47
|
+
(4) L 56.63,30.17: Create a line from 58.44,36.69 to 56.63,30.17.
|
|
48
|
+
(5) L 48.53,26.66: Create a line from 56.63,30.17 to 48.53,26.66.
|
|
49
|
+
(6) L 14.19,26.04: Create a line from 48.53,26.66 to 14.19,26.04.
|
|
50
|
+
This SVG path starts at point 14.19,26.04, creates five consecutive and touching lines, and then returns back its starting point, thereby creating a five-sided shape. It does not have any curves or arches. "pentagon" is the only five-sided polygon on the list. So the answer is (G).
|
|
51
|
+
|
|
52
|
+
Q: This SVG path element <path d="M 41.00,43.00 L 37.00,34.00 L 41.00,33.00 L 45.00,34.00 L 41.00,43.00"/> draws a
|
|
53
|
+
Options:
|
|
54
|
+
(A) circle
|
|
55
|
+
(B) heptagon
|
|
56
|
+
(C) hexagon
|
|
57
|
+
(D) kite
|
|
58
|
+
(E) line
|
|
59
|
+
(F) octagon
|
|
60
|
+
(G) pentagon
|
|
61
|
+
(H) rectangle
|
|
62
|
+
(I) sector
|
|
63
|
+
(J) triangle
|
|
64
|
+
A: Let's think step by step.
|
|
65
|
+
This SVG path element contains "M" and "L" commands. M takes two parameters (x,y) and moves the current point to the coordinates (x,y). L takes two parameters (x,y) and draws a line from the previous coordinate to the new coordinate (x,y).
|
|
66
|
+
This path can be decomposed into 5 separate commands.
|
|
67
|
+
(1) M 41.00,43.00: Move the current point to 41.00,43.00.
|
|
68
|
+
(2) L 37.00,34.00: Create a line from 41.00,43.00 to 37.00,34.00.
|
|
69
|
+
(3) L 41.00,33.00: Create a line from 37.00,34.00 to 41.00,33.00.
|
|
70
|
+
(4) L 45.00,34.00: Create a line from 41.00,33.00 to 45.00,34.00.
|
|
71
|
+
(5) L 41.00,43.00: Create a line from 45.00,34.00 to 41.00,43.00.
|
|
72
|
+
This SVG path starts at point 41.00,43.00, creates four consecutive and touching lines, and then returns back its starting point, thereby creating a four-sided shape. "kite" and "rectangle" are the only two four-sided polygons on the list. So, we need to determine which one is the correct answer.
|
|
73
|
+
A kite has two pairs of equal-length adjacent sides, whereas a rectangle has two pairs of equal-length alternate (opposite) sides. Now, let's check whether the two adjacent sides of this shape are equal.
|
|
74
|
+
Length of side A: |A| = sqrt((41.00-37.00)^2 + (43.00-34.00)^2) = sqrt((4)^2 + (9)^2) = sqrt(16 + 81) = sqrt(97).
|
|
75
|
+
Length of side B: |B| = sqrt((37.00-41.00)^2 + (34.00-33.00)^2)) = sqrt((4)^2 + (1)^2) = sqrt(16 + 1) = sqrt(17).
|
|
76
|
+
Length of side C: |C| = sqrt((41.00-45.00)^2 + (33.00-34.00)^2)) = sqrt((-4)^2 + (-1)^2) = sqrt(16 + 1) = sqrt(17).
|
|
77
|
+
Length of side D: |D| = sqrt((45.00-41.00)^2 + (34.00-43.00)^2)) = sqrt((4)^2 + (-9)^2) = sqrt(16 + 81) = sqrt(97).
|
|
78
|
+
Note that |A| = |D| and |B| = |C|. Furthermore, A and D are adjacent and B and C are adjacent. Thus, this polygon has two pairs of equal-length adjacent sides and is "kite". So the answer is (D).
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Order adjectives correctly in English sentences.
|
|
2
|
+
|
|
3
|
+
Q: Which sentence has the correct adjective order:
|
|
4
|
+
Options:
|
|
5
|
+
(A) rubber terrible ship
|
|
6
|
+
(B) terrible rubber ship
|
|
7
|
+
A: Let's think step by step.
|
|
8
|
+
When there is more than one adjective before a noun, the adjectives need to respect the following order before a noun: "[1. opinion] [2. size] [3. age] [4. shape] [5. color] [6. origin] [7. material] [8. purpose] noun".
|
|
9
|
+
Option (A): "rubber terrible ship". (1) rubber" falls into the material category. (2) "terrible" falls into the opinion category. Option (A) has the following adjective order: [7. material] [1. opinion] (or, in numeric terms, 7 1). Because 7 < 1 is not correct, (A) does not have the correct ordering.
|
|
10
|
+
Option (B): "terrible rubber ship". Option (B) has the following adjective order: [1. opinion] [7. material] (or, in numeric terms, 1 7). Because 1 < 7 is correct, (B) has the correct ordering. So the answer is (B).
|
|
11
|
+
|
|
12
|
+
Q: Which sentence has the correct adjective order:
|
|
13
|
+
Options:
|
|
14
|
+
(A) repulsive small Brazilian exercise ship
|
|
15
|
+
(B) Brazilian repulsive exercise small ship
|
|
16
|
+
A: Let's think step by step.
|
|
17
|
+
When there is more than one adjective before a noun, the adjectives need to respect the following order before a noun: "[1. opinion] [2. size] [3. age] [4. shape] [5. color] [6. origin] [7. material] [8. purpose] noun".
|
|
18
|
+
Option (A): "repulsive small Brazilian exercise ship". (1) "repulsive" falls into the opinion category. (2) "small" falls into the size category. (3) "Brazilian" falls into the origin category. (4) "exercise" falls into the purpose category. Option (A) has the following adjective order: [1. opinion] [2. size] [6. origin] [8. purpose] (or, in numeric terms, 1 2 6 8). Because 1 < 2 < 6 < 8 is correct, (A) has the correct ordering.
|
|
19
|
+
Option (B): "Brazilian repulsive exercise small ship". Option (B) has the following adjective order: [6. origin] [1. opinion] [8. purpose] [2. size] (or, in numeric terms, 6 1 8 2). Because 6 < 1 < 8 < 2 is not correct, (B) does not have the correct ordering. So the answer is (A).
|
|
20
|
+
|
|
21
|
+
Q: Which sentence has the correct adjective order:
|
|
22
|
+
Options:
|
|
23
|
+
(A) blue gold wonderful square shoe
|
|
24
|
+
(B) wonderful square blue gold shoe
|
|
25
|
+
A: Let's think step by step.
|
|
26
|
+
When there is more than one adjective before a noun, the adjectives need to respect the following order before a noun: "[1. opinion] [2. size] [3. age] [4. shape] [5. color] [6. origin] [7. material] [8. purpose] noun".
|
|
27
|
+
Option (A): "blue gold wonderful square shoe". (1) "blue" falls into the color category. (2) "gold" falls into the material category. (3) "wonderful" falls into the opinion category. (4) "square" falls into the shape category. The adjective order that Option (A) has is [5. color] [7. material] [1. opinion] [4. shape] (or, in numeric terms, 5 7 1 4). Because 5 < 7 < 1 < 4 is not correct, (A) does not have the correct ordering.
|
|
28
|
+
Option (B): "wonderful square blue gold shoe". Option (B) has the following adjective order: [1. opinion] [4. shape] [5. color] [7. material] (or, in numeric terms, 1 4 5 7 ). Because 1 < 4 < 5 < 7 is correct, (B) has the correct ordering. So the answer is (B).
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
A logical deduction task which requires deducing the order of a sequence of objects.
|
|
2
|
+
|
|
3
|
+
Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. In a golf tournament, there were three golfers: Amy, Eli, and Eve. Eve finished above Amy. Eli finished below Amy.
|
|
4
|
+
Options:
|
|
5
|
+
(A) Amy finished last
|
|
6
|
+
(B) Eli finished last
|
|
7
|
+
(C) Eve finished last
|
|
8
|
+
A: Let's think step by step.
|
|
9
|
+
(1) Eve finished above Amy: "(above) ? Eve ? Amy ? (below)".
|
|
10
|
+
(2) Eli finished below Amy: "(above) ? Amy ? Eli ? (below)".
|
|
11
|
+
(3) Combining (1) and (2) we get the following ordering: "(above) Eve Amy Eli (below)".
|
|
12
|
+
According to this ordering, the person who finished last (the one at the bottom of this list) is Eli.
|
|
13
|
+
Eli finished last. So the answer is (B).
|
|
14
|
+
|
|
15
|
+
Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a white book, a green book, and an orange book. The green book is to the right of the white book. The orange book is the rightmost.
|
|
16
|
+
Options:
|
|
17
|
+
(A) The white book is the leftmost
|
|
18
|
+
(B) The green book is the leftmost
|
|
19
|
+
(C) The orange book is the leftmost
|
|
20
|
+
A: Let's think step by step.
|
|
21
|
+
(1) The green book is to the right of the white book: "(left) ? white ? green ? (right)".
|
|
22
|
+
(2) The orange book is the rightmost: "(left) ? white ? green orange (right)".
|
|
23
|
+
(3) Combining (1) and (2) we get the following ordering: "(left) white green orange (right)".
|
|
24
|
+
According to this ordering, the leftmost book is the white book.
|
|
25
|
+
The white book is the leftmost. So the answer is (A).
|
|
26
|
+
|
|
27
|
+
Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a red book, a gray book, and a white book. The white book is to the left of the gray book. The red book is the second from the left.
|
|
28
|
+
Options:
|
|
29
|
+
(A) The red book is the leftmost
|
|
30
|
+
(B) The gray book is the leftmost
|
|
31
|
+
(C) The white book is the leftmost
|
|
32
|
+
A: Let's think step by step.
|
|
33
|
+
(1) The white book is to the left of the gray book: "(left) ? white ? gray ? (right)".
|
|
34
|
+
(2) The red book is the second from the left: "(left) ? white red gray ? (right)".
|
|
35
|
+
(3) Combining (1) and (2) we get the following ordering: "(left) white red gray (right)".
|
|
36
|
+
According to this ordering, the leftmost book is the white book.
|
|
37
|
+
The white book is the leftmost. So the answer is (C).
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
A logical deduction task which requires deducing the order of a sequence of objects.
|
|
2
|
+
|
|
3
|
+
Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. In a golf tournament, there were three golfers: Amy, Eli, and Eve. Eve finished above Amy. Eli finished below Amy.
|
|
4
|
+
Options:
|
|
5
|
+
(A) Amy finished last
|
|
6
|
+
(B) Eli finished last
|
|
7
|
+
(C) Eve finished last
|
|
8
|
+
A: Let's think step by step.
|
|
9
|
+
(1) Eve finished above Amy: "(above) ? Eve ? Amy ? (below)".
|
|
10
|
+
(2) Eli finished below Amy: "(above) ? Amy ? Eli ? (below)".
|
|
11
|
+
(3) Combining (1) and (2) we get the following ordering: "(above) Eve Amy Eli (below)".
|
|
12
|
+
According to this ordering, the person who finished last (the one at the bottom of this list) is Eli.
|
|
13
|
+
Eli finished last. So the answer is (B).
|
|
14
|
+
|
|
15
|
+
Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a white book, a green book, and an orange book. The green book is to the right of the white book. The orange book is the rightmost.
|
|
16
|
+
Options:
|
|
17
|
+
(A) The white book is the leftmost
|
|
18
|
+
(B) The green book is the leftmost
|
|
19
|
+
(C) The orange book is the leftmost
|
|
20
|
+
A: Let's think step by step.
|
|
21
|
+
(1) The green book is to the right of the white book: "(left) ? white ? green ? (right)".
|
|
22
|
+
(2) The orange book is the rightmost: "(left) ? white ? green orange (right)".
|
|
23
|
+
(3) Combining (1) and (2) we get the following ordering: "(left) white green orange (right)".
|
|
24
|
+
According to this ordering, the leftmost book is the white book.
|
|
25
|
+
The white book is the leftmost. So the answer is (A).
|
|
26
|
+
|
|
27
|
+
Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a red book, a gray book, and a white book. The white book is to the left of the gray book. The red book is the second from the left.
|
|
28
|
+
Options:
|
|
29
|
+
(A) The red book is the leftmost
|
|
30
|
+
(B) The gray book is the leftmost
|
|
31
|
+
(C) The white book is the leftmost
|
|
32
|
+
A: Let's think step by step.
|
|
33
|
+
(1) The white book is to the left of the gray book: "(left) ? white ? gray ? (right)".
|
|
34
|
+
(2) The red book is the second from the left: "(left) ? white red gray ? (right)".
|
|
35
|
+
(3) Combining (1) and (2) we get the following ordering: "(left) white red gray (right)".
|
|
36
|
+
According to this ordering, the leftmost book is the white book.
|
|
37
|
+
The white book is the leftmost. So the answer is (C).
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
A logical deduction task which requires deducing the order of a sequence of objects.
|
|
2
|
+
|
|
3
|
+
Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. In a golf tournament, there were three golfers: Amy, Eli, and Eve. Eve finished above Amy. Eli finished below Amy.
|
|
4
|
+
Options:
|
|
5
|
+
(A) Amy finished last
|
|
6
|
+
(B) Eli finished last
|
|
7
|
+
(C) Eve finished last
|
|
8
|
+
A: Let's think step by step.
|
|
9
|
+
(1) Eve finished above Amy: "(above) ? Eve ? Amy ? (below)".
|
|
10
|
+
(2) Eli finished below Amy: "(above) ? Amy ? Eli ? (below)".
|
|
11
|
+
(3) Combining (1) and (2) we get the following ordering: "(above) Eve Amy Eli (below)".
|
|
12
|
+
According to this ordering, the person who finished last (the one at the bottom of this list) is Eli.
|
|
13
|
+
Eli finished last. So the answer is (B).
|
|
14
|
+
|
|
15
|
+
Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a white book, a green book, and an orange book. The green book is to the right of the white book. The orange book is the rightmost.
|
|
16
|
+
Options:
|
|
17
|
+
(A) The white book is the leftmost
|
|
18
|
+
(B) The green book is the leftmost
|
|
19
|
+
(C) The orange book is the leftmost
|
|
20
|
+
A: Let's think step by step.
|
|
21
|
+
(1) The green book is to the right of the white book: "(left) ? white ? green ? (right)".
|
|
22
|
+
(2) The orange book is the rightmost: "(left) ? white ? green orange (right)".
|
|
23
|
+
(3) Combining (1) and (2) we get the following ordering: "(left) white green orange (right)".
|
|
24
|
+
According to this ordering, the leftmost book is the white book.
|
|
25
|
+
The white book is the leftmost. So the answer is (A).
|
|
26
|
+
|
|
27
|
+
Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a red book, a gray book, and a white book. The white book is to the left of the gray book. The red book is the second from the left.
|
|
28
|
+
Options:
|
|
29
|
+
(A) The red book is the leftmost
|
|
30
|
+
(B) The gray book is the leftmost
|
|
31
|
+
(C) The white book is the leftmost
|
|
32
|
+
A: Let's think step by step.
|
|
33
|
+
(1) The white book is to the left of the gray book: "(left) ? white ? gray ? (right)".
|
|
34
|
+
(2) The red book is the second from the left: "(left) ? white red gray ? (right)".
|
|
35
|
+
(3) Combining (1) and (2) we get the following ordering: "(left) white red gray (right)".
|
|
36
|
+
According to this ordering, the leftmost book is the white book.
|
|
37
|
+
The white book is the leftmost. So the answer is (C).
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Recommend movies similar to the given list of movies.
|
|
2
|
+
|
|
3
|
+
Q: Find a movie similar to Star Wars Episode IV - A New Hope, Indiana Jones and the Last Crusade, Star Wars Episode V - The Empire Strikes Back, The Big Lebowski:
|
|
4
|
+
Options:
|
|
5
|
+
(A) Tetsuo
|
|
6
|
+
(B) the Ironman
|
|
7
|
+
(C) The Princess Bride
|
|
8
|
+
(D) The Barkley Marathons The Race That Eats Its Young
|
|
9
|
+
(E) Bug
|
|
10
|
+
A: Let's think step by step.
|
|
11
|
+
- Star Wars Episode IV - A New Hope (action, adventure, fantasy; 1977)
|
|
12
|
+
- Indiana Jones and the Last Crusade (action, adventure; 1989)
|
|
13
|
+
- Star Wars Episode V - The Empire Strikes Back (action, adventure, fantasy; 1980)
|
|
14
|
+
- The Big Lebowski (action, drama, comedy; 1998)
|
|
15
|
+
These are all famous classic American movies produced before 2000. Amongst all the options, the only movie similar to these ones seems to be The Princess Bride (1987). So the answer is (C).
|
|
16
|
+
|
|
17
|
+
Q: Find a movie similar to Twister, The Silence of the Lambs, Independence Day, Braveheart:
|
|
18
|
+
Options:
|
|
19
|
+
(A) They Shoot Horses
|
|
20
|
+
(B) Don't They
|
|
21
|
+
(C) Forrest Gump
|
|
22
|
+
(D) The Salton Sea
|
|
23
|
+
(E) Extreme Days
|
|
24
|
+
A: Let's think step by step.
|
|
25
|
+
- Twister (action, adventure, thriller; 1996)
|
|
26
|
+
- The Silence of the Lambs (crime, drama, thriller; 1991)
|
|
27
|
+
- Independence Day (action, science-fiction, drama; 1996)
|
|
28
|
+
- Braveheart (biography, drama, epic; 1995)
|
|
29
|
+
These are all famous Hollywood movies produced around the 1990s. Amongst all the options, the only movie similar to these ones seems to be Forrest Gump (comedy, drama, romance; 1994). So the answer is (C).
|
|
30
|
+
|
|
31
|
+
Q: Find a movie similar to Minority Report, Total Recall, Inside Out, Forrest Gump:
|
|
32
|
+
Options:
|
|
33
|
+
(A) Phenomena
|
|
34
|
+
(B) Lilting
|
|
35
|
+
(C) Catwoman
|
|
36
|
+
(D) Edge of Tomorrow
|
|
37
|
+
A: Let's think step by step.
|
|
38
|
+
- Minority Report (action, crime, mystery; 2002)
|
|
39
|
+
- Total Recall (action, adventure, science-fiction; 2012)
|
|
40
|
+
- Inside Out (animation, family, comedy; 2015)
|
|
41
|
+
- Forrest Gump (comedy, drama, romance; 1994)
|
|
42
|
+
These are all famous movies produced in the past few decades.Amongst all the options, the only movie similar to these ones seems to be Edge of Tomorrow (action, adventure, crime, mystery; 2014), as it is also a science-fiction movie and features Tom Cruise. So the answer is (D).
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Solve multi-step arithmetic problems.
|
|
2
|
+
|
|
3
|
+
Q: ((-5 + 9 * -4 - 0) * (4 + -7 + 0 * -5)) =
|
|
4
|
+
A: Let's think step by step.
|
|
5
|
+
Let’s recall that the order of operations in mathematics is as follows: (1) Parentheses, (2) exponents, (3) multiplication and division (from left to right), (4) addition and multiplication (from left to right). So, remember to always compute the expressions inside parentheses or brackets first.
|
|
6
|
+
This equation can be written as "A * B", where A = (-5 + 9 * -4 - 0) and B = (4 + -7 + 0 * -5).
|
|
7
|
+
Let's calculate A = (-5 + 9 * -4 - 0) = (-5 + (9 * -4) - 0) = (-5 + (-36) - 0) = (-5 + -36 - 0) = -5 - 36 = -41.
|
|
8
|
+
Let's calculate B = (4 + -7 + 0 * -5) = (4 + -7 + (0 * -5)) = (4 + -7 + 0) = (4 + -7) = (4 - 7) = -3.
|
|
9
|
+
Then, the final equation is A * B = -41 * -3 = (-61) * (-3) = 123. So the answer is 123.
|
|
10
|
+
|
|
11
|
+
Q: ((-9 * 7 * 7 * -9) + (4 * -9 - 8 - -4)) =
|
|
12
|
+
A: Let's think step by step.
|
|
13
|
+
Let’s recall that the order of operations in mathematics is as follows: (1) Parentheses, (2) exponents, (3) multiplication and division (from left to right), (4) addition and multiplication (from left to right). So, remember to always compute the expressions inside parentheses or brackets first.
|
|
14
|
+
This equation can be written as "A + B", where A = (-9 * 7 * 7 * -9) and B = (4 * -9 - 8 - -4).
|
|
15
|
+
Let's calculate A = (-9 * 7 * 7 * -9) = ((-9 * 7) * (7 * -9)) = ((-63) * (-63)) = 3969.
|
|
16
|
+
Let's calculate B = (4 * -9 - 8 - (-4)) = ((4 * -9) - 8 - (-4)) = ((-36) - 8 - (-4)) = ((-36 - 8) - (-4)) = (-44 - (-4)) = -40.
|
|
17
|
+
Then, the final equation is A + B = 3969 + -40 = 3969 - 40 = 3929. So the answer is 3929.
|
|
18
|
+
|
|
19
|
+
Q: ((-3 + 5 * 8 * -4) - (9 - 8 * -7 + -9)) =
|
|
20
|
+
A: Let's think step by step.
|
|
21
|
+
Let’s recall that the order of operations in mathematics is as follows: (1) Parentheses, (2) exponents, (3) multiplication and division (from left to right), (4) addition and multiplication (from left to right). So, remember to always compute the expressions inside parentheses or brackets first.
|
|
22
|
+
This equation can be written as "A - B", where A = (-3 + 5 * 8 * -4) and B = (9 - 8 * -7 + -9).
|
|
23
|
+
Let's calculate A = (-3 + 5 * 8 * -4) = (-3 + (5 * 8) * -4) = (-3 + (40) * -4) = (-3 + (40 * -4)) = (-3 + -160) = -163.
|
|
24
|
+
Let's calculate B = (9 - 8 * -7 + -9) = (9 - (8 * -7) + -9) = (9 - (-56) + -9) = ((9 - (-56)) + -9) = ((65) + -9)= (65 - 9) = 56.
|
|
25
|
+
Then, the final equation is A - B = -163 - 56 = -219. So the answer is -219.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Given a series of navigation instructions, determine whether one would end up back at the starting point.
|
|
2
|
+
|
|
3
|
+
Q: If you follow these instructions, do you return to the starting point? Turn left. Turn around. Turn left. Take 7 steps. Take 2 steps. Take 4 steps. Take 8 steps.
|
|
4
|
+
Options:
|
|
5
|
+
- Yes
|
|
6
|
+
- No
|
|
7
|
+
A: Let's think step by step.
|
|
8
|
+
We start at the origin (0, 0), facing the positive y-axis.
|
|
9
|
+
(1) Turn left: (0, 0), facing the negative x-axis.
|
|
10
|
+
(2) Turn around: (0, 0), facing the positive x-axis.
|
|
11
|
+
(3) Turn left: (0, 0), facing the positive y-axis.
|
|
12
|
+
(4) Take 7 steps: (0, 7), facing the positive y-axis.
|
|
13
|
+
(5) Take 2 steps: (0, 9), facing the positive y-axis.
|
|
14
|
+
(6) Take 4 steps: (0, 13), facing the positive y-axis.
|
|
15
|
+
(7) Take 8 steps: (0, 21), facing the positive y-axis.
|
|
16
|
+
Since (0, 21) is not (0, 0), we are not where we started. So the answer is No.
|
|
17
|
+
|
|
18
|
+
Q: If you follow these instructions, do you return to the starting point? Turn around. Take 1 step. Take 6 steps. Turn around. Take 6 steps. Take 9 steps. Take 1 step.
|
|
19
|
+
Options:
|
|
20
|
+
- Yes
|
|
21
|
+
- No
|
|
22
|
+
A: Let's think step by step.
|
|
23
|
+
We start at the origin (0, 0), facing the positive y-axis.
|
|
24
|
+
(1) Turn around: (0, 0), facing the negative y-axis.
|
|
25
|
+
(2) Take 1 step: (0, -1), facing the negative y-axis.
|
|
26
|
+
(3) Take 6 steps: (0, -7), facing the negative y-axis.
|
|
27
|
+
(4) Turn around: (0, -7), facing the positive y-axis.
|
|
28
|
+
(5) Take 6 steps: (0, -1), facing the positive y-axis.
|
|
29
|
+
(6) Take 9 steps: (0, 8), facing the positive y-axis.
|
|
30
|
+
(7) Take 1 step: (0, 9), facing the positive y-axis.
|
|
31
|
+
Since (0, 9) is not (0, 0), we are not where we started. So the answer is No.
|
|
32
|
+
|
|
33
|
+
Q: If you follow these instructions, do you return to the starting point? Always face forward. Take 2 steps right. Take 9 steps left. Take 7 steps right.
|
|
34
|
+
Options:
|
|
35
|
+
- Yes
|
|
36
|
+
- No
|
|
37
|
+
A: Let's think step by step.
|
|
38
|
+
We start at the origin (0, 0), facing the positive y-axis.
|
|
39
|
+
(1) Always face forward: (0, 0), facing the positive y-axis.
|
|
40
|
+
(2) Take 2 steps right: (0, 2), facing the positive y-axis.
|
|
41
|
+
(3) Take 9 steps left: (0, -7), facing the positive y-axis.
|
|
42
|
+
(4) Take 7 steps right: (0, 7), facing the positive y-axis.
|
|
43
|
+
Since (0, 0) is (0, 0), we are indeed where we started. So the answer is Yes.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Questions that involve enumerating objects and asking the model to count them.
|
|
2
|
+
|
|
3
|
+
Q: I have a blackberry, a clarinet, a nectarine, a plum, a strawberry, a banana, a flute, an orange, and a violin. How many fruits do I have?
|
|
4
|
+
A: Let's think step by step.
|
|
5
|
+
We first identify the fruits on the list and include their quantity in parentheses:
|
|
6
|
+
- blackberry (1)
|
|
7
|
+
- nectarine (1)
|
|
8
|
+
- plum (1)
|
|
9
|
+
- strawberry (1)
|
|
10
|
+
- banana (1)
|
|
11
|
+
- orange (1)
|
|
12
|
+
Now, let's add the numbers in parentheses: 1 + 1 + 1 + 1 + 1 + 1 = 6. So the answer is 6.
|
|
13
|
+
|
|
14
|
+
Q: I have an orange, a raspberry, two peaches, a blackberry, an apple, a grape, a nectarine, and three plums. How many fruits do I have?
|
|
15
|
+
A: Let's think step by step.
|
|
16
|
+
We first identify the fruits on the list and include their quantity in parentheses:
|
|
17
|
+
- orange (1)
|
|
18
|
+
- raspberry (1)
|
|
19
|
+
- peaches (2)
|
|
20
|
+
- blackberry (1)
|
|
21
|
+
- apple (1)
|
|
22
|
+
- grape (1)
|
|
23
|
+
- nectarine (1)
|
|
24
|
+
- plums (3)
|
|
25
|
+
Now, let's add the numbers in parentheses: 1 + 1 + 2 + 1 + 1 + 1 + 1 + 3 = 11. So the answer is 11.
|
|
26
|
+
|
|
27
|
+
Q: I have a lettuce head, a head of broccoli, an onion, a stalk of celery, two carrots, a garlic, and a yam. How many vegetables do I have?
|
|
28
|
+
A: Let's think step by step.
|
|
29
|
+
We first identify the vegetables on the list and include their quantity in parentheses:
|
|
30
|
+
- lettuce (1)
|
|
31
|
+
- broccoli (1)
|
|
32
|
+
- onion (1)
|
|
33
|
+
- celery (1)
|
|
34
|
+
- carrots (2)
|
|
35
|
+
- garlic (1)
|
|
36
|
+
- yam (1)
|
|
37
|
+
Now, let's add the numbers in parentheses: 1 + 1 + 1 + 1 + 2 + 1 + 1 = 8. So the answer is 8.
|