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.
Six search sources
Section titled “Six search sources”| Source | What’s indexed | Example question |
|---|---|---|
code | Text/code files (40+ extensions) | “the function that stores passwords” |
db | Table, view, index, trigger, routine definitions | ”the view summing order amounts” |
git | Commit messages, diffs | ”the commit fixing last week’s encoding bug” |
chat | AI chat conversation content | ”the deploy method I asked the AI yesterday” |
work_event | Panel activity history (open, edit, run query, etc.) | “the migration file I opened recently” |
doc | Markdown / 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?”
Hybrid search engine
Section titled “Hybrid search engine”A single query runs along two paths at once.
- Vector search — sqlite-vec KNN. Finds things even when the words differ, as long as the meaning is similar.
- 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.
Reranking (opt-in)
Section titled “Reranking (opt-in)”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-aware chunking
Section titled “Code-aware chunking”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 languages | Chunking method |
|---|---|
| Python · JavaScript · TypeScript · TSX | tree-sitter AST |
| C# · Java · Go · Dart | tree-sitter AST |
| Other languages · very large files | Line-based safe fallback |
Local embedding model
Section titled “Local embedding model”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.
| Model | Dimensions | Size | Notes |
|---|---|---|---|
multilingual-e5-small | 384 | ~110 MB | Default, fast |
multilingual-e5-base | 768 | ~280 MB | Recommended for Korean — search quality improves noticeably |
| MiniLM · bge family | 384 | 90–130 MB | Lightweight, for English-centric projects |
embeddinggemma-300m | 768 | ~600 MB | Beta |
How to use
Section titled “How to use”-
Press
Ctrl+Kto open the unified search box. -
Type in natural language.
the part that stores the SSH passwordthe encoding bug I fixed last weekthe commit that added the amount column to the orders table -
Narrow the scope with source filter chips (code · db · git · chat · work_event · doc).
-
Click a result card to expand its content, and press the ▶ button to jump to the original file/location.
Automatic integration with AI Chat
Section titled “Automatic integration with AI Chat”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.
Indexing management
Section titled “Indexing management”Automatic indexing
Section titled “Automatic indexing”- When a file save or DB schema change is detected, it’s incrementally indexed in the background.
- Mode selection — Choose
eco/balanced/fastin 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.
Exclusion patterns
Section titled “Exclusion patterns”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 examplevendor/*.generated.tscoverage/
[db]*.tmp_*BACKUP_*When you save patterns, already-indexed chunks for those paths are cleaned up immediately.
Index cleanup tools
Section titled “Index cleanup tools”When the index bloats in an old workspace, use the dashboard’s cleanup tools.
| Tool | Role |
|---|---|
| Orphan Scan | Remove leftover chunks of deleted files |
| Pattern Purge | Bulk-remove by path pattern (e.g. dist/**) |
| Stale Cleanup | Clean up chunks not cited for a long time |
| Retry failures | Reprocess failed indexing items |
Index location & size
Section titled “Index location & size”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.