Skip to content

Replace lessonId with course/unit/lesson parameters - #16

Open
charlesdesmond wants to merge 1 commit into
mainfrom
course-unit-lesson-params
Open

Replace lessonId with course/unit/lesson parameters#16
charlesdesmond wants to merge 1 commit into
mainfrom
course-unit-lesson-params

Conversation

@charlesdesmond

Copy link
Copy Markdown
Collaborator

Summary

  • Updated POST /api/generate-questions to accept course, unit, and lesson form fields instead of a single lessonId
  • ChromaDB now uses a composite slug key ({course}-{unit}-{lesson}) for namespacing, preventing collisions across the course hierarchy
  • LLM prompt now includes the full course/unit/lesson context so the model generates more relevant questions

Test plan

  • Send a request with course, unit, lesson fields and a file or slidesUrl — confirm questions are returned
  • Verify the ChromaDB key is slugified correctly (e.g. computer-science-intro-to-python-variables-and-data-types)
  • Update any frontend FormData calls that previously sent lessonId to send course, unit, lesson instead

The endpoint and LLM prompt now take course, unit, and lesson separately
instead of a single lessonId string. ChromaDB uses a composite slug key
(course-unit-lesson) to avoid collisions across the hierarchy, and the
prompt gives the model richer context for generating relevant questions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant