What it is: handovers context after it roughly hits 70-80% context
Why: most models either hit context length or might have a context amnesia problem, so we'd have to switch the chat once we come across such a problem , BUT again we dont have any viable method if this context switching and handing over context to new chat.
This repo is an attempt to reduce this problem with the help of instrumentation , algorithms and architectural solutions. (see README of the repo)
what was my inspiration?
Trace IDs , thats it
i was learning more about opentelemntry and i learn how we have same traceIDs if they belong to the same trace.
similarly i tried to put my intuition here in context handovers.
my initial plans:
first of all i thought of extracting tags from a context and see a flow of these tags.
Basically lets say:
> if an entire chat can be divided into X parts
>each part has tags
>we track the flow of continuation of each tag
ex dog appears consistently in 8 consecutive parts of the context. so we have to prioritise this over cat that appears in only 2 consecutive parts of the context
then i had a giddy thought of comparing graphs , so KL divergence was what came across me
all these three things combined
-instrumentation
-kl divergence
-context management
this led me to a fun evening with my team of LLMs and coding agents. I wanted to dig a bit more.
my conversations with my fleet of LLMS:
my models had enhanced my architecture , and suggested we shift from this tag based approach to an atom based approach with DAG.
the idea was to use instrumentation for strict observability of these tokens and context with keeping a track of :
-what context is lost
-what new context is added
would soon add my prompts i had put in claude , qwen and minimax ....here in this repo, so check it out!
Link: https://github.com/ramsterr/context_handover
full disclosure , i have used claude , minimax , qwen agents for my approach. and i think you'd like to use what i have built with them.
No responses yet.