bulkAddQuestionsToTest
ChatGPTAdds a list of questions (by ID) to a test. Use this after searchQuestionBank, getTestBankCategoryQuestions, or searchTestBank to add the teacher's selected questions.
copyGenerationToTest
ChatGPTCopy selected questions from a saved, paid generation to a teacher-selected test after confirmation. Use source_id and question_ids returned by generateReadyBank. Existing questions are not replaced by default.
createTest
ChatGPTCreates a new empty test in the teacher's active organization. Returns a test_id which can then be used with uploadJsonQuestions to add questions. Always confirm the test name with the teacher before creating.
generateReadyBank
ChatGPTSpend credits and save a Ready Bank generation after the teacher confirms the plan and cost. Use a unique request_id and reuse it only to recover the same request. Returns a saved creation; does not directly add questions to a test.
getCredits
ChatGPTReturns the current AI credit balance for the organization.
getFilterValues
ChatGPTBrowse the organization's own question bank filters and counts. Use getReadyBankHierarchy for the paid Ready Question Bank.
getOrganizationDetails
ChatGPTReturns the org name, description, logo, and exam focus tags.
getOrganizationsWithAccess
ChatGPTReturns all organizations where the teacher has admin or editor access.
getReadyBankHierarchy
ChatGPTRead the paid Ready Bank category's subject/chapter/topic counts. Does not reveal paid question content.
getTeacherProfile
ChatGPTReturns the teacher's profile including current active org, all orgs they have access to, and onboarding status. Call this at the start of every conversation to establish org context.
getTestBankCategories
ChatGPTReturns all top-level categories in the PrepLab centralized test bank (e.g. JEE, NEET, UPSC). No org_id needed. Always call this first to let the teacher pick a category before browsing or searching the test bank.
getTestDetails
ChatGPTReturns the full details of a test — name, duration, instructions, default marks, negative marks, test series, question count, and order. Use this when the teacher asks about a specific test's settings or before editing a test.
getTestQuestions
ChatGPTReturns paginated questions for a specific test, in order (based on the test's order array). Optionally pass query to text-search within the test's questions. Returns question_text, options, correct_option, solution, marks, negative_marks, difficulty, subject, chapter, topic.
getTestSeries
ChatGPTReturns all test series defined in the organization. Use this to resolve a series name to its ID.
getTests
ChatGPTReturns a paginated list of tests. Supports search by name and filtering by test series.
getTestsBySeries
ChatGPTReturns all tests that belong to a specific test series ID.
getUserGroup
ChatGPTReturns details of a single user group (course/batch) by its ID.
getUserGroups
ChatGPTReturns all user groups (courses/batches) in the organization.
previewReadyBankConcepts
ChatGPTPreview matching question counts and cost for a concept. No paid question content is returned.
previewReadyBankTypes
ChatGPTCheck whether the exact question-type mix is available within the selected syllabus or concept before spending credits. Returns selected_count and available_by_type, not paid questions or a price quote. name and request_id are required by the backend preview schema but this operation does not save or charge anything. Reuse the exact selection for generation after reviewing cost and obtaining confirmation.
searchQuestionBank
ChatGPTSearch only the organization's own question bank, using search_text, semantic_query or flat subject/chapter/topic filters. Ready Bank is a separate paid workflow.
switchOrganization
ChatGPTSwitches the teacher's active organization context. Call this when the teacher wants to work in a different org.
unifiedDeleteQuestion
ChatGPTPermanently deletes a question from the centralized question bank, removing it from all tests it was part of. Always confirm with the teacher — this cannot be undone.
unifiedUpdateQuestion
ChatGPTUpdates a question in the centralized bank. Changes reflect everywhere it is used. Partial updates supported — pass only fields to change in new_data. Editable fields: question_text, options, correct_option, solution, marks, negative_marks, subject, chapter, topic, difficulty, status, labels.
uploadJsonQuestions
ChatGPTUploads an array of questions to a test. Use this to push GPT-generated questions into a test after teacher review. Supports a flat questions array or JEE-style sections format. Always confirm with the teacher before calling.