Leaning towards making the table of contents into db items and throwing the whole notes in a vector db.
So the table of contents db will track when you studied what and to make questions for each topic it'll do a vector dB query to grab the relevant stuff.
Idk it'd be cleaner if it was all postgres but I think i'd need more preprocessinf