Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

One feature I got to implement in OpenCode 2.0 was allowing for HOT CONTEXT¹ without busting the cache. Here's me explaining how it works ↓ ¹ ⁿᵒᵗ ᵃ ᵗᵉʳᵐ

112,249 Aufrufe • vor 3 Monaten •via X (Twitter)

41 Kommentare

Profilbild von Kit Langton
Kit Langtonvor 3 Monaten

obligatory @samwhoo link

Profilbild von zeb
zebvor 3 Monaten

@opencode This is smart but also I'm distracted by this really nice looking demo ui

Profilbild von Kit Langton
Kit Langtonvor 3 Monaten

@opencode 🥰 aw, thank ye zeb!

Profilbild von beginbot 🃏
beginbot 🃏vor 3 Monaten

@opencode wait HOT LOCAL CONTEXT??? in my AREA???

Profilbild von Alan Rice
Alan Ricevor 3 Monaten

@opencode crazy they hired the same narrator as effect institute

Profilbild von Rhys
Rhysvor 3 Monaten

@opencode great explanation

Profilbild von AP
APvor 3 Monaten

@opencode your demos are always the best holy

Profilbild von Kit Langton
Kit Langtonvor 3 Monaten

@opencode 😳 😍

Profilbild von Sam Rose
Sam Rosevor 3 Monaten

@opencode How did you evaluate that this way of updating context values doesn’t affect the quality of the LLM’s replies?

Profilbild von Anders Lie
Anders Lievor 3 Monaten

@opencode pretty cool! though makes you wonder in what cases you might just want to intentionally change the prefix rather than append deltas, e.g. if you are on a provider with known low cache ttl, or if returning to a session after a long time

Profilbild von Kit Langton
Kit Langtonvor 3 Monaten

@opencode Yeah! If we have that information about the provider/model we can squash everything back into the prompt. I’ll look into this :)

Profilbild von Marcelo Prado
Marcelo Pradovor 3 Monaten

@opencode We built something very similar for our own internal harness. Lovely representation though, will share with my team bc it makes understanding the concept a lot easier lol

Profilbild von Jason Cameron
Jason Cameronvor 3 Monaten

@opencode Very intuitive demo

Profilbild von Alade Yessoufou
Alade Yessoufouvor 3 Monaten

@opencode Nice UI is that openTUI ?

Profilbild von Gjermund Garaba
Gjermund Garabavor 22 Tagen

@opencode

Profilbild von Antoine
Antoinevor 3 Monaten

@thdxr @opencode I wish opencode app would make cache easier to understand in general. Like if messages hit or miss cache, why (ttl, change of system prompt). Also knowing how much requests cost at message level would be sooo good to self improve.

Profilbild von Aman
Amanvor 3 Monaten

I use a simpler version of this for my personal agent, I keep the system prompt stable, then inject dynamic context right before the latest user turn. That gives me cache hits up to that point. It also works well for reminders and temporary instructions, since the context is recent and the LLM is more likely to follow them. The tradeoff is that on the next turn, I pay again for the previous turn’s new content, but I think it’s a nice tradeoff for the simplicity and cache efficiency.

Profilbild von Amaan
Amaanvor 3 Monaten

@opencode very interesting

Profilbild von manavv
manavvvor 2 Monaten

@opencode very interesting. learned something new today

Profilbild von Austin
Austinvor 3 Monaten

@opencode Cc @gubatron

Profilbild von agusti
agustivor 3 Monaten

@opencode I always thought prepending that at the end of the transcript would work

Profilbild von Prathmesh
Prathmeshvor 3 Monaten

@opencode 😮🔥

Profilbild von Nick Venturi
Nick Venturivor 3 Monaten

@opencode im stealing the term hot context and using it in my next meeting 😂

Profilbild von ManiGupt
ManiGuptvor 3 Monaten

@thdxr @opencode Urgently add method in app to delete project. Stuck with a dead project path. Cant add new.

Profilbild von Kit Langton
Kit Langtonvor 3 Monaten

@thdxr @opencode Sorry, could you elaborate?

Profilbild von ManiGupt
ManiGuptvor 3 Monaten

@thdxr @opencode Desktop app doesnt have a project delete button option. I changed project location, now even after app restart it is stuck with old path. I deleted config and session files, didnt work. I tried deleting project using oc server too. This issue is open on gh. Many people requested

Profilbild von Kit Langton
Kit Langtonvor 3 Monaten

@thdxr @opencode Got it! I’ll pass this along to the desktop ppl

Profilbild von Gregor
Gregorvor 3 Monaten

@opencode When the hot context itself changes between turns, which parts of the cache do you actually recover on the next request?

Profilbild von Evan
Evanvor 3 Monaten

@opencode cool implementation. have you run evals on this? i wonder if there are losses from the prompt structure

Profilbild von MobaiLabs | 墨白实验室
MobaiLabs | 墨白实验室vor 2 Monaten

@opencode @grok 具体是如何实现的

Profilbild von Vishal Gupta
Vishal Guptavor 3 Monaten

@opencode The cache invalidation boundary is the architecture decision most inference implementations never make explicit. Once you do, cost and latency stop being mysteries and become variables you can control.

Profilbild von Caleb Norton
Caleb Nortonvor 3 Monaten

@opencode i prefer to let my contexts bust as they please, keeping the hot ones from doing it seems kinda discriminatory

Profilbild von Andrés Delfino
Andrés Delfinovor 3 Monaten

@opencode This works non-deterministically, right? You rely on the model understanding what you want to do with the "context" tags, or understanding that it should change the date when they see several "today is". Not bashing, just wanting to understand! Looks cool :)

Profilbild von Mason Veilleux
Mason Veilleuxvor 22 Tagen

@opencode Is it getting hot in here?

Profilbild von Vishal Gupta
Vishal Guptavor 3 Monaten

@opencode Separating mutable context from cacheable structure is the right split. Most implementations just re-run everything. Isolating what changes from what doesn't — that's correct architecture.

Profilbild von ishak
ishakvor 2 Monaten

@opencode but what if the diff is large? doesn't keeping both the before and after versions bloat the context?

Profilbild von 🔥 fire
🔥 firevor 2 Monaten

@opencode does this piecemeal approach have any effect when handling models with mid-thread dynamic tool injection like k3? ( I presume not )

Profilbild von Yousef Amirghofran
Yousef Amirghofranvor 3 Monaten

@opencode Very nice!!

Profilbild von bukit 🇮🇩 🇵🇸 🔻
bukit 🇮🇩 🇵🇸 🔻vor 3 Monaten

@opencode Question modal need new flow.. submit -> keep planning or submit -> build.

Profilbild von robby - rbby.dev
robby - rbby.devvor 3 Monaten

@opencode Is this a new gui?

Profilbild von Rick Blalock
Rick Blalockvor 3 Monaten

@opencode nice!

Ähnliche Videos