Skip to content

Get a custom English Tutor with your courses for French People

Notifications You must be signed in to change notification settings

CharlemagneBrain/English_Tutor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NexAI English Tutor using RAG

Welcome to NexAI English Tutor, an intelligent tutoring system designed to help students prepare for the TOEFL exam. This application provides personalized exercises and responses based on the materials provided by the students.

Table of Contents

Features

  • Ingestion of Documents: Convert and index course materials and TOEFL example exams in PDF and DOCX formats.
  • Text Extraction and Processing: Convert documents to text, chunk them, and vectorize the content for efficient retrieval.
  • User Interface: Streamlit-based interface for interacting with the tutor, asking questions, and receiving personalized exercises.
  • Exercise Generation: Generate Reading and Writing exercises based on provided documents.
  • OpenAI Integration: Use OpenAI's API to generate responses and exercises.
  • Vector Search: Store and retrieve text embeddings using Qdrant for relevant content retrieval.

Technologies

  • Python for text processing and application development.
  • Streamlit for the user interface.
  • Qdrant for vector database.
  • OpenAI for generating responses and exercises.
  • PyPDF2 and python-docx for document conversion.
  • Sentence Transformers for text vectorization.
  • tiktoken for text tokenization.

Setup

  1. Clone the repository:

    git clone https://github.com/CharlemagneBrain/English_Tutor
    cd nexai-english-tutor
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  3. Install the dependencies:

    pip install -r requirements.txt
  4. Set up environment variables: Create a .env file in the root directory and add your OpenAI API key:

    OPENAI_API_KEY=your_openai_api_key
  5. Download the required models: The model all-MiniLM-L6-v2 will be automatically downloaded to the models_cache folder when you run the application for the first time.

Usage

  1. Run the application:

    streamlit run main.py
  2. Interact with the tutor:

    • Enter your OpenAI API key in the sidebar.
    • Ask questions and receive personalized TOEFL exercises.

Project Structure

nexai-english-tutor/
│
├── main.py # Main application file
├── requirements.txt # Project dependencies
├── models_cache/ # Folder for cached models
├── utils/
    │ ├── model_schema.py # Schema for user and assistant messages
    │ ├── func_tools.py # Utility functions for text processing and interaction with OpenAI
    │ ├── ingest.py # Script for creating embeddings and storing them in Qdrant
│
├── data_connections_utils/ # Utilities for database connections
│ ├── databases_conn.py
│ ├── databases_user_info.py
│
└── README.md # Project documentation

Contributing

Contributions are welcome! Please fork the repository and submit a pull request for any features, bug fixes, or enhancements.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Get a custom English Tutor with your courses for French People

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages