AOSSIE-Org / AOSSIE-Org/EduAid
[FEATURE]: Expose question generation metadata (requested vs generated count) in API responses
- Dominant language
- JavaScript
- Stars
- 171
- Forks
- 425
- PR merge metrics
- No merged PRs in 30d
Description
### Feature and its Use Cases
What is the feature?
Currently, question generation endpoints (e.g. /get_mcq) return only the generated questions.
When the input text is insufficient, the model may generate fewer questions than requested or none at all, but this information is not explicitly exposed in the API response.
This feature proposes adding generation metadata to the API response, such as:
1.number of questions requested
2.number of questions actually generated
3.a simple generation status (success / partial / insufficient)
How would users benefit from it?
Frontend applications can provide clear and accurate feedback to users instead of guessing based on array length.
Users can understand whether:
1.their input was insufficient
2.the model partially succeeded
3.the request was fully satisfied
Improves developer experience by making API behavior explicit and predictable.
What scenarios does this feature address?
User requests 10 questions but only 3 can be generated due to short input.
User provides very minimal content and no question can be generated.
Frontend needs to distinguish between:
“something went wrong”
“input needs more detail”
“partial success is expected”
This enhancement keeps model behavior unchanged while improving API clarity.
### Additional Context
Requesting 5 MCQs returns only 2 questions, but the API currently does not expose structured metadata to allow the frontend to differentiate between partial success and failure.
### Code of Conduct
- [x] I have joined the [Discord server](https://discord.gg/hjUhu33uAn) and will post updates there
- [x] I have searched existing issues to avoid duplicates
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.