Learning Rust gently with Mellum2-12B-A2.5B-Instruct and Mini Me (Part 2)
Teach your local Rust tutor new tricks: Mini Me v0.8.0 adds BM25 document search over the Ratatui docs, plus bash, edit tools and rust-analyzer LSP support.

A few more tools to improve our little teacher
I have a short train trip coming up (and I probably won't have wifi). This upcoming event triggered the preparation and release of Mini Me v0.8.0. I wanted a simple (but effective) document search function that would be a "builtin" tool rather than just using a plain grep.
My goal was the following: provide documentation to my agent to enrich its knowledge. For example, I'm interested in a particular Rust framework, Ratatui, which makes it easier to build TUIs in Rust.
So I added a new tool: search_docs (more info here: explanation/document-search.md) which relies on BM25. It's a ranking function that assigns a score to each document for a given query. It's lexical search: it relies on the terms present in the documents, not on their meaning as represented by embeddings.
You need Mini Me v0.8.0 or later to use the new
search_docsbuiltin tool.
A few changes in our little teacher's settings
I enabled these tools:
bashTool: true
editTools: true
editToolsbecause the agent will need to read the documentationbashToolbecause I'd like to make the little teacher work a bit harder
Then I enabled LSP support for Rust with rust-analyzer (we'll see a bit further down how I use it):
lsp:
servers:
- name: rust
command: rust-analyzer
extensions: [".rs"]
Of course, you need a complete Rust toolchain. But if you use the development environment described in the previous blog post "Learning Rust gently with Mellum2-12B-A2.5B-Instruct and Mini Me (Part 1)", and you start it with the commands below, you'll have all the tools you need:
sbx env create --force
zed --new "ssh://zed-mellum.sbx$PWD"
I updated the
sbxenv.yamlfile to take the newly released features into account.
Warning: these settings work with Mellum2-12B-A2.5B-Instruct-GGUF-Q8_0, and they probably won't work the same way (or even at all) with other models. That's why, when you look for and select a model, you'll always need an adaptation period (more or less long) to find the right settings and check whether the model will work for the use case you have in mind.
Next, I added documentation (in the ./docs folder) about the Ratatui library, which makes it easier to build TUIs in Rust. This documentation is a set of markdown files to help get started with Ratatui, which I asked Claude to generate.
Finally, I added the section below to agent.yaml, to enable the new search_docs tool:
docSearch:
autoSearchDocs: true
dirs: [docs]
extensions: [.md]
maxFileSize: 1MB
And we're ready to check whether our little teacher has gained a few extra skills.
Let's ask a bit more of our little teacher
I then launched Mini Me in TUI mode: mm --tui, and asked it the following:
> search how to ceate a rust project with ratatui, then initialize a hello-ratatui cli project
So, the agent did trigger the search_docs tool, found the information and generated a new lesson explaining how to initialize the project, but didn't create anything on disk. So I asked this:
> follow these instructions to create the program
And this time the agent used its own lesson to create the project. I was then able to check that the code worked by running cargo run in the project folder.

My next test was to ask the agent to use rust-analyzer (Rust's LSP tool) to give me information about the source code:
> use rust-analyzer to explain the hello-ratatui
And it was conclusive, the agent was able to generate a report about the source code:

Of course, since Zed Editor has an ACP client, you can use our little teacher with a GUI:

And there you go! "TUI development in Rust for dummies" on the train for me, even without wifi. See you soon for new adventures.
By the way, you'll find a guide to the keyboard shortcuts of the Mini Me TUI here: Keyboard shortcuts of the window (
mm -tui)
Source code: https://rickub.com/bots-garden/model-mellum
Written by
Keep reading
Learning Rust gently with Mellum2-12B-A2.5B-Instruct and Mini Me (Part 1)
Learning Rust from scratch with a small local coding model: Mini Me and Mellum2-12B-A2.5B as a teacher for a first program, structs, mutability and methods.

Building a team of Mini Mes with ACP
Build a team of local Mini Me agents talking over ACP: a coordinator that routes your Go and Rust questions to two documentation specialists.

One day, one feature: Mini Me's built-in tools and declared tools
How Mini Me runs tools for a local model: the agent loop, the built-in tools led by bash, and how to declare your own tools in a few lines of YAML.

No comments yet. Be the first to comment!