-
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
Description
Context
Part of Neural Mesh RAG (#1994), Phase 1, Task 1.5.
Problem
No mechanism to prevent redundant chunk reads across multi-step retrieval. When agentic RAG (Phase 5) executes multiple retrieval steps, the same chunks get re-read and re-ranked, wasting tokens and latency.
Implementation
- Create
ContextTrackerclass with per-query-session scope filter_unseen(chunks)— return only chunks not seen in this sessionrecord(chunk_ids, tokens)— mark chunks as seen, track token budgetsummary()— return session stats for logging- Token budget tracking with
tokens_remainingproperty
Files
- Create:
autobot-backend/knowledge/search_components/context_tracker.py - Test:
autobot-backend/knowledge/search_components/context_tracker_test.py
Plan Reference
docs/plans/2026-03-22-neural-mesh-rag-implementation.md Task 1.5
Reactions are currently unavailable