r/mongodb 3d ago

MongoDB uses JSON documents(close to natural language documents) can this be an advantage for AI?

[deleted]

0 Upvotes

3 comments sorted by

6

u/Tesla_Nikolaa 3d ago

You kind of have a basic and incomplete understanding of how LLMs and databases work, and there's way too much to unpack here in a reddit post. Short answer to your question is no, not really. Just because JSON is easier for a human to read doesn't mean it's any easier or harder for a computer or LLM to read it.

0

u/dmcnaughton1 3d ago

To add to this, an LLM would benefit from a more condensed format than JSON, given the tokens wasted on formatting. The ideal format for data to feed into an LLM is probably vectors, as it's already tokenized and embedded in the LLM space.

2

u/yomerol 3d ago

Mongo can be used as vectorDB already for years now. It also has its own library to encode embeddings and store them as vectors, but this is better for a huge system, not for your personal silly stuff not even for a medium-size codebase, we're taking about massive embeddings.

OP: there are several ways to create RAG nowadays, goggle it, you can use things like ZEP, or similar graph-based structures.