Caching: reuse embeddings of repeated queries, cache retrieval results and final answers for popular questions, and use a semantic cache for near-duplicate questions, with expiry tied to document updates and with permission checks so one user's cached answer is never shown to another who lacks access.
Memory: keep short-term chat context compact, and store long-term user facts or past resolutions in a separate retrievable store that users can inspect and delete.
Both reduce latency and cost but must be invalidated correctly when sources change.
Loading…