Draft
Conversation
The validateSemanticQuery regex rejected any hyphen followed by a word character, blocking common compound words (real-time, multi-client, kebab-case identifiers like better-sqlite3). Tighten the check to only match negation syntax at token boundaries (start of string or after whitespace). See tobi#383 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On CPU-only servers, LLM reranking (0.6B model) takes ~2s per document, making the query tool unusable with timeouts under 30s. This commit: - Adds `skipRerank` boolean parameter to the MCP `query` tool schema. When true, returns results scored by RRF fusion only (no LLM rerank). - Passes `candidateLimit` through to structuredSearch (was declared in schema but never forwarded to the store). Use case: automated RAG hooks with 1-2s timeouts on VPS without GPU. With skipRerank=true, queries complete in 30-50ms instead of 30-40s.
When OLLAMA_EMBED_URL is set, all embedding and tokenization operations use the remote Ollama HTTP API instead of node-llama-cpp. This enables QMD on platforms without local GPU/Vulkan support (ARM64 VPS, Docker containers, CI runners) and with remote Ollama instances (Tailscale, LAN, Docker networks). Changes: - Add ollamaEmbed() and ollamaEmbedBatch() helper functions using Ollama /api/embed endpoint - Patch getEmbedding() to bypass node-llama-cpp when OLLAMA_EMBED_URL is set - Patch generateEmbeddings() with dedicated Ollama fast-path that skips withLLMSessionForLlm entirely - Patch expandQuery() to skip LLM-based HYDE query expansion (passes raw query as vector search) - Patch chunkDocumentByTokens() to use char-based estimation instead of local tokenizer - Patch vsearch and query CLI commands to skip withLLMSession wrapper Environment variables: OLLAMA_EMBED_URL - Ollama server URL (e.g. http://your-ollama:11434) OLLAMA_EMBED_MODEL - Model name (default: nomic-embed-text) Tested on ARM64 Oracle Cloud VPS with qwen3-embedding:0.6b on remote Ollama via Tailscale. 7,100+ documents indexed successfully.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Context
This branch starts from upstream main because the old local install was still on the c85889d lineage and missed already-merged fixes like the collection filter and launcher/runtime patches.
Verification
bunx vitest run test/store.helpers.unit.test.ts test/structured-search.test.tsbunx vitest run test/cli.test.ts -t "parallel startup regression"bunx tsc -p tsconfig.build.json --noEmitNotes
test/mcp.test.tswas not used as a verification gate here because it triggers a large model download path unrelated to the carried changes.