Repository navigation
Cursor/mem injection optimization main - #550
Merged
Wang-Daoji merged 5 commits intoSep 28, 2026
Merged
Wang-Daoji merged 5 commits into
Wang-Daoji merged 5 commits into
Conversation
In turn_start retrieval, pass up to the last 5 succeeded Q/A pairs of the current session (from the already-fetched recent RawTurns) to the retrieval.query.extract LLM call so it can resolve references such as "那个脚本" / "继续上次的" when producing queryVecText and keywords. - config: add algorithm.retrieval.queryExtractHistoryTurns (5) and queryExtractHistoryTextChars (200); 0 turns disables the feature - plugin-algorithms: RETRIEVAL_QUERY_EXTRACT_PROMPT v2 -> v3 with CURRENT USER INPUT / RECENT CONVERSATION rules and two few-shots - retrieval-service: export queryExtractHistoryFromRawTurns, render RECENT CONVERSATION + CURRENT USER INPUT for the extract user message, skip history when the current input exceeds 2000 chars - tests: bump extract operation to v3, add history selection, e2e, empty-history, non-turn_start, disabled and long-input cases, and config parsing coverage Only the extract model input changes; request protocol, candidate pool, LLM filter input, injection format and storage are untouched. Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit c487f9b)
Lower llmFilterMinCandidates default from 2 to 1 so a lone mechanical candidate still goes through the semantic filter instead of being injected unchecked. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ion_optimization-main
…ion_optimization-main
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.
No description provided.