How vivekrathihacked/gen-ai works
Project type and purpose
• This is a Python‑based educational AI toolkit. It contains Jupyter notebooks (“base_class” + “class5.ipynb”) for hands‑on learning, a small custom library (“melvis”) for vector/DB operations, and benchmarking scripts under “online_learining.” A demo virtual environment (“demo_project”) shows how to install/run the code.
Main components
a. Presentation layer
• Jupyter notebooks in “base_class” and root (class1.ipynb–class5.ipynb) – interactive learning materials
• CLI scripts in “online_learining” (benchmark_code.py, test.py) – test harness and performance benchmarks
b. Application/library layer
• base_class/*.py – foundational Python classes and loop examples
• melvis/db.py – SQLite access layer (reads/writes test_db.db)
• melvis/vector.py – vector creation and similarity logic
c. Data storage
• melvis/test_db.db – SQLite file housing sample data/embeddings
d. Runtime environment
• demo_project/ – full Python 3.9 virtualenv showing dependencies (pip, setuptools, etc.)
Relationships & data flow
• Notebooks import base_class modules and melvis library
• melvis/db.py ↔ test_db.db: CRUD operations on embedding records
• melvis/vector.py processes raw data into vectors, then passes them to db.py for storage
• online_learining scripts import melvis and base_class to load data, run benchmarks, and output results
• All code executes within the demo_project virtualenv
Architectural patterns & design principles
• Layered architecture:
• Presentation (notebooks & scripts)
• Business logic (base_class + melvis modules)
• Data access (SQLite)
• Modular library design: clear separation of concerns (classes vs. vector logic vs. DB)
• Reproducible environment via virtualenv
Final checklist
– Clear, concise labels on each component
– Annotations for critical dependencies (e.g., “requires pandas,” “uses sqlite3”)