Spec: Doc Task Magnitude — "Class Information is parsed from the syllabus. This information is saved in vector DB, used as context for everything." Doc tech stack: "Embedded data should have metadata. Notes should be tagged as notes and such so that retrieval can be done cleanly."
Current state
Only note.embedding exists (a 768-dim pgvector column). Parsed syllabus data — parse_test_courses, parse_test_assignments, parse_test_contacts, parse_test_events, parse_test_grading_items, parse_test_concepts — is fully structured but never embedded. So the agent and the generators cannot retrieve "what does the grading policy say" or "which topics does this course cover" through the same path they use for notes.
Scope
- Embed syllabus-derived content (course overview, topic list, grading policy, policies, office hours) with metadata:
{ userId, sourceType: "syllabus", classId, section, chunkType }.
- Establish a single retrieval interface in
lib/ that queries across note and syllabus vectors with metadata filters, so callers ask for "context for class X" rather than reaching into one table.
userId filtering happens in the query, not in post-processing — this is an access-control boundary, not a relevance filter.
- Consumers: AskHamiz, quiz and flashcard generation, resource recommendations, and weak-topic explanations.
- Re-embed on syllabus re-parse; do not leave stale vectors from a superseded upload.
Related
Acceptance criteria
Spec: Doc Task Magnitude — "Class Information is parsed from the syllabus. This information is saved in vector DB, used as context for everything." Doc tech stack: "Embedded data should have metadata. Notes should be tagged as notes and such so that retrieval can be done cleanly."
Current state
Only
note.embeddingexists (a 768-dim pgvector column). Parsed syllabus data —parse_test_courses,parse_test_assignments,parse_test_contacts,parse_test_events,parse_test_grading_items,parse_test_concepts— is fully structured but never embedded. So the agent and the generators cannot retrieve "what does the grading policy say" or "which topics does this course cover" through the same path they use for notes.Scope
{ userId, sourceType: "syllabus", classId, section, chunkType }.lib/that queries across note and syllabus vectors with metadata filters, so callers ask for "context for class X" rather than reaching into one table.userIdfiltering happens in the query, not in post-processing — this is an access-control boundary, not a relevance filter.Related
Acceptance criteria