getUserContext minRating parameter returns 0 FACTS even at very low thresholds
Bug Description
The getUserContext API's minRating parameter exhibits inconsistent filtering behavior. When set to very low values (0.01-0.5), it returns 0 FACTS, but when disabled (undefined), it returns 8 FACTS.
Environment
- API: Zep Cloud
-
SDK:
@getzep/zep-cloud(latest TypeScript SDK) - Use case: Claude Code conversation storage and retrieval
-
Thread ID format:
claude-code-{session-id}
Reproduction Steps
// Call getUserContext with different minRating values
const threadContext = await zepClient.memory.getUserContext(threadId, {
mode: 'basic',
minRating: X // Test different values
});
Observed Behavior
| minRating Value | FACTS Returned |
|---|---|
0.5 |
0 FACTS (sometimes 9 FACTS early in session) |
0.1 |
0 FACTS |
0.01 |
0 FACTS |
undefined (disabled) |
8 FACTS ✅ |
Expected Behavior
Setting minRating to very low values (0.01, 0.1) should return facts with low confidence scores. A threshold of 0.01 should return almost all facts, similar to having no threshold at all.
Analysis
This behavior suggests one of the following:
-
Bug in filtering logic: The
minRatingparameter may not be working correctly - Extreme confidence scores: Facts have confidence scores < 0.01 (which would be unusual)
-
Default threshold: When
minRatingis specified, a different (higher) default threshold may be applied
The fact that disabling minRating entirely returns 8 FACTS, but setting it to 0.01 returns 0 FACTS is particularly concerning and suggests a bug in the parameter handling.
Impact
This makes it difficult to use minRating for fine-tuning fact relevance. Users must either:
- Accept all facts (no filtering)
- Get 0 facts (with any threshold)
There's no middle ground for quality-based filtering.
Additional Context
We've also observed that the same thread returns different FACTS counts at different times during the same session, even with identical API calls and parameters, which may indicate additional timing or caching issues.
Please let me know if you need additional debugging information or logs.
Hi there - would you please contact Zep's support team via the in-app support case functionality? We're unable to respond to support issues in this repo. Thanks