Posts

Small Models Struggle with Tool Calling

Smaller language models are fast, lightweight, and cost-effective, but they often stumble when it comes to reliable tool calling. Unlike larger models, they frequently output malformed arguments, miss required parameters, or fail entirely when an API throws an error. Fortunately, you can bridge this reliability gap. Here are two practical ways to help small models execute tool calls correctly. 1. Make Tool Errors Verbose and Descriptive When a tool call fails, small models often panic or loop because the error message is cryptic (e.g., `Error 400: Bad Request`). To help the model self-correct, wrap your tool execution layer in descriptive, human-readable error messages. Instead of returning a raw stack trace, feed back a structured explanation of *why* it failed. For example: * **Bad Error:** `KeyError: 'code'` * **Helpful Error:** `Missing required parameter 'code'. The browser_exec tool requires a 'code' argument containing Python code to execute.` Giving the ...

Inference vs Agent

LLM Inference: single execution pass to LLM (Model) AI Agent: Multiple pass to LLM Inference, with memory, tool capabilities, and a goal-driven loop

Pelaporan SPT suami istri gabung NPWP

Seorang istri yang menggabungkan kewajiban perpajakan dengan suami tidak perlu melaporkan SPT. Pelaporan SPT dilakukan menggunakan akun Coretax DJP suami Kondisi 1: Istri bekerja di satu pemberi kerja dan tidak memiliki usaha  1. Pastikan NIK istri sudah terdaftar dalam Data Unit Keluarga (DUK) pada akun Coretax DJP suami dengan status istri sebagai tanggungan. 2. Pemberi kerja istri membuat bukti potong atas penghasilan istri menggunakan NIK istri/NPWP suami 3. Penghasilan dan kredit pajak istri ter-prefill pada SPT suami. Jika tidak ter-prefill, siapkan pdf bukti potong istri (BPA1/BPA2/BP21) yang diterbitkan pemberi kerja. 4. Catat bukti potong istri terprepopulasi pada tabel Kredit Pajak SPT suami 5. Hapus bukti potong istri terprepopulasi untuk dipindahkan ke tabel penghasilan final pada SPT suami Penghasilan dan kredit pajak istri tidak perlu digabung dengan penghasilan neto suami, tetapi cukup dicantumkan pada tabel penghasilan final pada SPT suami saja (...

Local AI models

Here are LLM models for coding assistant, which is possible to run on laptop: qwen2.5-coder:3b deepcoder:1.5b qwen2.5-coder:1.5b  Require more RAM: codellama:7b qwen2.5-coder:7b deepseek-coder:6.7b phi3:3.8b     

Rocky linux 9 cant login

Rocky/Redhat linux 9 cant login from ssh or console (password/key accepted but suddenly logout) 1. Boot into recovery 2. Mount root to /mnt 3. touch /mnt/.autorelabel reboot 4.  or disable selinux in /etc/selinux/config reboot      

Wireless printing from Android phone

Setup printer to connect to wifi ap, and note the printer's ip address Install Moria print service : https://play.google.com/store/apps/details?id=org.mopria.printplugin Add new printer using ip address Test printing a pdf file, choose moria print service Set printer plugin service app's setting to Battery - Unrestricted (required if having issue, page not printed fully) Dont skip step 3) even if your printer already in list Step 2) you can also install HP Print Service plugin              

Reduce PDF file size

We can use ghostscript or ps2pdf:   gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=outputA.pdf input.pdf ps2pdf -dPDFSETTINGS=/screen input.pdf output.pdf   Ghostscript should produce more compatible output.pdf by running twice: gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output-Final.pdf outputA.pdf > Reference