Skip to content

RAG Search

Press Ctrl+K and every trace of work in your workspace gathers into one search box. It finds things by meaning even when the words don’t match exactly, and since embeddings are all computed locally, your code never leaves your machine.

SourceWhat’s indexedExample question
codeText/code files (40+ extensions)“the function that stores passwords”
dbTable, view, index, trigger, routine definitions”the view summing order amounts”
gitCommit messages, diffs”the commit fixing last week’s encoding bug”
chatAI chat conversation content”the deploy method I asked the AI yesterday”
work_eventPanel activity history (open, edit, run query, etc.)“the migration file I opened recently”
docMarkdown / document files”the API authentication procedure doc”

It searches not only code but also work context like “how did I fix that table last week?”

A single query runs along two paths at once.

  1. Vector search — sqlite-vec KNN. Finds things even when the words differ, as long as the meaning is similar.
  2. Keyword search — FTS5 BM25. Strong on exact identifiers and error messages.

The two results are fused with RRF (Reciprocal Rank Fusion) to produce the final ranking. Each side complements what the other missed, so you consistently get better results than with either alone. Paths like deprecated / legacy / .bak are automatically penalized.

To push search quality even higher, you can enable the reranker.

  • A cross-encoder model (bge-reranker-base, multilingual including Korean) compares the top 40 candidates one-to-one against the query and reorders them.
  • Recency weighting — Bonus points for results from the last 30 days; chunks older than a year are decayed.
  • Citation-count weighting — The more often a result is actually cited in AI answers, the higher it ranks.

Code files aren’t simply cut every N lines. With tree-sitter AST parsing, chunks are split at function/class/method boundaries (6 KB by default), so search results come back as complete units of meaning rather than “half a function.”

Supported languagesChunking method
Python · JavaScript · TypeScript · TSXtree-sitter AST
C# · Java · Go · Darttree-sitter AST
Other languages · very large filesLine-based safe fallback

The embedding model runs inside the app based on transformers.js. No API key and no network transmission needed. On first use the model is downloaded once, and afterward it works offline.

ModelDimensionsSizeNotes
multilingual-e5-small384~110 MBDefault, fast
multilingual-e5-base768~280 MBRecommended for Korean — search quality improves noticeably
MiniLM · bge family38490–130 MBLightweight, for English-centric projects
embeddinggemma-300m768~600 MBBeta
  1. Press Ctrl+K to open the unified search box.

  2. Type in natural language.

    the part that stores the SSH password
    the encoding bug I fixed last week
    the commit that added the amount column to the orders table
  3. Narrow the scope with source filter chips (code · db · git · chat · work_event · doc).

  4. Click a result card to expand its content, and press the ▶ button to jump to the original file/location.

AI Chat automatically searches the index with the workspace_search tool before you send a message. It pulls in related code, past conversations, and DB schema as context to improve answer accuracy. No separate action is needed, and cited files are shown in the “Reference:” section below the answer.

  • When a file save or DB schema change is detected, it’s incrementally indexed in the background.
  • Mode selection — Choose eco / balanced / fast in chat settings to balance CPU usage against reflection speed.
  • Status dashboard — In chat settings → the RAG Index Status tab, view the per-source chunk count and the indexing queue in real time.

It automatically respects .gitignore, and the paths below are excluded by default.

node_modules/ .git/ dist/ build/

If you need additional exclusions, list them in the .termeditignore file at the project root (gitignore syntax). Exclude DB objects with glob patterns in the [db] section.

# .termeditignore example
vendor/
*.generated.ts
coverage/
[db]
*.tmp_*
BACKUP_*

When you save patterns, already-indexed chunks for those paths are cleaned up immediately.

When the index bloats in an old workspace, use the dashboard’s cleanup tools.

ToolRole
Orphan ScanRemove leftover chunks of deleted files
Pattern PurgeBulk-remove by path pattern (e.g. dist/**)
Stale CleanupClean up chunks not cited for a long time
Retry failuresReprocess failed indexing items

The index is stored as a per-workspace SQLite file (workspace.sqlite). Moving the workspace folder triggers re-indexing.

The size is modest. Vector data is about 15 MB per 10,000 chunks.

The search box doesn’t open → Use Ctrl+K. If input focus conflicts with another shortcut, click once on an empty area and try again.

No results, or strange ones → Right after first launch, results may be empty until the model finishes loading/downloading. Check progress in the indexing status dashboard. If there’s a lot of noise, exclude unnecessary paths with .termeditignore.

Old results keep coming up → Run Orphan Scan or Stale Cleanup in the index status tab. If you just changed the model, wait until re-indexing completes.

What happens to the existing index if I change the embedding model? → Changing the model automatically deletes the existing index and re-indexes from scratch. This can take a few minutes depending on project size.

Are remote (SSH/SFTP) folders indexed too? → Not yet supported. In a remote project folder, RAG code search is disabled, and the AI explores directly with the file_list_dir + file_read tools.

Code is cited incorrectly in AI answers → Adjust the source filters or exclude noise files with .termeditignore to improve citation quality. Enabling the reranking option pushes less-relevant chunks down.


For how to use this with other features, see the AI Chat, Editor, and DB Client docs.