Implementing AI/UI Collaborative Grading with AI Agent
Case effect
Implementation process
Prerequisites
- Create models as described in Building Question Bank Management with Professional Mode: Answer Sheet Table, Answer Sheet Detail Table.
- Create pages as described in Building Question Bank Management with Professional Mode: Answer Sheet Page.
- Create LLM vendor elements as described in Implementing Answer Generation with AI LLM Functions.
Creating AI agent
An Agent (intelligent agent) possesses autonomous decision-making and task execution capabilities, automatically selecting appropriate tools to complete complex business processes based on user input and contextual information.
An Agent's basic components include system prompts, tools (including application system module functions), and large language models.
JitAi's Agent implementation is natively and deeply integrated with application systems. Beyond supporting MCP service calls and knowledge base configuration, it enables direct manipulation of JitAi application data models, including reading data from frontend pages and controlling component behavior.
In this case, creating an AI Agent involves the following configuration steps: This includes reading current answer sheet details through the page's getVariableValue
function, then directly obtaining the standard answer for questions associated with answer sheet details as scoring references.
For detailed information, see AI Agent.
Creating AI Assistant
An AI Agent functions like a company employee, responsible for completing specific, well-defined tasks. An AI Assistant functions like a project manager or supervisor, coordinating multiple Agents to accomplish complex tasks.
JitAi's AI Assistant includes a dialog interface for direct user interaction.
Creating an AI Assistant in this case involves the following configuration steps:
For detailed information, see AI Assistant.
Configuring Page Events to Work with AI Assistant
Frontend pages interact with AI Assistants through event configuration, enabling human-machine AI/UI collaborative task completion.
In this case, we aim to achieve the following objectives:
- Send an AI message to initiate grading after clicking the
AI Grading
button - Write the score and comments back to the answer sheet form after AI completes its response
The implementation is straightforward—configure page events as follows:
You must first enable the AI Assistant to access the Send AI Message
function.