Ollama tool calling experiment, recorded 2026-10-07

Start Ollama locally. Python 3 with its standard library is sufficient.
Run these commands inside the extracted folder:

ollama pull qwen3:8b
ollama pull nomic-embed-text
python3 tools.py "What is 2 + 2?"
python3 tools.py "Open the uuid collision article and tell me the v4 figure."

The bundled index.json belongs to these 35 frozen notes and the recorded
nomic-embed-text digest in results.json. Do not replace notes without
rebuilding the index with the same embedding model:

python3 rag.py index notes

To record the eight questions and the initial-request description comparison:

python3 reproduce.py

This overwrites responses.json, variants.json and results.json. Copy them first
if you want to retain the recorded run. Timings and outputs may change with
hardware, model builds, cache state and Ollama versions. seed 0 and temperature
0 are comparison settings, not a guarantee of identical output.

responses.json saves complete chat requests and responses, final answers and
console traces. variants.json changes only the search description, then
removes only tools for the arithmetic comparison. The shortened-description
comparison records initial responses, not complete conversations.

results.json saves corpus hashes, index hash, model digests, software and
hardware details and usage differences. It scans the entire frozen corpus for
Charter and Georgia. sources.json contains checked official references and
independently computable birthday thresholds.

The local example rejects unknown tools and malformed arguments, admits only
exact regular txt filenames, excludes symlinks and checks the resolved parent.
It assumes the notes folder is controlled and not concurrently changed by
another process. It stops on transport errors. It provides no approval UI for
side effects and no semantic validation of generated search queries.

The five-turn limit counts model responses, not individual function calls.
On the last turn it returns the stop message without running more tools.
