debug(ai-sdk): temp RAGDEBUG logging in searchControls + wiring
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -111,9 +111,14 @@ func (c *LegalRAGClient) searchInternal(ctx context.Context, collection string,
|
||||
// nur die Control-Pool-Rollen behalten — so werden NIST/CRA-Anhang (dense rank ~8-9, unter
|
||||
// dem kleinen top-K) Kandidaten. Re-Rank/applyControlRoles ordnen sie danach.
|
||||
if queryWantsControls(query) {
|
||||
if controlHits, cErr := c.searchControls(ctx, collection, embedding); cErr == nil {
|
||||
controlHits, cErr := c.searchControls(ctx, collection, embedding)
|
||||
fmt.Printf("[RAGDEBUG] query=%q wantsControls=true controlHits=%d err=%v poolBefore=%d\n", query, len(controlHits), cErr, len(hits))
|
||||
if cErr == nil {
|
||||
hits = mergeDedupHits(hits, controlHits)
|
||||
fmt.Printf("[RAGDEBUG] poolAfterControls=%d\n", len(hits))
|
||||
}
|
||||
} else {
|
||||
fmt.Printf("[RAGDEBUG] query=%q wantsControls=FALSE\n", query)
|
||||
}
|
||||
|
||||
// Graph-Augmentation: verbundene Normen (references_out/in) der Top-Hits ueber die
|
||||
|
||||
@@ -229,6 +229,7 @@ func (c *LegalRAGClient) searchControls(ctx context.Context, collection string,
|
||||
kept = append(kept, h)
|
||||
}
|
||||
}
|
||||
fmt.Printf("[RAGDEBUG] searchControls dense=%d kept=%d depth=%d\n", len(hits), len(kept), controlPoolDepth)
|
||||
return kept, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user