OAx · 2025
Small-model tool calling for LINE OA
A local Qwen3 4B model routes Thai customer requests into store actions, using structured arguments and saved conversation state.
Project developer
- TypeScript
- LangChain
- Ollama
- ElysiaJS
- MongoDB
- Redis
- React
- LINE LIFF
OAx is an earlier LINE Official Account project for a small store. I include it here for the local-model workflow, tool calling, and evaluation behind the chat interface.
Turning a message into an action
A customer could ask about products, place an order, change an address or item, cancel an order, or report a problem. Those requests needed to become specific store actions with the right arguments.
The public evaluation code uses Qwen3 4B through Ollama, LangChain tools, and structured schemas. It separates the call that selects an action from the call that extracts its arguments. Redis preserves conversation state between messages.
Evaluating tool behavior
The repository includes Thai request scenarios with an expected action. The evaluation records which tool the model selected and compares it with that expectation. The project poster also shows example prompts, expected and returned actions, and response times.
This gave the project a concrete way to inspect routing and structured output. The published examples are a limited evaluation of the project’s requests, rather than a general benchmark of the model.
The surrounding system
The system connected LINE webhooks, a store interface built with LIFF, backend services, a database, and a model API. Receipt OCR was another part of the inventory workflow. The poster documents that pipeline separately from the local-model chat workflow.
The project received an NSC 2025 Round 2 grant. The poster, presentation photo, and grant certificate are included below, and the source repository is public.


