docs: fix temporal reasoning doc accuracy
- Revert OSS search tip to user_id kwarg form (not filters dict) - Remove false "additional top-level fields" claim in migration guide; restore "response shape is unchanged" wording - Remove score_breakdown from JSON examples (not a real response field) - Remove cookbook-style "See it in action" section from temporal-reasoning.mdx Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
5559bf2dac
commit
96e521dad9
@@ -99,80 +99,6 @@ const results = await client.search("what did I do last week?", {
|
||||
`reference_date` is especially useful for tests and backfills because it makes relative phrases reproducible.
|
||||
</Tip>
|
||||
|
||||
## See it in action
|
||||
|
||||
### Add a few dated memories
|
||||
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
client.add(
|
||||
[{"role": "user", "content": "I finished the Q1 product review on March 10, 2025."}],
|
||||
user_id="jordan",
|
||||
)
|
||||
|
||||
client.add(
|
||||
[{"role": "user", "content": "I have a dentist appointment on April 18, 2025 at 2 PM."}],
|
||||
user_id="jordan",
|
||||
)
|
||||
|
||||
client.add(
|
||||
[{"role": "user", "content": "I am the product lead at Acme Corp."}],
|
||||
user_id="jordan",
|
||||
)
|
||||
```
|
||||
|
||||
```javascript JavaScript
|
||||
await client.add(
|
||||
[{ role: "user", content: "I finished the Q1 product review on March 10, 2025." }],
|
||||
{ userId: "jordan" }
|
||||
);
|
||||
|
||||
await client.add(
|
||||
[{ role: "user", content: "I have a dentist appointment on April 18, 2025 at 2 PM." }],
|
||||
{ userId: "jordan" }
|
||||
);
|
||||
|
||||
await client.add(
|
||||
[{ role: "user", content: "I am the product lead at Acme Corp." }],
|
||||
{ userId: "jordan" }
|
||||
);
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
<Note>
|
||||
Platform writes are asynchronous. For quick validation, wait briefly before searching or verify the completed event in the dashboard or CLI.
|
||||
</Note>
|
||||
|
||||
### Search with a temporal query
|
||||
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
results = client.search(
|
||||
"what did I do last week?",
|
||||
filters={"user_id": "jordan"},
|
||||
reference_date="2025-03-21T00:00:00Z",
|
||||
)
|
||||
|
||||
for item in results["results"]:
|
||||
print(item["memory"], item["score"])
|
||||
```
|
||||
|
||||
```javascript JavaScript
|
||||
const results = await client.search("what did I do last week?", {
|
||||
filters: { user_id: "jordan" },
|
||||
referenceDate: "2025-03-21T00:00:00Z",
|
||||
});
|
||||
|
||||
results.results.forEach((item) => {
|
||||
console.log(item.memory, item.score);
|
||||
});
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
<Info icon="check">
|
||||
Expected behavior: the March 10 review leads this result set, the April 18 appointment does not, and the ongoing role at Acme does not crowd out the dated answer.
|
||||
</Info>
|
||||
|
||||
## Supported query patterns
|
||||
|
||||
<AccordionGroup>
|
||||
|
||||
Reference in New Issue
Block a user