Skip to content

Future223s/Study-Buddy-Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Study Buddy Agent

Ever find yourself forgetting material you studied or feeling overwhelmed by a whirlwind of notes, videos, and practice questions?

Study Buddy is a Gemini-powered study agent that lets you record, organize, and manage your learning materials, then intelligently recall and summarize them whenever you need a refresher.


How It’s Made

Language: Python

Frontend / GUI

  • PySide6 (Qt) – Creates the user interface for recording notes, capturing screenshots, and interacting with the Study Buddy Agent.

Storage & Retrieval

  • SQLite – Lightweight local database for storing study material and embeddings.
  • SQLAlchemy – Python ORM for easy database management and queries.

Screenshot & Input Capture

  • PyAutoGUI – Captures screenshots and interacts with the user’s screen.
  • Pytesseract – Extracts text from images using OCR (Optical Character Recognition).

Processing & AI

  • Gemini (Generative AI) – Summarizes study material, answers user queries, and acts as the “helper” AI.

Communication & Workflow

  • Signals / Event System (Qt) – Connects frontend actions to backend processing asynchronously.

Additional Features

  • Embedding / Vector Search (FAISS or similar) – For quickly finding related study material.
  • File Handling / Storage – Saving screenshots or notes locally.
  • Background Threads – Keeps the GUI responsive while processing OCR or AI tasks.

What I learned

PROMPTING

This was a huge one, especially since I needed the LLM to return a specially formatted JSON array. I learned the importance of instruction order, how to use <tags> to denote text that should be summarized into different entries, and how to leverage asterisks to emphasize critical constraints and instructions.

Asynchronous Communication

While devising how to handle asynchronous communication, I critically misinterpreted sockets as the go-to solution. It wasn't until much later, while looking for a cleaner, more centralized method of message passing, that I learned fundamentally what they were and realized their capabailites did not align with the task at hand. Sockets are traditionally meant for communication across processes, but I was attempting to leverage them within a single process. They also introduce significant overhead by requiring serialization, context switching, and polling (which meant adding a listening thread even for non-asynchronous components). However by switching to an event-driven Qt signal model using queues and a centralized router class, I significantly reduced overhead, simplified control flow, and improved message passing centrality.

Separation of Concerns:

Clearly separating UI logic, background processing, and data access proved critical. By isolating responsibilities into dedicated modules and agents, each part of the system became easier to debug, extend, and reason about without introducing unintended side effects elsewhere.

Efficiently Querying a Database:

Instead of loading large datasets into memory, I learned to push filtering and selection logic directly into the database layer. Leveraging targeted queries, projections, and indexing resulted in faster retrieval times and lower memory usage—especially when working with embeddings.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages