Skip to content

Commit dd64f14

Browse files
author
Luan Fernandes
committed
update main readme and make a detailed one for ITA 2025 exam
1 parent 53bd76c commit dd64f14

File tree

2 files changed

+63
-10
lines changed

2 files changed

+63
-10
lines changed

‎README.md‎

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,47 @@
11
# gpt-resolve
22
Can GPT solve Brazilian university entrance exams?
33

4-
This project is a simple implementation of how to use LLMs to solve challenging Brazilian university entrance exams.
4+
This project is an implementation of how to use LLMs to solve challenging Brazilian university entrance exams.
55

6-
We'll use `o1-preview`, which is the best OpenAI model so far with reasoning capabilities, and `gpt-4o` to describe the exam images so that `o1-preview` can solve them (as it does not have image capabilities yet). Results are saved as txt files with LaTeX formatting, and you can optionally convert them to a nice PDF or using some LaTeX editor.
6+
We'll use `o1-preview`, which is the best OpenAI model so far with reasoning capabilities, and `gpt-4o` to describe the exam images so that `o1-preview` can solve them on question at a time (as it does not have image capabilities yet). Results are saved as txt files with LaTeX formatting, and you can optionally convert them to a nice PDF or using some LaTeX editor.
77

8-
The first exam to be solved is the ITA (Instituto Tecnológico de Aeronáutica) exam for admissions in 2025, which is considered one of the most challenging exams in Brazil. This exam currently has two phases: the first one is a multiple choice test and a second one with a 4-hour essay test with 10 questions. The project will start by solving the second phase of the Math section, which is the essay test. This is particularly interesting because (i) the exam happened very recently on the 5th of November 2024 and (ii) the essay test requires a deep understanding of the subjects and the ability to write the answer step by step, which we'll evaluate as well.
8+
The first exam to be solved is the ITA (Instituto Tecnológico de Aeronáutica) exam for admissions in 2025, which is considered one of the most challenging exams in Brazil. The project will start by solving the second phase of the Math section, which is the essay test. This is particularly interesting because (i) the exam happened very recently on the 5th of November 2024 and (ii) the essay test requires a deep understanding of the subjects and the ability to write the answer step by step, which we'll evaluate as well. See more details in the in-progress [report](exams/ita_2025/report.md).
99

1010
After the first exam is solved, the project will try to solve the multiple choice test for Math and expand to other sections and eventually other exams. Feel free to contribute with ideas and implementations of other exams!
1111

1212
Table of exams to be solved:
1313

14-
| Exam | Phase | Section | Type | Model | Status | Score |
15-
|------|-------|---------|------|-------|--------|-------|
16-
| ITA | 2025 | Math | Essay | o1-preview | 🚧 In Progress | - |
14+
| Exam | Year | Model | Status | Score | Report |
15+
|------|------|-------|--------|-------|--------|
16+
| ITA | 2025 | o1-preview | 🚧 In Progress | - | [Report](exams/ita_2025/report.md) |
1717

18-
## How to use
19-
So far, with just one exam, you just need to run `python src/resolve.py`. It will process a `exam_path` and it will save the results in the subfolder `solutions` as `.txt` files, one for each question. Make sure to set your env var `OPENAI_API_KEY` in the `.env` file. See section [Convert to LaTeX PDF](#convert-to-latex-pdf) to see how to convert the `.txt` files to a PDF.
18+
### Installation and How to use
2019

21-
## Convert to LaTeX PDF
22-
🚧 In Progress...
20+
```bash
21+
pip install gpt-resolve
22+
```
23+
24+
`gpt-resolve` provides a simple CLI with two main commands: `resolve` for solving exam questions and `compile-solutions` for generating PDFs from the solutions.
25+
26+
### Solve exams
27+
28+
To generate solutions for an exam:
29+
- save the exam images in the exam folder `exam_path`, one question per image file
30+
- run `gpt-resolve resolve -p exam_path` and grab a coffee while it runs.
31+
32+
See `gpt-resolve resolve --help` for more details about solving only a subset of questions or controlling token usage.
33+
34+
35+
### Compile solutions into a single PDF
36+
37+
Once you have the solutions in your exam folder `exam_path`, you can compile them into a single PDF:
38+
- run `gpt-resolve compile-solutions -p exam_path --title "Your Exam Title"`
39+
40+
For that command to work, you'll need a LaTeX distribution in your system. See some guidelines [here](https://www.tug.org/texlive/) (MacTeX for MacOS was used to start this project).
41+
42+
## Troubleshooting
43+
44+
Sometimes, it was observed that the output from `o1-preview` produced invalid LaTeX code when nesting display math environments (such as `\[...\]` and `\begin{align*} ... \end{align*}` together). The current prompt for `o1-preview` adds an instruction to avoid this, which works most of the time. If that happens, you can try to solve the question again by running `gpt-resolve resolve -p exam_path -q <question_number>`, or making more adjustments to the prompt, or fixing the output LaTeX code manually.
2345

2446
## Contributing
2547

‎exams/ita_2025/report.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# ITA 2025 Math Essay Exam Report
2+
3+
## Overview
4+
The Instituto Tecnológico de Aeronáutica (ITA) entrance exam for 2025 consists of two phases:
5+
6+
- **Phase 1**:
7+
- Written exams covering the subjects listed in the Examination Program found in ANNEX D and available on the ITA Vestibular website.
8+
- The exam includes 48 multiple-choice questions, divided into:
9+
- 12 questions in Mathematics
10+
- 12 questions in Physics
11+
- 12 questions in Chemistry
12+
- 12 questions in English
13+
14+
- **Phase 2**:
15+
- Essay exams in Mathematics, Physics, and Chemistry, each consisting of 10 questions.
16+
- An argumentative essay.
17+
- 15 objective questions in Portuguese.
18+
19+
## Results
20+
21+
| Exam | Phase | Section | Type | Model | Status | Score |
22+
|------|-------|---------|------|-------|--------|-------|
23+
| ITA | 2025 | Math | Essay | o1-preview | ✅ Completed | 90%|
24+
| ITA | 2025 | Physics | Essay | o1-preview | 🚧 TODO | - |
25+
| ITA | 2025 | Chemistry | Essay | o1-preview | 🚧 TODO | - |
26+
| ITA | 2025 | Portuguese | Essay | o1-preview | 🚧 TODO | - |
27+
| ITA | 2025 | Math | Multiple Choice | o1-preview | 🚧 TODO | - |
28+
29+
## Comments
30+
31+
`o1-preview` almost got all questions correct in the Math essay exam. The only question it got wrong was question 10, which is a question about spacial geometry, which is a known area of weakness for LLMs. After running that question several times, it can get it correct sometimes, but not always. Since it did not got it correct in the first try, it was considered wrong. Check one of these correct answers [here](exams/ita_2025/math/essays/solutions/q10_solution_rerun.txt).

0 commit comments

Comments
 (0)