A Python tool to automatically classify Bangladesh Civil Service (BCS) preliminary exam questions into predefined categories using AI.
- Classifies BCS MCQs into 10 subject categories
- Uses DeepSeek-V3 model for accurate classification
- Processes questions in chunks with automatic retries
- Saves progress periodically to prevent data loss
- Provides detailed classification statistics
- Bengali
- English
- Bangladesh Affairs
- International Affairs
- General Science & Tech
- Computer & IT
- Math Reasoning
- Mental Ability
- Ethics & Good Governance
- Geography
- Python 3.x
- Required packages listed in requirements.txt
- Clone the repository
- Install dependencies:
pip install -r requirements.txt- Create a
.envfile with your Nebius API key:
NEBIUS_API_KEY=your_api_key_here
- Place your input CSV file containing BCS questions in the project directory
- Run the classifier:
python main.pyThe script will:
- Process questions in batches of 25
- Save intermediate results every 5 chunks
- Generate a final CSV with classifications
- Display classification statistics upon completion
The input CSV should contain a "question" column with BCS MCQs.
The script generates:
bcs_with_categories.csv: Final output with classified questionsbcs_with_categories.csv.partial: Intermediate saves during processing
Key parameters can be adjusted in main.py:
CHUNK_SIZE: Number of questions processed per batch (default: 25)MAX_RETRIES: Number of API retry attempts (default: 3)RETRY_DELAY: Seconds between retries (default: 2)