# Context Component Examples

**Understanding Context Components with an Example**

### **Example 1: Chatbot Memory System**

Let's say we are building a chatbot that remembers user interactions:

* `context_entity_id = "chatbot"` → The chatbot is the system storing the memory.
* `context_id = "session_123"` → Represents a specific conversation session with a user.
* `memory_id = "msg001"` → A specific message within that session.

So, the generated key will look like this:

```
user123:chatbot:session_123:msg001
```

This ensures that each message in a conversation session can be uniquely identified and retrieved.

## **Example 2: E-commerce Recommendation System**

* `context_entity_id = "recommendation_engine"` → Memory is stored for product recommendations.
* `context_id = "user_session_456"` → Represents a specific user browsing session.
* `memory_id = "product_view_789"` → Tracks a specific product the user viewed.

Generated key:

```
user456:recommendation_engine:user_session_456:product_view_789
```

This structure helps in storing personalized recommendations for users.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.groclake.ai/lakes/agent-management-and-deployment/memorylake/editor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
