feat(recall): relax long natural-language queries with a required/optional match plan - #128
Merged
Merged
Conversation
…ional match plan
A query longer than eight words was silently truncated and every remaining
word had to match with AND, so the sentences people actually type ("지난번
로컬 소스를 실제 서비스에 연결하고 정상 동작까지 확인한 방법") returned nothing
while their keywords hit.
Compile every query into one MatchPlan shared by the chat index, the chat
JSONL scan and memory search: nine words or more keep symbols, versions and
proper nouns as required AND terms and let the rest match by a ceil(n/2)
quota; eight words or fewer keep the old all-AND behaviour. A minimal
stopword list (그/이/저/것/문제/방법) applies at any length. The plan is the
final predicate at all three index sites (relevance recheck, top-up sweep,
recent row filter), so index and scan stay equivalent; recent fetches a
larger pool before the predicate and cuts at limit+1. Memory recompiles the
plan inside collect() so the per-group relaxed retry from #125 still runs.
chat search gains --synonyms (default off) to apply the Korean stem and
synonym expansion memory already uses. Synonym seeds for 도그푸딩/재시작/
검증/소스/플러그인 and the 인지 ending are added.
Golden set: a synthetic corpus pins D3/P2/R2 with n>=1 on chat and memory,
the LSP and Korean-stem regressions, and index/scan parity for required=0
and required>=1 nine-word oracles in both modes. Live index (read-only):
D3 chat 0 -> 2 hits and 7.3s -> 0.75s; D3 memory 0 -> 3; P2 chat 0 -> 3
with --synonyms.
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.
A query longer than eight words was silently truncated to eight and every remaining word had to match with AND, so the sentences people actually type returned nothing while their keywords hit (the 2026-09-10 evaluation: 3 natural-language queries, 0 hits on both engines).
After. Every query compiles into one
MatchPlanshared by the chat index, the chat JSONL scan and memory search. Nine words or more: symbols, versions and proper nouns are required (AND), the rest match by a ceil(n/2) quota. Eight or fewer: the previous all-AND behaviour, unchanged. A minimal stopword list (그/이/저/것/문제/방법) applies at any length. The plan is the final predicate at all three index sites (relevance recheck, top-up sweep, recent row filter) so index and scan stay equivalent; recent fetches a larger pool before the predicate and cuts at limit+1. Memory recompiles the plan insidecollect()so the per-group relaxed retry from #125 still runs; the cwd/repo_key scope tail from #127 is untouched.chat search --synonyms(default off) applies the Korean stem/synonym expansion memory already uses.--synonymsLSP,2.49.0 SLSA(c-4, wp2 goldens)Validation. Synthetic golden set (
nl-query.test.ts+addNlGoldenCorpus): D3/P2/R2 n≥1 on chat and memory, LSP and Korean-stem regressions retained, index/scan parity for required=0 and required≥1 nine-word oracles in relevance and recent modes. recall 177 pass (+19); dist-freshness, packaging, recall-skill-synopsis 7 pass. Tests badge 2974→2993. SKILL.md Commands fence and Two-engines section updated.Stack (merge order; all PRs target
dev): #123 → #124 → #125 → #126 → #127 → this PR → wp6.Plan:
devlog/_plan/260910_memory-followup-roadmap/050_wp5_natural-language-query.md.