fleet-memory/hindsight-api/hindsight_api/engine
Bjorn Schliebitz 54e2df0baf
feat(config): Add configurable observation thresholds (#83)
Allows tuning of entity observation generation via environment variables.

## New Environment Variables
- `HINDSIGHT_API_OBSERVATION_MIN_FACTS` - Minimum facts required to
  generate entity observations (default: 5)
- `HINDSIGHT_API_OBSERVATION_TOP_ENTITIES` - Maximum entities to process
  per retain batch (default: 5)

## Changes
- Added threshold configuration to HindsightConfig
- Updated memory_engine.py to use config values
- Updated observation_regeneration.py to use config values

## Use Case
Lower thresholds generate more observations (better recall, higher cost).
Higher thresholds are more selective (lower cost, may miss patterns).

Example:
```bash
# Generate more observations
docker run -e HINDSIGHT_API_OBSERVATION_MIN_FACTS=3 \
           -e HINDSIGHT_API_OBSERVATION_TOP_ENTITIES=10 ...
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 16:22:25 +01:00
..
retain feat(config): Add configurable observation thresholds (#83) 2026-01-01 16:22:25 +01:00
search feat: refactor hindsight-embed architecture (#66) 2025-12-22 22:02:40 +01:00
__init__.py feat: extensions (#54) 2025-12-22 11:05:23 +01:00
cross_encoder.py fix: doc build and lint files (#34) 2025-12-16 13:49:09 +01:00
db_utils.py fix: doc build and lint files (#34) 2025-12-16 13:49:09 +01:00
embeddings.py fix: doc build and lint files (#34) 2025-12-16 13:49:09 +01:00
entity_resolver.py feat: extensions (#54) 2025-12-22 11:05:23 +01:00
interface.py feat: extensions (#54) 2025-12-22 11:05:23 +01:00
llm_wrapper.py fix: ollama structured support (#63) 2025-12-22 16:35:24 +01:00
memory_engine.py feat(config): Add configurable observation thresholds (#83) 2026-01-01 16:22:25 +01:00
query_analyzer.py fix: doc build and lint files (#34) 2025-12-16 13:49:09 +01:00
response_models.py fix: doc build and lint files (#34) 2025-12-16 13:49:09 +01:00
task_backend.py feat: add hindsight-embed and native agentic skill (#64) 2025-12-22 16:42:11 +01:00
utils.py fix: doc build and lint files (#34) 2025-12-16 13:49:09 +01:00