Set up the decision model and semantic search
For the person who set up Stuga.
Both are in Settings → This node → AI providers. You need access to Settings → This node and an API key (a service’s access code). Writing and answering come from each person’s own AI tool, such as Claude Desktop.
Set up the decision model
Section titled “Set up the decision model”The decision model checks what AI tools save against your pages, and ranks search results. Every Stuga needs one. Until it is set up, nothing an AI saves is checked, every page that cites a changed page is marked Needs checking, search results keep their plain order, and the library shows Set up the decision model to the people who look after Stuga.
- Open Settings → This node → AI providers.
- Under Decision model, choose Set up.
- Choose a Service:
- TypeSafe, the default, for its Jev model.
- OpenRouter, for a decision model it offers.
- Something else…, for a decision model you run yourself. Enter its Base URL under Advanced.
- Enter the service’s API key.
- Choose a Model from the service’s list.
- Choose Save.
The decision model has no switch. You can change it with Edit, but not remove it.
Set up semantic search
Section titled “Set up semantic search”Semantic search finds documents by meaning, even when the words differ, in the search box and for AI tools. It’s optional: search by words works without it.
-
In Settings → This node → AI providers, under Semantic search, choose Set up.
-
Choose a Service, and enter its API key. For Ollama on the same Mac, choose Ollama (local); it needs no key.
-
Choose a Model that meets the requirement shown below it.
If Ollama has none yet, the page suggests one to download, such as embeddinggemma:300m. Download it in Ollama and come back to the page: the list shows it.
-
Choose Connect.
Stuga prepares documents for search in the background. Documents hidden from search are left out. Search by meaning becomes available as documents are prepared.
Choose how close a match must be
Section titled “Choose how close a match must be”Search strictness sets how close to a search a match by meaning must be to show in the search box. Matches by words always show.
- In Settings → This node → AI providers, under Semantic search, choose Edit, then Advanced.
- Under Search strictness, choose Strict, Balanced, Loose or No limit. The line below says what each one shows.
- Choose Save.
Balanced is the default. Choose Strict if search shows unrelated documents, or Loose if it misses documents that say the same thing in other words. The change applies to the next search.
Each AI places text differently, so Stuga measures the one you chose when you save it, using sample texts, and sets each level to suit it. That takes seconds to minutes. Until it is done, no match by meaning is left out. If Couldn’t measure appears, Stuga tries again by itself; Measure again tries now.
AI tools aren’t limited by this setting: they take the closest passages, and the decision model picks the relevant ones.
Check, change or turn off
Section titled “Check, change or turn off”Choose Edit, then Test. Answered means the service works; otherwise the page says what failed.
The switch beside Semantic search turns it off while keeping its settings. Remove forgets it. Changing the AI it uses asks you to confirm with Save and re-index: search matches words until that finishes, and Stuga measures the new AI for Search strictness.
Good to know
Section titled “Good to know”Each service receives the text it works on. The decision model receives each search, by a person or an AI tool, with the passages found for it; each point an AI saves, and each AI change that waits on a verified page, with the sentences of your pages beside it; and the text of a page that other pages cite when it changes. Semantic search receives the text of every document not hidden from search, and each search. With Ollama on the same Mac, that text stays there.
If Ollama can’t be reached, check that it is running and that Ollama address is correct.
- What Stuga sends and stores — check what each service receives.
- Search your workspace — try search by meaning.
- Connect Claude Desktop — connect your own AI tool.
More detail: Configuration on GitHub.