Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Python: VolatileMemoryStore.get_nearest_match returns an un-awaited coroutine instead of a (MemoryRecord, score) tuple

Open Beginner friendly
#14,521 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 4 days

@VANDRANKI is already working on this.

Since Oct 1, 2026.

  • #14523 by @VANDRANKI — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start in python/semantic_kernel/memory/volatile_memory_store.py at VolatileMemoryStore.get_nearest_match, then compare ChromaMemoryStore.get_nearest_match as the working reference. Add a regression test covering the reproduced call and verify that it returns a single (MemoryRecord, score) tuple without leaving an un-awaited coroutine.

Written by the indexing model from the issue text.

Description

python triage

What happens

VolatileMemoryStore.get_nearest_match is declared async def, but it returns the result of calling self.get_nearest_matches(...) without awaiting it. get_nearest_matches is also async def, so await store.get_nearest_match(...) gives the caller a coroutine, not the tuple[MemoryRecord, float] the signature promises. The inner coroutine is never run and Python warns "coroutine ... was never awaited". Even if it were awaited, it would be a list of tuples, not a single tuple.

Where

python/semantic_kernel/memory/volatile_memory_store.py, get_nearest_match (current main):

    ) -> tuple[MemoryRecord, float]:
        ...
        return self.get_nearest_matches(
            collection_name=collection_name,
            embedding=embedding,
            limit=1,
            min_relevance_score=min_relevance_score,
            with_embeddings=with_embedding,
        )

Reproduce

import asyncio, numpy as np
from semantic_kernel.memory.volatile_memory_store import VolatileMemoryStore
from semantic_kernel.memory.memory_record import MemoryRecord

async def main():
    s = VolatileMemoryStore()
    await s.create_collection("c")
    await s.upsert("c", MemoryRecord.local_record("id1", "text", "desc", None, np.array([1.0, 0.0])))
    m = await s.get_nearest_match("c", np.array([1.0, 0.0]))
    print(type(m))

asyncio.run(main())

Output on semantic-kernel main (also 1.44.1): <class 'coroutine'>

Expected

await store.get_nearest_match(...) returns a (MemoryRecord, score) tuple, as MemoryStoreBase.get_nearest_match documents. ChromaMemoryStore.get_nearest_match already does this: results = await self.get_nearest_matches(...) followed by return results[0].

Notes

The class is deprecated, but it is still exported from semantic_kernel.memory. I can send a fix with a test.

Dominant language
C#
Stars
28.6k
Forks
4.8k
Avg merge
1d 18h
Merged PRs (30d)
19

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/semantic-kernel

All issues in microsoft/semantic-kernel

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.