Increase topK default to 40 for multi-hop context

- Update default topK from 20 to 40 in query parameters
- Support richer context with multi-hop graph traversal
- Maintain flexible topK range (1-50) via slider
- Respect user selection of query mode (don't force mode changes)

Higher topK allows more edges from multi-hop paths to be included
in the context provided to the LLM for answer generation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Santosh Bhavani 2025-10-25 13:49:07 -07:00
parent 3975e92579
commit cbe92b50e7

View File

@ -39,7 +39,7 @@ export function RagQuery({
kNeighbors: 4096,
fanout: 400,
numHops: 2,
topK: 5,
topK: 40, // Increased to 40 for multi-hop paths (was 20, originally 5)
useVectorSearch: false,
usePureRag: false,
queryMode: 'traditional'
@ -327,7 +327,7 @@ export function RagQuery({
<input
type="range"
min="1"
max="20"
max="50"
step="1"
value={params.topK}
onChange={(e) => updateParam('topK', parseInt(e.target.value))}