qmd/test
Tobi Lutke ad38c1f698
feat: add intent parameter for query disambiguation
Add optional `intent` parameter that steers query expansion, reranking,
chunk selection, and snippet extraction without searching on its own.

When a query like "performance" is ambiguous (web-perf vs team health vs
fitness), intent provides background context that disambiguates results
across all pipeline stages:

- expandQuery: includes intent in LLM prompt ("Query intent: {intent}")
- rerank: prepends intent to rerank query for Qwen3-Reranker
- chunk selection: intent terms scored at 0.5x weight vs query terms
- snippet extraction: intent terms scored at 0.3x weight
- strong-signal bypass: disabled when intent provided

Available via CLI (--intent flag or intent: line in query documents),
MCP (intent field on query tool), and programmatic API.

Adapted from PR #180 (thanks @vyalamar).
2026-03-07 19:27:29 -04:00
..
eval-docs Add 6 synthetic evaluation documents 2025-12-21 13:10:35 -04:00
cli.test.ts Merge pull request #228 from amsminn/fix-empty-results-format 2026-03-07 14:25:16 -04:00
collections-config.test.ts fix(test): reset currentIndexName between test files 2026-02-18 15:53:58 -04:00
Containerfile test: restructure container smoke tests for interactive use 2026-02-22 11:09:36 -04:00
eval-bm25.test.ts test: move all tests to flat test/ directory 2026-02-15 21:37:47 -04:00
eval-harness.ts Fix qmd embed crash and resolve all TypeScript errors 2025-12-31 13:32:30 -04:00
eval.test.ts test: move all tests to flat test/ directory 2026-02-15 21:37:47 -04:00
formatter.test.ts test: move all tests to flat test/ directory 2026-02-15 21:37:47 -04:00
intent.test.ts feat: add intent parameter for query disambiguation 2026-03-07 19:27:29 -04:00
llm.test.ts perf(rerank): cap parallelism, deduplicate chunks, cache by content 2026-03-07 15:57:36 -04:00
mcp.test.ts refactor: replace bash wrapper with standard #!/usr/bin/env node shebang 2026-02-22 11:09:36 -04:00
multi-collection-filter.test.ts refactor: replace bash wrapper with standard #!/usr/bin/env node shebang 2026-02-22 11:09:36 -04:00
rrf-trace.test.ts feat(query): add --explain score traces for hybrid search 2026-03-07 14:35:10 -04:00
smoke-install.sh test: restructure container smoke tests for interactive use 2026-02-22 11:09:36 -04:00
store-paths.test.ts test: move all tests to flat test/ directory 2026-02-15 21:37:47 -04:00
store.helpers.unit.test.ts fix(store): handle emoji-only filenames in handelize (#302) 2026-03-06 14:24:24 +08:00
store.test.ts perf(rerank): cap parallelism, deduplicate chunks, cache by content 2026-03-07 15:57:36 -04:00
structured-search.test.ts Document query grammar and add skill helpers 2026-02-22 13:36:08 -04:00