Thesis Generator: Automated Academic Writing with LLMs (open source)
View on GitHub:
github.com/sukhrobyangibaev/bmi_first_draft
Thesis Generator is an automated tool designed to help students and developers turn their source code into a well-structured academic thesis draft. By leveraging Large Language Models (LLMs) via OpenAI-compatible APIs (including Google Gemini), it analyzes your project files and generates a comprehensive thesis in English—with optional translation to Russian or Uzbek.
Just drop your code into a folder, configure your .env, and run the script. The tool produces a detailed thesis plan and a full main text draft, following academic standards and customizable structure.
Key Features
- Automated Thesis Drafting: Analyzes your source code and generates a complete thesis draft, including Introduction, Systematic Analysis, Development, Conclusion, References, and Appendix.
- LLM-Powered Content: Uses OpenAI-compatible APIs (supports Google Gemini) for high-quality, context-aware academic writing.
- Customizable Structure: Follows a proven academic template, with sections for analysis, design, implementation, and more.
- Multi-language Support: Optionally translates the generated thesis into Russian or Uzbek, maintaining academic tone and formatting.
- Easy Configuration: Environment variables control API keys, model selection, translation options, and project file locations.
- Progress Tracking: Uses TQDM for real-time progress bars during generation and translation.
Technical Architecture
- Backend: Written in Python 3.8+, using
openai
,pydantic
,python-dotenv
, andtqdm
for API integration, data validation, configuration, and progress reporting. - API Integration: Works with any OpenAI-compatible API endpoint (including Google Gemini), supporting both free and paid accounts with rate limit handling.
- File Handling: Reads all source code files from a specified directory, ignoring dependencies and virtual environments.
- Output: Generates thesis drafts in EN (English) and, if enabled,
draft/RU/
or UZ for translations.
Example Workflow
- Prepare your project:
Place your main source code files in the project_files directory. - Configure the environment:
Copy .env.example to .env and fill in your API key and preferences. - Install dependencies:
pip install -r requirements.txt
- Run the generator:
python first_draft.py
- Review your draft:
Find your thesis plan and main text in the EN folder. If translation is enabled, checkdraft/RU/
or UZ.
Technologies Used
- Python 3.8+
- OpenAI / Google Gemini API
- Pydantic (for data models)
- dotenv (for configuration)
- TQDM (for progress bars)
This project shows how LLMs can streamline academic writing, making it easier for students and developers to document their work in a professional, structured format. Perfect for graduation theses, technical reports, or any project requiring formal documentation.