Summary
extract_knowledge sends existing entries to the LLM so it can avoid duplicates. Currently sends all keys (truncated to last 50). For large knowledge bases, this wastes prompt tokens on irrelevant entries.
Current behavior
existing_text = "\n".join(f"- {e.key}" for e in existing[-50:])
Proposed improvement
Use vector search to find existing entries most similar to the transcript, then only include those in the prompt:
- Embed the transcript (or a summary of it)
query_vector(embedding, limit=20) to get closest existing entries
- Send only those 20 entries (keys + short value snippets) to the LLM
This gives the LLM better context for dedup while keeping the prompt small.
Per-model token budgets (future)
Different models have different context windows. Could add per-model config:
phi4-mini: ~4K usable for existing entries
llama3: ~8K
claude: ~100K
The capture prompt would auto-adjust the number of existing entries based on model capacity.
Acceptance Criteria
Discovered during #37 demo testing.
Summary
extract_knowledgesends existing entries to the LLM so it can avoid duplicates. Currently sends all keys (truncated to last 50). For large knowledge bases, this wastes prompt tokens on irrelevant entries.Current behavior
Proposed improvement
Use vector search to find existing entries most similar to the transcript, then only include those in the prompt:
query_vector(embedding, limit=20)to get closest existing entriesThis gives the LLM better context for dedup while keeping the prompt small.
Per-model token budgets (future)
Different models have different context windows. Could add per-model config:
phi4-mini: ~4K usable for existing entriesllama3: ~8Kclaude: ~100KThe capture prompt would auto-adjust the number of existing entries based on model capacity.
Acceptance Criteria
Discovered during #37 demo testing.