Docs menu

Tuning What fai Remembers

fai keeps your work as searchable context. Two settings shape how well it does that: the embedding model it uses to understand your files, and how often it captures the files you're actively editing. Good defaults ship out of the box — this page is for when you want to tune them.

Pick a longer-context embedding model

fai turns your captured content into a searchable index using a local embedding model. The model's context window decides how big a slice of a file fai can understand at once. A small-window model has to chop a long file into thousands of tiny fragments — which fills up storage fast and makes recall noisier. A longer-window model keeps each slice large and coherent.

If you're on all-minilm, switch to nomic-embed-text (via Ollama). It has a much larger context window and better recall quality. Pick it when you run fai synthesize. Changing models triggers a one-time re-index of your existing context, so the first session afterward spends a little time catching up.

Advanced: some models report a smaller context than they actually support, and some hosted models report none at all. You can set the real value yourself in a small model-info.json override so fai uses larger, cleaner slices.

Keep capture focused on what's settled

fai watches your rules, plans, and memory files and captures them as they change, so your assistant always knows what you're working on. But a file you're actively editing — a plan you're writing right now — shouldn't be captured on every single save. fai debounces the fast-changing files: it waits until a file has been idle for a couple of minutes before capturing it, so it keeps the version that matters instead of every keystroke. If you keep editing for a long stretch, it still captures periodically so nothing is lost.

Slow-changing files (your rules and skills) are captured immediately, as always. The result: your real work gets remembered, and a busy planning session doesn't crowd it out.

On this page