|
1 | 1 | # Study-Llama |
2 | 2 |
|
3 | | -LlamaAgents demo with LlamaClassify and LlamaExtract to categorize study notes, extract information from them and perform some basic retrieval (with metadata filtering) over the extracted info. |
| 3 | +Study-Llama is a demo application for organizing, extracting, and searching study notes using LlamaAgents, LlamaClassify, and LlamaExtract. It features a Go-based web frontend and a Python backend for advanced note processing. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +- **Frontend (Go):** |
| 8 | + Serves the web interface, handles user authentication, file uploads, and search requests. Renders pages using HTML templates and manages static assets. |
| 9 | +- **Backend (Python):** |
| 10 | + Provides APIs for classifying notes, extracting information, storing/retrieving data, and performing metadata-filtered vector searches. Handles database operations and vector search. |
| 11 | + |
| 12 | +## How It Works |
| 13 | + |
| 14 | +1. **User Interaction:** |
| 15 | + Users access the web UI to sign in, create categories for their study notes, upload notes, and search among them. |
| 16 | + |
| 17 | +2. **Frontend-to-Backend Communication:** |
| 18 | + The Go server receives requests from the UI and communicates with the Python backend via HTTP API calls. |
| 19 | + - For example, when a user uploads a note, the frontend sends the file and metadata to the backend for processing. |
| 20 | + - Search queries are also forwarded to the python backend for vector search. |
| 21 | + |
| 22 | +3. **Backend Processing:** |
| 23 | + The Python backend (deployed on LlamaCloud as a LlamaAgent) handles: |
| 24 | + - **Classification & Extraction:** |
| 25 | + Uses workflows in `classify_and_extract/workflow.py` to classify notes (with LlamaClassify) and extract structured information (with LlamaExtract). |
| 26 | + - **Database Operations:** |
| 27 | + - **Files:** |
| 28 | + Uploaded files and their metadata (name, category, owner) are stored. |
| 29 | + - **Classification Rules:** |
| 30 | + Custom rules for categorizing notes are stored and retrieved from the database. |
| 31 | + - **Vector Search:** |
| 32 | + Extracted summaries and FAQs are indexed for semantic search and retrieval. |
| 33 | + |
| 34 | +## Features |
| 35 | + |
| 36 | +- Upload and categorize study notes. |
| 37 | +- Extract structured information from notes. |
| 38 | +- Search notes with metadata filters. |
| 39 | +- User authentication and access control. |
| 40 | +- Modern web UI with Go templates. |
| 41 | + |
| 42 | +## Project Structure |
| 43 | + |
| 44 | +- **frontend/** |
| 45 | + - `main.go`: Web server entry point. |
| 46 | + - `handlers/`: HTTP request handlers. |
| 47 | + - `auth/`, `files/`, `rules/`: Business logic and DB operations. |
| 48 | + - `static/`: Images and assets. |
| 49 | + - `templates/`: HTML templates. |
| 50 | +- **src/** |
| 51 | + - `study_llama/`: Python backend modules for classification, extraction, search, and database logic. |
0 commit comments