AOSSIE-Org / AOSSIE-Org/EduAid

[FEATURE]: Expose question generation metadata (requested vs generated count) in API responses

Abierto
#463 1 comentario 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
JavaScript
Estrellas
171
Forks
425
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### 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

Image

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.