Comments (6)
@xbotter have you considere using tags and filters?
E.g. rather than multiple files in the one document, uploading multiple documents with the same tag:
var knowledgeBase1 = "001":
var knowledgeBase2 = "ABC":
await memory.ImportDocumentAsync(new Document()
.AddFile("file1.pdf").AddTag("KnowledgeBase", knowledgeBase1));
await memory.ImportDocumentAsync(new Document()
.AddFile("file2.pdf").AddTag("KnowledgeBase", knowledgeBase1));
await memory.ImportDocumentAsync(new Document()
.AddFile("file3.pdf").AddTag("KnowledgeBase", knowledgeBase1));
await memory.ImportDocumentAsync(new Document()
.AddFile("foobar.docx").AddTag("KnowledgeBase", knowledgeBase2));
var answer = await memory.AskAsync(question,
MemoryFilters.ByTag("KnowledgeBase", knowledgeBase1));
from kernel-memory.
Currently there's no API to directly edit the content of a document, and we use the ImportDocumentAsync
API to refresh the document, passing the original Document ID, re-uploading the document without the file to remove.
We'll improve this area soon :-)
from kernel-memory.
We added the ability to delete documents. It doesn't fully address your question but it might help if you put one file per document.
from kernel-memory.
In my use case, I am trying to use Document as a knowledge database that can be managed in the form of maintaining files.
This requires performing operations to add, delete, and replace files in the Document.
I wonder if this scenario can be supported from semantic memory or if there are better practical methods available?
from kernel-memory.
Thanks @dluc , I have successfully fulfilled my use case based on your suggestions and reference documents.
from kernel-memory.
We added the ability to delete documents. It doesn't fully address your question but it might help if you put one file per document.
Delete and then re-upload, it worked.
from kernel-memory.
Related Issues (20)
- [Feature Request] Hybrid Vector and Traditional Search
- [Feature Request] Modifying Sliced Documents
- [Question] How to use a kernel memory plugin with other plugins? HOT 1
- [Question] I wrote a serverless guide HOT 2
- [Bug] Using Azure AI Search Memory DB, Error 503 is returned when a document comprises many partitions HOT 13
- [Feature Request] Handle pipeline failure HOT 3
- [Bug] Custom TextGenerator is broken with DI issue with .38. Works fine with .37 HOT 1
- [Question] How to count used tokens? HOT 9
- [Question] Timeout when connecting to Postgres HOT 5
- [Question] How to ingest/index existing data from database HOT 4
- [Bug] MsExcelDecoder.DecodeAsync only works on text data types HOT 1
- [Question] How to store references to pdf pages in chunks? HOT 6
- [Question] Why does StreamAsync is a property (instead of a GetStreamAsync method)? HOT 2
- [Question] Support for C# 12 HOT 3
- [Bug] Unable to install Kernal Memory Core without deprecated packages HOT 3
- [Question] Thoughts about Kernel Memory Core containing everything HOT 2
- [Question] Could we make ITextGenerator a loose dependency? HOT 2
- [Question] MemoryFilter mixing conditions HOT 3
- [Bug] "contentType" is not populated by WriteFileAsync in MongoDbAtlasStorage HOT 1
- [Bug] Content Storage File handles not properly disposed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kernel-memory.