Skip to content

feat(recall): relax long natural-language queries with a required/optional match plan - #128

Merged
lidge-jun merged 2 commits into
devfrom
codex/memory-l1-wp5-nl-query
Sep 10, 2026
Merged

feat(recall): relax long natural-language queries with a required/optional match plan#128
lidge-jun merged 2 commits into
devfrom
codex/memory-l1-wp5-nl-query

Conversation

@lidge-jun

Copy link
Copy Markdown
Owner

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 MatchPlan shared 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 inside collect() 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.

live index (read-only) before after
D3 chat "지난번 로컬 소스를 … 확인한 방법" 0 hits / 7.3 s 2 hits / 0.75 s
D3 memory 0 3
P2 chat "코덱스를 재시작하면 플러그인이 사라지는 문제" --synonyms 0 3
LSP, 2.49.0 SLSA (c-4, wp2 goldens) unchanged

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#127this PR → wp6.

Plan: devlog/_plan/260910_memory-followup-roadmap/050_wp5_natural-language-query.md.

…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.
@lidge-jun
lidge-jun merged commit 9384a4f into dev Sep 10, 2026
13 checks passed
@lidge-jun
lidge-jun deleted the codex/memory-l1-wp5-nl-query branch September 10, 2026 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant