Skip to content
mentoor

Building apps on local models

For engineers

Calling local models from code through OpenAI-compatible APIs, getting valid JSON and tool calls from them, local embeddings and connecting coding tools

See where you stand

110 questions across four stages: Understand, Apply, Solve and Judge.

Try 5 questions

Practice items, not counted towards your mastery. No account needed.

Check yourself · 1 of 5

You have an app that uses the OpenAI SDK. You want it to call a model running in Ollama on the same laptop. What is the smallest change?

Choose one answer

Check yourself · 2 of 5

What does constrained decoding do differently from asking a model to "return only JSON"?

Choose one answer

Check yourself · 3 of 5

A local model's reply has an empty tool_calls field, but its content is {"name":"lookup_order","arguments":{"id":4417}}. What is the likely problem?

Choose one answer

Check yourself · 4 of 5

Why can an embedding search find a document about "refund policy" for the query "getting my money back"?

Choose one answer

Check yourself · 5 of 5

An editor assistant on a local model ignores the project's rules file, which is the first part of its prompt. What should you check first?

Choose one answer

Topics

  1. Calling local models through OpenAI-compatible APIs4 min read · Pointing an existing SDK at Ollama, llama-server, LM Studio or vLLM by changing the base URL and model name, and the gaps in compatibility
  2. Forcing valid JSON with grammars and schemas4 min read · Constrained decoding with JSON schemas and GBNF grammars in Ollama, llama.cpp and vLLM, and why it beats asking nicely
  3. Tool calling reliability with local models4 min read · Chat templates and tool parsers, small-model failures such as invented tools and broken arguments, and validating every call
  4. Local embeddings for private document search4 min read · Running embedding models locally, storing vectors next to the app and searching private files without a cloud call
  5. Pointing coding tools at local models4 min read · Using local models in editor assistants and coding agents, the context length they need and where a local model falls short

Start here

110 questions · last verified 2026-12