Closed wbleonard closed 5 months ago
Hi Brian,
Thanks for the suggestion. We thought about having some generic MongoDB ingest source, but couldn't come up with a useful generalizable pattern for ingesting arbitrary MongoDB data.
We do use MongoDB as a data source in some of our data source implementations. Here's an example: https://github.com/mongodb/chatbot/blob/main/packages/mongodb-rag-ingest/src/sources/DevCenterDataSource.ts
As one MDB employee to another, thinking about what's most useful for the company, I also wonder if it'd make more sense to have a LangChain JS MongoDB DocumentLoader (https://js.langchain.com/v0.1/docs/modules/data_connection/document_loaders/custom/). There's already a Python equivalent (https://python.langchain.com/v0.1/docs/integrations/document_loaders/mongodb/). Then we could wrap the LangChain document loader with the framework's makeLangChainDocumentLoaderDataSource() function.
Hey Ben,
Indeed. I just slacked you my Aha request for the LangChain JS loader :-).
And thanks for the additional example. I'm been referencing this other example up to now: https://github.com/mongodben/ingest-customers/blob/main/src/data-sources/MongoDbDotComCustomersDataSource.ts
/Brian
And thanks for the additional example. I'm been referencing this other example up to now: https://github.com/mongodben/ingest-customers/blob/main/src/data-sources/MongoDbDotComCustomersDataSource.ts
this should be a good reference as well!
It would be nice to ingest data into Pages where MongoDB is the content source, with the idea that I could chat with my MongoDB collections.
https://github.com/mongodb/chatbot/blob/main/packages/mongodb-rag-ingest/src/sources/index.ts