@nano-step/nano-brain 2026.6.703 → 2026.6.705
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -586,6 +586,28 @@ export NANO_BRAIN_SUMMARIZE_API_KEY="sk-..."
|
|
|
586
586
|
|
|
587
587
|
Large sessions (100K+ tokens) are handled via map-reduce chunking — no session is too large.
|
|
588
588
|
|
|
589
|
+
### Query Preprocessing (Search Quality)
|
|
590
|
+
|
|
591
|
+
When `search.query_preprocessing.enabled: true`, nano-brain uses an LLM to preprocess search queries before execution — translating non-English queries to English, expanding with related terms, and detecting temporal intent. This improves retrieval quality for natural language queries.
|
|
592
|
+
|
|
593
|
+
```yaml
|
|
594
|
+
search:
|
|
595
|
+
bm25_language: "english" # "english" (default) or "simple" (language-agnostic)
|
|
596
|
+
query_preprocessing:
|
|
597
|
+
enabled: false # set to true to activate
|
|
598
|
+
provider_url: "" # OpenAI-compatible endpoint (reuse summarization provider)
|
|
599
|
+
api_key: "" # or set NANO_BRAIN_SEARCH_PREPROCESS_API_KEY
|
|
600
|
+
model: "" # model for query preprocessing
|
|
601
|
+
max_latency_ms: 500 # timeout — falls back to raw query on timeout
|
|
602
|
+
|
|
603
|
+
watcher:
|
|
604
|
+
chunk_overlap: 600 # bytes of overlap between adjacent chunks (default: 600)
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
**How it works:** The preprocessor makes a single LLM call that returns: translated query (if non-English), 2-3 expansion terms, intent classification (keyword/conceptual/temporal), and optional time filter extraction. On timeout or error, the original query passes through unchanged.
|
|
608
|
+
|
|
609
|
+
**Multilingual note:** If you primarily query in English, `nomic-embed-text` is sufficient. For multilingual workspaces, consider switching to `bge-m3` (1024d) — this requires re-embedding all chunks (`POST /api/v1/update`).
|
|
610
|
+
|
|
589
611
|
### Environment Variables
|
|
590
612
|
|
|
591
613
|
| Variable | Description |
|