Keeping Your AI Knowledge Base Fresh
Keeping your AI knowledge base fresh means updating the indexed content when source documents change. Stale indexes lead to wrong or outdated answers. Define a refresh strategy: full re-index on a schedule, incremental updates on change events, or manual triggers after major edits.
Strategies
Full re-index: re-chunk and re-embed all documents periodically. Simple but can be heavy. Incremental: watch for file or CMS changes and only re-process what changed. Hybrid: incremental for small updates, full for schema or model changes.

# Conceptual: incremental update on file change
def on_document_updated(doc_id: str, new_content: str):
chunks = chunk_with_overlap(new_content)
embeddings = embed_batch(chunks)
vector_db.upsert(doc_id, embeddings)
# Optionally invalidate cache for queries that used this docGovernance
Assign owners to document sets, set retention and review policies, and log what's in the index. When in doubt, re-index after large content updates and run retrieval tests to confirm the system still finds the right chunks.

When to trigger updates
Manual: after a major doc or policy change. Scheduled: nightly or weekly full re-index for stability. Event-driven: on save or publish if your CMS or storage supports webhooks. Balance freshness with cost and load; not every edit needs an immediate re-embed.