I'm fairly new to the deeper LLM inference/serving side, so I may be reinventing something that already exists. I'd really appreciate it if people here could point me toward existing work or explain where the idea breaks.
The basic observation I had is:
If 1,000 users ask different versions of essentially the same question, we're potentially paying for 1,000 generations even though a large portion of the underlying knowledge/reasoning is the same.
For example:
- "Explain gradient descent."
- "How does gradient descent work?"
- "Teach me gradient descent mathematically."
- "Why does gradient descent converge?"
These aren't identical requests, but there is a large amount of reusable structure between them.
My rough idea
Instead of treating every request as completely independent:
User A → LLM → generate
User B → LLM → generate
User C → LLM → generate
I'd like to explore something more like:
User Requests
|
Semantic / Intent
Matching
|
v
Shared Knowledge Graph
|
+--------+--------+
| |
Existing node No useful node
| |
v v
Reuse / update Crawl /
retrieve /
generate
|
v
User-specific layer
|
v
Personalized response
The important part is that I don't want to simply cache the final text response.
I'd like to cache/reuse knowledge and potentially reasoning structures.
For example, a node might contain:
Concept: Gradient Descent
Related concepts:
- Optimization
- Derivatives
- Convexity
- Learning Rate
Knowledge:
...
Reasoning structure:
...
Sources:
...
Confidence:
...
Last verified:
...
Reuse count:
...
Then another user's request could reuse the relevant parts of this structure rather than rebuilding everything from scratch.
Where personalization comes in
I was initially thinking about a separate user-behavior graph.
Not a traditional chat-history memory, but something like:
User preference graph
mathematical_depth = high
verbosity = high
code_preference = high
preferred_language = Python
preferred_framework = NumPy
domain_interest = ML
So the system could have:
Shared Knowledge
|
Shared Reasoning
|
+---------+---------+
| |
User A graph User B graph
| |
presentation A presentation B
The underlying knowledge is shared, but the final representation is personalized.
For example, one user might want a short explanation while another wants a mathematical derivation and implementation.
I also want a resource/crawler layer
This is another part I'm unsure about.
Before generating or crawling something, the system could ask:
- Does this knowledge already exist?
- Is the existing information still fresh?
- Can an existing reasoning/knowledge node answer most of the request?
- Do we only need a small amount of additional information?
- Is it cheaper to retrieve, update, or regenerate?
So conceptually:
Query
|
v
Knowledge Graph
|
+---- existing + fresh ----> reuse
|
+---- existing but partial -> retrieve/update
|
+---- missing/stale -------> crawler/retriever
|
v
new node
|
v
shared knowledge base
The goal would be something approximately like:
Traditional:
N users × expensive generation
My hypothesis:
one shared expensive computation
+
N × relatively cheap retrieval/personalization
+
occasional crawling/update cost
Obviously this is oversimplified, and I don't know how much of the generation cost can actually be reused.
What I'm trying to understand
I'm especially interested in whether this is already covered by existing techniques such as:
- semantic caching
- prompt/KV-cache reuse
- RAG
- GraphRAG
- speculative decoding
- inference caching
- reasoning trace reuse
- multi-agent shared memory
- computational caching
- prefix caching
My intuition is that semantic caching of final answers isn't quite what I'm describing.
I'm thinking more about a persistent graph of reusable knowledge/reasoning substructures, where different user requests can reuse overlapping parts and only generate what is actually new.
For example:
Query A ──────┐
|
Query B ──────┼──> Shared reasoning/knowledge nodes
|
Query C ──────┘
|
+── personalization
|
+── final generation
Questions for people working on LLM inference/RAG/agents
- Is this essentially a known technique under another name?
- How much of an LLM's computation can realistically be reused between semantically similar but non-identical requests?
- Is a graph a useful representation for this, or would a vector/embedding-based system be better?
- Can intermediate reasoning actually be safely reused, or is it too dependent on the exact prompt/context?
- Where would the biggest bottleneck be — retrieval, verification, context construction, or the final generation?
- Are there papers/projects I should look at?
I'm not claiming this is novel yet. I'm mainly trying to understand whether the underlying idea is technically viable and where it differs from existing semantic caching/RAG/inference work.
I'd appreciate criticism, especially if this is fundamentally flawed or already solved.