Re:Ask HN: Building LLM apps? How are you handling user cont...
by esafak on Monday May 26, 2025 @04:30PM
(#44101372)
A context inference service sounds valuable but I wonder what your moat would be.
Re:Ask HN: Building LLM apps? How are you handling user cont...
by marcospassos on Monday May 26, 2025 @04:35PM
(#44101409)
Yep, that's something I'd have to figure out.
Using MCP, this could be a method that would get the context to take decisions.
For example, here's an example of how I use it currently:
```
const context = await getContext();
const response = await generateText({ system: `Here's the user context: ${context}`, messages: [...] });
console.log(context);
// "First-time visitor using Google Chrome on a MacBook, browsing from San Francisco.
// Landed on the pricing page from a Google ad, clicked to compare plans,
// then visited the enterprise section before initiating a support chat."
```
It's like a session recorder for LLMs that captures rich user behavior and traits (like device, browser, location, and journey) and turns them into LLM context. Your agent or app instantly becomes more helpful, relevant, and aware without wiring up your own tracking and enrichment pipeline.