C.W.K.
Stream
Lesson 03 of 05 · published

Truth on Demand, Not Pre-Chewed

~11 min · context, freshness, tools-not-prompt, scope

Level 0Open Gate
0 XP0/36 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete
"Don't paste the portfolio into the question. Give the brain a way to look, and let it look when it needs to."

Two ways to give an assistant context

When you ask Pippa about the portfolio, it needs to know the portfolio. There are two ways to make that happen. The tempting one is context-by-copy: Keep serializes the whole portfolio into text and pastes it into the message before sending — a pre-chewed prompt. Keep refuses this. Instead it uses context-by-reference: Pippa reads the live selected scope on demand through the authenticated read-only host tools (status, read, search) at the moment it actually needs the data. Portfolio truth is never copied into the message request as a pre-chewed blob.

Why pre-chewing is worse than it looks

Copying the portfolio into the prompt seems simpler, but it introduces three quiet problems. First, staleness: the copied snapshot is frozen at send time, so a long conversation reasons about numbers that may have moved. Second, scope leakage risk: whatever you dumped into the prompt is now in the context regardless of which scope should apply — the copy doesn't respect the Dad/Mom/Family boundary the way a live scoped read does. Third, waste: you shove the entire portfolio into every message even when the question only needed one number. Reading on demand fixes all three — fresh, scoped, and only what's needed.

Give a capable agent tools to fetch context, don't pre-stuff the context in. When the consumer of context can itself decide what to read and when, pass it a reference and the means to look — not a frozen copy. The copy is stale the instant it's made and blind to boundaries the live read enforces. Reference beats copy whenever the source can change or is access-controlled.

Fresh and scoped, every time

Because Pippa pulls through the host adapter at the moment of need, two good properties fall out for free. The read is always current — it reflects the portfolio as it is now, not as it was when the conversation started. And it always respects the selected scope — if you're in the Dad scope, the live read returns Dad's data, and Mom's detailed holdings are not silently swept in. The scope boundary you met in Track 1 is enforced at read time, on every read, rather than being frozen (correctly or not) into a prompt copy that then can't adapt.

This is the same instinct as compute-on-read. You saw it with Family totals (merged on read) and live prices (overlaid on read). Sidekick context is the conversational version: don't materialize a copy you have to keep in sync — read the live source when you need it. Across the whole app, Keep prefers a fresh read over a maintained copy, because a copy is a consistency debt and a live read is not.

Code

Reference-with-tools, not a pre-chewed prompt (illustrative)·python
# NOT this — a frozen copy pasted into the prompt at send time.
def ask_prechewed(question):
    snapshot = serialize_entire_portfolio()      # stale the instant it's made
    return pippa.chat(f"{snapshot}\n\n{question}")  # ignores scope, wasteful

# This — hand Pippa the tools; it reads the live scope WHEN it needs to.
def ask_on_demand(question, scope):
    return pippa.chat(
        question,
        tools=[host.status, host.read, host.search],  # read-only, live, scoped
        scope=scope,   # a Dad-scope read returns Dad's data, not Mom's
    )
# The data is fetched fresh at reasoning time, respecting the scope boundary.

External links

Exercise

Take an assistant or report generator you've built that gets its data by having the caller paste it in. List the problems that copy introduces: staleness (frozen when?), over-inclusion (sending more than the question needs), and boundary leakage (does the copy respect access scopes?). Then redesign it so the assistant fetches on demand through a scoped, read-only tool. What does each of the three problems become once you switch from copy to reference?
Hint
The copy is convenient and wrong in three ways at once. Reference-with-tools fixes all three: fresh (read at reasoning time), minimal (fetch only what's asked), and scoped (the read enforces the boundary). The cost is you must build the tools — but that cost buys correctness the paste can't.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.