Using Decision Models to Make Small LLMs More Efficient

During the development of our Mr. Crab AI agent framework, we realized that many interactions inside an agentic workflow are actually decision-making tasks with only a limited number of possible outcomes.

Small language models are not necessarily bad at reasoning. More often, they are being asked to perform the wrong task. When we request structured output, they may struggle to consistently produce well-formatted XML, JSON, or YAML responses.

When running AI agents on mini PCs, laptops, ARM-based systems, or machines without powerful GPUs, every generated token matters. Token generation consumes both computation time and resources, which directly impacts responsiveness and efficiency.

Many agentic frameworks repeatedly ask their language model questions such as:

  • Should a tool be executed?
  • Should the workflow continue?
  • Is the generated answer valid?
  • Is more information required?
  • Which module should be executed next?
  • Has the conversation reached its conclusion?

A traditional language model may respond with something like:

{
  "continue": true,
  "reason": "The user is asking for additional information"
}

or even:

{
  "continue": true
}

when the framework only needs the answer:

true

To improve reliability when working with tiny and small language models, we progressively reduced the complexity of the prompts sent to the model.

Instead of asking the model to generate structured XML, JSON, or YAML responses, many internal workflow steps were transformed into simple classification, routing, and yes/no decision tasks.

This naturally led us to explore decision models such as Jev AI and tev1, which are specifically designed for this type of workload. Decision models focus on selecting predefined outcomes rather than generating free-form text, making them particularly well suited for workflow orchestration and routing tasks.

As a result, we are gradually moving from the traditional workflow:

User
  │
  ▼
LLM
 ├─ Search?
 ├─ Call Tool?
 ├─ Retry?
 ├─ Continue?
 └─ Generate Response?

towards a more specialized architecture:

User
  │
  ▼
Decision Model
 ├─ Search?
 ├─ Call Tool?
 ├─ Continue?
 ├─ Retry?
 └─ Escalate?
        │
        ▼
 Small or Large LLM
        │
        ▼
 Generated Response

This approach allows the decision model to handle workflow orchestration while reserving the language model for what it does best: generating natural language responses.

It is important to note that decision models are not replacements for traditional language models. They are complementary components. In environments where decision models are not available, such as some local inference backends, these tasks can still be performed by a standard LLM. However, when a decision model is available, it can significantly reduce the amount of text generation required and improve overall efficiency.

For organizations running local AI workloads, reducing resource consumption is not only about lowering costs. It is also about making advanced AI workflows accessible on ordinary hardware, including mini PCs, laptops, ARM devices, and other resource-constrained systems.

Decision models represent an interesting evolution in agent architecture. Instead of asking a language model to make every workflow decision and generate every response, we can separate decision-making from language generation.

By using the right model for the right task, small LLMs become more reliable, more efficient, and more practical for local AI deployments.

Using GenieX Instead of AnythingLLM on Windows ARM64

As ARM64 users, our goal was to find an alternative to Ollama capable of leveraging the Hexagon NPU built into Qualcomm Snapdragon X processors on Windows ARM64.

During our evaluation, we discovered the AnythingLLM project, which allowed us to run local models and initially appeared to solve our requirements.

While investigating a specific issue together with the AnythingLLM developers, we discovered that AnythingLLM uses GenieX as its inference backend on Windows ARM64. In other words, GenieX is the component actually responsible for running local models.

For our systems, we only need LLM inference capabilities. We do not require RAG, document management, workspaces, a graphical user interface, or a corporate knowledge base. Our requirements are straightforward: run local models, support conversational interactions, provide streaming responses, and expose a well-known API.

Once we understood the underlying architecture, we realized that AnythingLLM was not the solution we were truly looking for. Instead, it helped us discover GenieX, the component that actually met our needs.

As a result, we decided to remove the intermediate layers and integrate directly with GenieX. This approach reduces potential points of failure, lowers memory consumption, simplifies management and maintenance, decreases architectural complexity, and minimizes dependencies when running local AI inference workloads.

AnythingLLM remains an excellent solution for document-centric and RAG-based use cases. However, if your primary objective is to expose local models through an API for integration into your own applications and services, using GenieX directly may be a simpler and more efficient approach.

Run it from command line as geniex serve or as geniex serve --host 0.0.0.0:18181 if you want to make it available through all network interfaces.

MrCrab: Building a Lightweight Agentic AI Framework for Small Models

Introduction Over the past year, agentic AI frameworks have grown rapidly, but many of them are designed with large models in mind. This creates friction when developers want to run smaller models locally, either for cost efficiency, privacy, or speed. After experimenting with OpenClaw, NanoClaw, PicoClaw, and Nanobot, we decided to build our own agent: MrCrab.

Why Small Models Matter

  • Local deployment without dependency on cloud quotas.
  • Lower hardware requirements, making AI accessible to more teams.
  • Faster iteration cycles for debugging and prototyping.
  • Privacy and compliance advantages when data never leaves your infrastructure.

Design Principles of MrCrab

  • Tool Registry: Instead of injecting a massive tool list into every prompt, MrCrab allows the agent to query tools dynamically by keyword.
  • Hybrid Memory: Recent turns are kept in context, older ones are summarized, and full logs are stored in persistent memory for retrieval on demand.
  • Backend Flexibility: MrCrab integrates with Ollama, AnythingLLM, and any provider compatible with the OpenAI API.
  • Lightweight Prompts: Optimized for small models like Gemma4:e2b, Qwen3.5:2B, Granite4:1B.

Implementation Highlights

  • Modular architecture written with simplicity in mind.
  • Debugging and logging designed to be transparent.
  • Easy integration with local or cloud‑based LLMs.

Lessons Learned

  • Large prompts and tool lists overwhelm small models.
  • Timeout handling must be explicit when working with local inference.
  • Summarization should be progressive, not premature.

Future Work

  • Extending MrCrab to real business use cases, such as community management systems.
  • Adding support for multi‑agent collaboration.
  • Exploring long‑context training for small models.

MrCrab is our attempt to make agentic AI practical for small models. By focusing on lightweight prompts, dynamic tool discovery, and hybrid memory, we believe it can bridge the gap between experimental frameworks and production‑ready agents.

MrCrab is written in PHP, without third‑party libraries. This design choice minimizes supply chain risks and ensures that the agent can be deployed in a secure and portable way. Developers can run MrCrab locally with minimal setup, while still benefiting from integrations with Ollama, AnythingLLM, and OpenAI‑compatible APIs.

Merry Christmas!!

🎄🎅🏻 Ho ho hoooo! 🎅🏻🎄

Since our inception this Autumn, our AIs have been hard at work generating hundreds of comics and jokes! Now, we need your help to choose the best ones! 🌟

Pick your favorite images and you might see them printed on mugs and t-shirts! ☕👕

All proceeds will go towards supporting our AI creators, so they can keep making you laugh next year! 😂💫

Visit us!

https://comics.lucentinian.com

Follow us in the social networks of the fediverse (available for Mastodon, BlueSky, Threads, etc.):

https://social.lucentinian.com/profile/comics

Add us to your RSS feeds:

https://comics.lucentinian.com/rss.xml

Support us at:

Do you want to help us by donating some cryptocurrency?

Our comics and jokes go social!

We’re glad to announce that our AI generated comics and jokes website has got an account in our instance of friendica at https://social.lucentinian.com/profile/comics where it will be announcing when a new comic and joke is available.

Comics and Jokes go social

If you’ve moved to BlueSky, Threads, Mastodon, etc., generally speaking, to the fediverse, you’ll be able to find it and follow it. Just look for it by searching the URL https://social.lucentinian.com/profile/comics

Found it in Mastodon official

It’s visible even for all these accounts hosted in private instances like in newsmast.community.

Comics and jokes are visible through the fediverse

If you’re weary of algorithms dictating your reading or viewing choices, consider joining the fediverse! Why wait any longer?

UML bot for Telegram

Our new Telegram bot is ready for work!

Chat with our bot, and get drawn UML charts.

Telegram UML bot example

It uses the plantUML format, so in the example above, the code is:

title Example
actor user
database telegram
database bot
user -> telegram : message with\nPlantUML format
telegram -> bot : message with\nPlantUML format\nplus chat data
bot -> bot : generate diagram
bot -> telegram : push diagram to user
telegram -> user : diagram

How to share it with others in other chat?
Since it is like a picture or photo, select the diagram and forward it to other chat.

Start forwarding a diagram

Look for the chat where you are going to forward the diagram.

Telegram forward destination selection

Find it in Telegram as @umlbot or open this link for the web version of Telegram https://web.telegram.org/#/im?p=@umlbot

Other questions appearing in the comments below regarding ~~