Skip to content

Conversation

@twaugh
Copy link
Owner

@twaugh twaugh commented Nov 23, 2025

Phase 2 RAG search was using hardcoded top_k=10 instead of reading from config.rag.top_k (which defaults to 20).

This meant RAG was only fetching 10 chunks when the user configured 20, reducing the diversity of candidate pages shown to the LLM for integration decisions.

Changes:

  • Pass config to Phase2Screen from LogsqueakApp
  • Store config in Phase2Screen instance
  • Read config.rag.top_k in RAG worker (fallback to 10 for tests)
  • Add Any to typing imports

Result: RAG now respects user's top_k configuration, returning more diverse candidate pages for better integration suggestions.

Assisted-by: Claude Code

Phase 2 RAG search was using hardcoded top_k=10 instead of reading
from config.rag.top_k (which defaults to 20).

This meant RAG was only fetching 10 chunks when the user configured
20, reducing the diversity of candidate pages shown to the LLM for
integration decisions.

Changes:
- Pass config to Phase2Screen from LogsqueakApp
- Store config in Phase2Screen instance
- Read config.rag.top_k in RAG worker (fallback to 10 for tests)
- Add Any to typing imports

Result: RAG now respects user's top_k configuration, returning more
diverse candidate pages for better integration suggestions.

Assisted-by: Claude Code
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.61%. Comparing base (b78f18c) to head (0ca42b7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #36      +/-   ##
==========================================
+ Coverage   84.59%   84.61%   +0.01%     
==========================================
  Files          48       48              
  Lines        5084     5088       +4     
==========================================
+ Hits         4301     4305       +4     
  Misses        783      783              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@twaugh twaugh merged commit 3681a2d into main Nov 23, 2025
1 check passed
@twaugh twaugh deleted the fix/rag-top-k-from-config branch November 23, 2025 09:39
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.

3 participants