Software Development

How does Microsoft Semantic Kernel manage "Semantic Memory" for long-term project context?

BR Asked by Brandon Walsh · 05-02-2025
0 upvotes 11,317 views 0 comments
The question

We are working on a Software Development project that will last 18 months. We need our AI to remember architectural decisions made in month one. How does Microsoft Semantic Kernel handle this long-term memory without blowing up the context window or token costs?

3 answers

0
VI
Answered on 08-02-2025

The "Semantic Memory" feature in Microsoft Semantic Kernel is specifically designed for this "needle in a haystack" problem. Instead of stuffing every document into the prompt, the Kernel uses a vector database (like Azure AI Search or Qdrant) to index your project documentation. When you ask a question about month-one decisions, the Kernel performs a similarity search, retrieves only the relevant snippets, and injects them into the current prompt. This keeps your token costs low while ensuring the agent has the exact context it needs. For our 18-month projects, we index every ADR (Architecture Decision Record) as it’s written. The AI then acts as a "Living Documentation" assistant that knows exactly why a specific database schema was chosen a year ago.

0
KE
Answered on 09-02-2025

Does the agent automatically update the memory as the project evolves, or do we have to manually re-index the vector DB every time a decision changes?

RA 10-02-2025

You can automate the indexing, Kevin! We set up a GitHub Action that triggers every time an ADR is merged into the main branch. The action calls a Microsoft Semantic Kernel function that "upserts" the new document into the vector store. This ensures the agent's memory is always in sync with the latest code and documentation. It turns the AI into a real-time expert on your evolving codebase.

0
TH
Answered on 11-02-2025

The memory connector is model-agnostic too. You can use one model for the embeddings and another for the chat, which saves a lot on latency.

VI 12-02-2025

Good point, Thomas. Using a small embedding model like Ada and then GPT-4 for the reasoning is the most efficient way to scale.

Share your thoughts

Your email address will not be published. Required fields are marked (*)

Professional Counselling Session

Still have questions?
Schedule a free counselling session

Our experts are ready to help you with any questions about courses, admissions, or career paths. Get personalized guidance from industry professionals.

Request a Call Back

Search Online

We Accept

We Accept

Follow Us

"PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc. | "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA. | COBIT® is a trademark of ISACA® registered in the United States and other countries.

Book Free Session