Mosaik
Download

Docs

Exact tools.

Six small tools for the questions language models get wrong, and the Python sandbox.

Why they exist

Language models predict text. That's great for writing and poor for anything with exactly one right answer and no pattern to predict it from: long sums, counting the letters in a word, the number of days between two dates, unit conversions, random picks. So every model that can use tools gets six small ones that work these out on your computer.

They're in every chat and in quick-ask. They take milliseconds and cost nothing. The model decides when to use them, and the answer's work line shows each one: Calculated, Counted, Worked out 3 results. Click it to see what went in and what came out.

An answer that used the calculator, with the work line open, dark theme An answer that used the calculator, with the work line open, light theme

The six tools

CalculatorExact arithmetic. Integers of any size, fractions that stay fractions (0.1 + 0.2 is 0.3), comparisons like 9.11 > 9.9, roots, logarithms, trigonometry, primes, factorising and combinatorics.
Text counterCharacters, letters, words, sentences and lines. How often a letter or phrase appears and where. Spelling a word out, reversing it, checking palindromes.
Date and timeToday's date and time, the days between two dates (business days too), adding weeks or months, the weekday of a date, and converting between time zones.
Unit converterLength, weight, volume (US and imperial), area, time, speed, data (GB and GiB), energy, power, pressure, angle, frequency and temperature, from exact definitions.
Random picksNumbers, choices, shuffles, coin flips, dice and tokens, from Windows' own random source.
PythonAnything else that needs computing, in a locked-down Python (below).

Models that can't use tools answer the way they always would. The model browser marks them No tools.

The Python sandbox

When the model runs Python, Mosaik starts a separate Python process for it, in an empty temporary folder, with a time limit (10 seconds by default, 30 at most) and a 512 MB memory ceiling. Before the code runs, it's checked:

  • It can only import maths, text, date, data-structure and hashing modules.
  • It has no way to open files, reach the network or start other programs.
  • The usual back doors out of a restricted Python, such as eval, exec and names starting with an underscore, are refused.

Think of it as a calculator with loops. It exists so a model can crunch numbers without going anywhere near your files or the internet.