ENEM is Brazil's national high school exam, and its essay requires an argumentative text on a given social issue. The essay is evaluated based on structure, language, and proposed solutions.
There are 5 competencies:
- Formal Writing Mastery
- Essay Comprehension
- Argument Organization
- Argumentation Techniques
- Intervention Proposal
Each competency is individually scored from 0 to 200, and the scores are summed to calculate the final grade. This app is designed to analyze an ENEM essay, considering the theme, grading it, and providing detailed feedback.
- Essay Evaluation: Input your essay and its theme, and the app will automatically evaluate the essay across five competences.
- LLM Integration: Utilizes OpenAI's language models to perform the evaluation.
- Real-time Feedback: View detailed scores and explanations for each competence instantly after evaluation.
- User-friendly Interface: Built with Streamlit, providing a simple and clean UI.
- Competence 1: Formal Writing Mastery (Grammar, spelling, punctuation, coherence, and vocabulary usage).
- Competence 2: Essay Comprehension (Understanding the essay prompt and effectively using knowledge from different fields).
- Competence 3: Argument Organization (Selecting, organizing, and interpreting information to defend a point of view).
- Competence 4: Argumentation Mechanisms (Using linguistic tools to construct arguments).
- Competence 5: Intervention Proposal (Proposing a solution to the problem discussed in the essay).
- evaluator_frontend.py: File containing the app front-end
- graph_essay_evaluator.png: Image file with the graph of the app
- main.py: Main file with all the logic to run the LLM
- poetry.lock, main.cpython-312.pyc, pyproject.toml: Files from the poetry package
- README.md: Project documentation
-
Clone the repository:
git clone https://github.com/nialefs/essay_evaluator.git cd essay_evaluator
-
Init the poetry project and install dependencies:
poetry init poetry shell poetry install
-
Set up environment variables. Create a
.env
file in the project root with the following contents:OPENAI_API_KEY=your_openai_api_key LANGCHAIN_API_KEY=your_langchain_api_key
-
Run your streamlit app with
streamlit run evaluator_frontend.py
-
Install ngrok following the steps provided in the website and add the link provided by streamlit:
ngrok http http://192.168.1.104:8501
-
A link will be generated and you can share with other people
- python = "^3.12"
- langgraph = "^0.2.35"
- langchain-openai = "^0.2.2"
- langchain-core = "^0.3.10"
- python-dotenv = "^1.0.1"
- streamlit = "^1.39.0"
- OpenAI for GPT-4o-mini.
- Streamlit for front-end.
- LangGraph for the LLM libraries.
- Scoras Academy, and Anderson Amaral for the excellent content provided.