Repository navigation
Why doesn't SemanticTextMemory.SaveSaveReferenceAsync store the text? #438
|
Based on the source code, I found that the method generates an embedding based on the text input, but it doesn't actually store the text in the MemoryRecord. As a result, when I try to search for the text, I can't retrieve it from the MemoryRecord. I'm not sure why it was designed this way and would appreciate some clarification. |
Replies: 1 comment 2 replies
|
Context: there are 2 save methods associated with SemanticTextMemory -
Scenario Examples:
vs
I hope this helps! |
Hi xbotter (@xbotter).
Context: there are 2 save methods associated with SemanticTextMemory -
SaveReferenceandSaveInformation.SaveReferenceis intended to save information from a known source - this way you can store an embedding and recreate it from the source without having to take up space also storing the source text.SaveInformationis intended to save information where the source text cannot be referenced.Scenario Examples:
SaveReference( collection: "Semantic Kernel GitHub", externalId: "https://github.com/microsoft/semantic-kernel/discussions/438", sourceName: "Semantic Kernel Discussions", text: text, description: "Why doesn't SemanticTextMemory.SaveReference store the text?")