Skip to content

feat: add final LLM filter stage (文献器) after rerank#27

Open
uf-hy wants to merge 2 commits intomainfrom
feat/llm-filter-stage
Open

feat: add final LLM filter stage (文献器) after rerank#27
uf-hy wants to merge 2 commits intomainfrom
feat/llm-filter-stage

Conversation

@uf-hy
Copy link
Owner

@uf-hy uf-hy commented Feb 21, 2026

What

  • Add optional final-stage LLM filter/extractor ("文献器") after cross-encoder rerank to select+extract relevant content, then surface extracted items first.
  • Increase default QMD_RERANK_DOC_LIMIT in QMD_RERANK_MODE=rerank to 120 (keep 40 for LLM mode).
  • Clamp QMD_CHUNK_OVERLAP_TOKENS to avoid zero/negative step (hang risk).

How to enable

Set QMD_LLM_FILTER_DOC_LIMIT to a positive number (e.g. 40) and configure provider via existing QMD_OPENAI_* or QMD_GEMINI_* (or QMD_LLM_FILTER_PROVIDER).

Notes

  • Keeps non-extracted results as fallback (extracted items are moved to the top).
  • Tests: bun test.

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