Menu

1 / 5

DeepTutor RAG: Put a Token Budget Between Retrieval and Generation

DEV Community: datascience·JJ657·about 23 hours ago
#NjNWIpwE
#devtodatascience#science#devto#dev#evidence
Reading 0:00
15s threshold

DeepTutor RAG: Put a Token Budget Between Retrieval and Generation

You retrieve ten relevant passages. The model ignores eight of them. You still paid for all ten.

This happens when retrieval quality and input-token consumption operate on separate tracks. A tutoring system that pulls overlapping textbook sections, duplicate definitions, and repeated headers will burn quota before the generator decides what to keep. The failure sits between retrieval and generation: no one enforces a budget at the handoff.

For an external integration with HKUDS/DeepTutor , I built a context-budget adapter to make that boundary explicit. DeepTutor positions itself as a lifelong personalized tutoring system. This article proposes a narrow fix: retrieval quality does not automatically control input-token consumption .

Give context assembly its own boundary

Keep document extraction, chunk storage, retrieval, and generation separate. Ingestion owns document versions and chunk identifiers.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.