Symptom: index_status reports embedding_status: "keyword_only", or startup logs show embedding backend unavailable.
Cause: quant cannot reach the embedding backend (Ollama or OpenAI-compatible API).
Fix:
For Ollama:
# Check whether Ollama is running
curl http://localhost:11434/api/tags
# If not running, start it
ollama serve
# Check whether the embedding model is pulled
ollama list
ollama pull nomic-embed-textquant attempts these recovery steps automatically on startup. If recovery fails, it starts in keyword-only mode — search still works, but results rely on FTS5 keyword matching only.
For remote or OpenAI-compatible backends, verify the URL, API key, and network connectivity:
curl -H "Authorization: Bearer $QUANT_EMBED_API_KEY" \
"$QUANT_EMBED_URL/v1/models"Symptom: Startup takes a long time before the MCP server is ready. index_status shows state: "indexing".
Cause: Large number of files, slow embedding backend, or insufficient parallelism.
Steps:
-
Check embedding throughput. The bottleneck is usually the embedding backend, not disk I/O. Run
ollama psto see GPU/CPU utilization. -
Increase workers. If you have spare CPU/memory:
quant mcp --index-workers 8
Default is
cpus/2capped at 8. Higher values help when the embedding backend can handle concurrent requests. -
Increase embed batch size. Sending more chunks per Ollama call reduces round-trip overhead:
quant mcp --embed-batch-size 32
-
Narrow the watch scope. Use
includepatterns to index only what you need:include: - "src/**" - "docs/**/*.md" exclude: - "**/*_test.go"
-
Check for large files. The text extractor skips files over 8 MB. If you have many large files that aren't being indexed, check
index_statusfor the document count.
Symptom: The SQLite database at .index/quant.db is consuming significant disk space.
Cause: Many large files indexed, or many reindex cycles accumulating stale data.
Steps:
-
Check what's indexed. Use the
list_sourcesMCP tool to see which files are in the index. -
Add exclude patterns for generated files, build artifacts, or vendor directories:
exclude: - "node_modules/**" - "vendor/**" - "dist/**" - "**/*.min.js"
-
SQLite vacuum.
quantruns periodic vacuuming automatically to reclaim freed space. If the database is large after many deletes, restartquantto trigger a vacuum cycle.
Symptom: A file exists in the watched directory but doesn't show up in list_sources or search results.
Possible causes and fixes:
-
Unsupported file type. Check docs/file-types.md. Binary files and unknown extensions are silently skipped.
-
Excluded by pattern. Check your
include/excludeconfig. A file must match at least oneincludepattern (if any are set) and must not match anyexcludepattern. -
Excluded by
.gitignore.quantrespects.gitignorefiles. If a file is gitignored, it won't be indexed. -
File too large. The text extractor reads up to 8 MB per file. Larger files are skipped.
-
Index not yet up to date. After adding files,
quantmay still be processing the queue. Checkindex_statusto see the currentstate. -
Embedding failure during indexing. If the embedding backend was unavailable when the file was indexed, the file may be quarantined. Restart
quantwith the embedding backend available to trigger reindexing.
Symptom: Search results don't match the expected files or content.
Steps:
-
Check embedding status. If
embedding_statusin the response is"keyword_only", the embedding backend is unavailable and results are keyword-only. Fix the backend (see above) and restartquant. -
Try a different query shape. The hybrid pipeline weights signals based on query shape. For code identifiers, use exact names (
getUserById). For conceptual questions, use natural language phrases. -
Use
find_similarordrill_downto explore from a relevant result rather than a new query. Once you have one good chunk ID, these tools can surface related content more reliably. -
Use the
pathfilter to restrict results to a specific subtree:search(query="...", path="src/auth/") -
Check
threshold. The default threshold filters out low-confidence results. Lower it to see more candidates:search(query="...", threshold=0.1)
Symptom: PDF files exist in the watch directory but don't appear in list_sources.
Cause: PDFs with no embedded text (scanned) require OCR. quant only attempts OCR if ocrmypdf is installed.
Fix:
For scanned PDFs, install ocrmypdf:
# macOS
brew install ocrmypdf
# Ubuntu/Debian
apt-get install ocrmypdfFor multi-language PDFs:
quant mcp --pdf-ocr-lang eng+fraPDFs that contain embedded text are indexed without OCR.
Symptom: The MCP client cannot start or connect to quant.
Steps:
-
Verify the binary is on PATH:
which quant quant version
-
Check the MCP config path. The
commandin your client's MCP config must resolve to thequantbinary. Use the absolute path if needed:{ "command": "/home/user/.local/bin/quant" } -
Check the watch directory. The
--dirpath in the MCP config must exist and be readable. Use absolute paths to avoid ambiguity. -
For SSE/HTTP transport, verify
quantis running and the port is accessible:curl http://localhost:8080/healthz # Should return: ok
Symptom: After changing --embed-model, search quality doesn't improve or results seem off.
Cause: The index contains embeddings from the previous model. Mixing embeddings from different models produces incorrect similarity scores.
Fix: quant detects model changes automatically on startup and rebuilds the index from scratch. This happens when:
- The model name changes
- The embedding dimensions change
Allow the initial reindexing to complete before querying. Check index_status for progress.
If you need to force a rebuild manually, delete the database:
rm -rf .index/Then restart quant. The index will be rebuilt from the current files.
Symptom: quant consumes more RAM than expected.
Cause: The in-memory HNSW graph scales with the number of indexed chunks. Large corpora with small chunk sizes produce more nodes.
Steps:
-
Increase chunk size to reduce the number of chunks for the same content:
quant mcp --chunk-size 1024
Note: this requires reindexing (delete
.index/first). -
Narrow the index scope with
include/excludepatterns to exclude large directories that aren't needed for search. -
Check system memory limit.
quantsets a Go runtime memory soft limit based on available RAM (25% of system memory, capped at 4 GB). On systems with limited RAM, useincludepatterns to keep the corpus small.