---
title: "Making (Very) Small LLMs Smarter"
description: "A 3B-parameter local model (Qwen2.5-Coder-3B, Q4_K_M) can become a useful coding assistant for an unfamiliar, recent Go library (Nova) when it is given a small, focused RAG context."
url: "https://swe.quest/articles/making-very-small-llms-smarter-de3c73ba9f79b97c"
canonical: "https://www.docker.com/blog/making-small-llms-smarter/"
source: "Docker"
published: "2026-01-16"
difficulty: "medium"
kind: "How-to"
reading_minutes: 17
tags: ["rag","llms","ai-coding","containers","javascript"]
---

# Making (Very) Small LLMs Smarter

A post on [Docker](https://swe.quest/sources/docker.md), published 2026-01-16, 17 min read, How-to. Original: [https://www.docker.com/blog/making-small-llms-smarter/](https://www.docker.com/blog/making-small-llms-smarter/)

## Summary

A 3B-parameter local model (Qwen2.5-Coder-3B, Q4\_K\_M) can become a useful coding assistant for an unfamiliar, recent Go library (Nova) when it is given a small, focused RAG context. Markdown snippet sections are embedded with EmbeddingGemma and stored in an in-memory vector store. Each query retrieves at most 3 snippets above a cosine-similarity threshold of 0.45. Because small models degrade as context grows, conversation history is capped at 2 messages. The agent is built in Node.js with LangchainJS and runs via Docker Model Runner and Docker Compose's models section, with low temperature and a presence penalty to keep output focused.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [RAG & retrieval](https://swe.quest/tags/rag.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [AI for coding](https://swe.quest/tags/ai-coding.md) (AI & ML)
- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)

## Prerequisites

- embeddings basics ([easy posts on RAG & retrieval](https://swe.quest/tags/rag.md?difficulty=easy))
- Docker Compose ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))
- JavaScript/Node.js ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))

## Keywords

Docker Model Runner, Qwen2.5-Coder, LangchainJS, EmbeddingGemma, Docker Compose, Nova

## Related posts

- [CoderForge-Preview: SOTA open dataset for training efficient coding agents](https://swe.quest/articles/coderforge-preview-sota-open-dataset-for-training-efficient-coding-agents-83e1f3c7a7bdb67a.md): Together AI · 2026-02-25 · Hard · 14 min read · Model training, AI for coding, AI agents, Evaluation, LLMs
  CoderForge-Preview is an open dataset of 258K test-verified coding agent trajectories (155K passing) covering 51K tasks across 1,655 repositories from R2E-Gym, SWE-Smith and SWE-Rebench.
- [Build Your Own AI-Driven Code Analysis Chatbot for Developers with the GenAI Stack](https://swe.quest/articles/build-your-own-ai-driven-code-analysis-chatbot-for-developers-with-the-genai-062f35bb279ec41b.md): Docker · 2024-06-06 · Medium · 10 min read · RAG & retrieval, LLMs, AI for coding, Containers, Python
  Code Explorer, a winning Docker AI/ML Hackathon project, is a RAG chatbot that answers questions about a local codebase by parsing source files, chunking them with LangChain's RecursiveCharacterTextSplitter (5000 characters with 500 overlap), and storing embeddings in a Neo4j vector store.
- [Run Claude Code Locally with Docker Model Runner](https://swe.quest/articles/run-claude-code-locally-with-docker-model-runner-73b35fcd9b678964.md): Docker · 2026-01-26 · Medium · 4 min read · AI for coding, Inference & serving, LLMs, Developer tools
  Claude Code can run against local models by pointing its ANTHROPIC\_BASE\_URL environment variable at Docker Model Runner, which exposes an Anthropic-compatible API on localhost:12434.
- [Build a custom RAG AI agent in TypeScript and Jupyter](https://swe.quest/articles/build-a-custom-rag-ai-agent-in-typescript-and-jupyter-fc00c37173b8b56a.md): Deno · 2025-03-18 · Medium · 11 min read · RAG & retrieval, AI agents, TypeScript, LLMs
  A local agentic RAG pipeline built in TypeScript inside a Deno Jupyter notebook, using LangChain and LangGraph with Ollama models.
- [OpenCode with Docker Model Runner for Private AI Coding](https://swe.quest/articles/opencode-with-docker-model-runner-for-private-ai-coding-640e2f146435d737.md): Docker · 2026-01-15 · Medium · 8 min read · AI for coding, Inference & serving, LLMs, Containers
  OpenCode can use locally hosted models by pointing an @ai-sdk/openai-compatible provider in opencode.json at Docker Model Runner's OpenAI-compatible endpoint (localhost:12434/v1, with TCP enabled on Docker Desktop).

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
