Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StudyAssistant-AI 📚

Help to understand pdf in simple way to study in Exams. An AI-powered Study Assistant that helps you easily understand, analyze, and extract key information from your PDF textbooks and modules to ace your exams.

Features

📄 PDF Processing & Analysis

  • Upload and process multiple PDF documents
  • Extract text and figure references
  • Maximum file size: 50MB per file
  • Secure local processing of documents

🤖 AI-Powered Question Answering

  • Contextual answers based on PDF content
  • Three response length options: small, medium, large
  • Figure and section references in answers
  • Duplicate question detection

📊 Session Management

  • Persistent question-answer history
  • Export session to formatted PDF
  • Delete individual Q&A entries
  • Usage statistics tracking

🔒 Security & Performance

  • Rate limiting protection
  • Concurrent user support
  • Automatic cleanup of old sessions
  • Secure vector store management

Prerequisites

Ensure you have the following dependencies installed:

# Core dependencies
streamlit
PyPDF2
reportlab
langchain
langchain-google-genai
faiss-cpu
python-dotenv

Installation

  1. Clone the repository:

    git clone <your-repository-url>
    cd study-assistant
  2. Install dependencies:

    pip install -r requirements.txt
  3. Set up environment variables:

    Create a .env file in the project root with:

    GEMINI_API_KEY=your_google_api_key
    VECTOR_STORE_PATH=user_vector_stores
    

Usage

  1. Start the application:

    streamlit run app.py
  2. Open http://localhost:8501 in your web browser.

  3. Upload PDF documents and click "Process PDFs".

  4. Enter questions about the content and select desired answer length.

  5. Review answers and export session to PDF if needed.


Architecture

The application is modularized into several components under the src/ directory:

  • src/config.py: Manages global configuration and environment variables.
  • src/vector_store.py: Contains UserVectorStore for managing FAISS vector stores for multiple users.
  • src/pdf_processor.py: Extracts text and figures from PDFs, creates chunks, and manages PDF exports.
  • src/qa_chain.py: Configures the LangChain QA models and handles question processing.
  • app.py: The main Streamlit entry point.

Security Considerations

  • All PDFs are processed locally.
  • No data is stored permanently.
  • Automatic cleanup of old sessions.
  • Rate limiting protection.
  • Concurrent access management.
  • File size restrictions.

Contributing

  1. Fork the repository.
  2. Create a feature branch.
  3. Commit your changes.
  4. Push to the branch.
  5. Create a Pull Request.

License

This project is licensed under the MIT License.


Acknowledgments

  • Built with Streamlit
  • Powered by Google's Generative AI
  • Uses FAISS for vector storage
  • Utilizes Langchain for document processing

© 2025 Study Assistant - All PDFs are processed locally and securely.

About

An AI-powered Study Assistant that helps you easily understand, analyze, and extract key information from your PDF textbooks and modules to ace your exams.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages