## 3 Materials and Methods
### Phase 4: Integration with the Virtual Assistant  
This phase focused on operationalizing the functionality of the system through a complete software architecture that connects users with the educational assistant. This was accomplished by defining a formal application interface, implementing service orchestration via workflow automation, integrating the retrieval and generation pipeline into a chatbot component, and deploying a fully interactive front-end interface based on modern web technologies. The system was named NOVA (short for Innovative Assistant), as it represents a next-generation approach to virtual educational support.  
The first step involved the design of a RESTful API using FastAPI [37]. Each endpoint serves as a high-level interface, encapsulating authentication through JSON Web Tokens (JWT) [38], parameter validation, and coordination of semantic retrieval and generative logic. Key endpoints such as _/qa_, _/quiz_, and _/practice_ accept a JSON payload that includes the instructional unit, the topic, and optional user-defined parameters. Once validated, each request is assigned a unique trace identifier and redirected to a corresponding webhook on the n8n platform [39]. During the same time, the server logs performance metrics and stores the complete transaction in PostgreSQL, ensuring complete traceability.  
Each webhook represents a workflow associated with a specific assistant function. Upon receiving a request, the workflow initiates a semantic query in Qdrant, filtering documents by unit, topic, and, in some cases, practice metadata. The top five fragments are retrieved and injected into the prompt, which is sent to the selected Large Language Model. The model response is post-processed and formatted as plain text for question answering, JSON for quizzes or guides, and returned to the front end. The same workflow logs execution time and stores all inputs and outputs for further analysis. This architecture decouples client and server logic, allows horizontal scaling, and enables educators to modify assistant behavior without touching any backend code.  
The front-end system was developed using Next.js. Authentication and access control are managed through a security model based on JWT, which ensures that users can only access content permitted by their roles. As shown in Figure 6, the login page serves as the authentication gateway for both students and instructors. Unauthorized users are redirected to a custom access-denied view, reinforcing secure navigation across the application.  
Figure 5: Workflow for the generation of practical guides. The assistant processes filtered content tagged as lab exercises, producing a scenario, functional requirements, and a rubric aligned with course themes. Red asterisks indicate required object-type variables for the proper functioning of the workflow node, for example, “Model.” Each node must be connected to an object of the type requested (e.g., GPT-4o-mini), and it cannot be connected to an incompatible object.  
Once authenticated, instructors gain access to dashboards where they can upload instructional materials, inspect stored content fragments, and monitor system usage metrics. Figure 7 presents the interface for uploading content to the assistant's knowledge base. In contrast, students interact directly with the assistant by submitting questions, generating quizzes, or creating guided practice assignments through a streamlined interface.