HNHacker News
TopNewBestAskShowJobs

mingtianzhang

193 karma · joined February 16, 2023

personal website: mingtian.ai
submissionscomments
mingtianzhang··on Do the simplest thing that could possibly work
This is also called occam's razor principle.
mingtianzhang··on Essential Coding Theory [pdf]
For other AI systems like recognition/classification models, they are lossy.
mingtianzhang··on Essential Coding Theory [pdf]
I mean, all likelihood-based generative models can be used as lossless compressors (by using arithmetic coding). The likelihood of a generated text corresponds exactly to its minimal code length under the model in practice. Thus, all current likelihood-based generative models are exact lossless compressors.
mingtianzhang··on SynthID – A tool to watermark and identify content generated through AI
For images/video/audio, removing such a watermark is very simple. By adding noise to the generated image and then using an open-source diffusion model to denoise it, the watermark can be broken. Or in an autoregressive model, use an open-sourced model to do generation with "teacher forcing" loll.
mingtianzhang··on SynthID – A tool to watermark and identify content generated through AI
1. One-sample detection is impossible. These detection methods work at the distributional level—more like a two-sample test in statistics—which means you need to collect a large amount of generated text from the same model to make the test significant. Detecting based on a short piece of generated text is theoretically impossible. For example, imagine two different Gaussian distributions: you can never be 100% certain whether a single sample comes from one Gaussian or the other, since both share the same support.

2. Adding watermarks may reduce the ability of an LLM, which is why I don’t think they will be widely adopted.

3. Consider this simple task: ask an LLM to repeat exactly what you said. Is the resulting text authored by you, or by the AI?

mingtianzhang··on The Theoretical Limitations of Embedding-Based Retrieval
Yeah, I guess another point is that with ToC, metadata representation is transparent—people know what information is lost. On the other hand, vector-based representation is a black box. Explainability and transparency are also important considerations in production-level AI systems.
mingtianzhang··on The Theoretical Limitations of Embedding-Based Retrieval
It is also worth mentioning that compression and generative AI are two sides of the same coin. I highly recommend the book "Information Theory, Inference, and Learning Algorithms" by David MacKay, which explores these deep connections.
mingtianzhang··on The Theoretical Limitations of Embedding-Based Retrieval
A follow-up question is: what is the lossless way to represent knowledge? That would mean reading all the knowledge at once, which is the most accurate but also the least efficient method. Therefore, for different applications, we need to find an appropriate trade-off between accuracy and efficiency. In systems like real-time recommendation, we prefer efficiency over accuracy, so vector-based search is suitable. In domain-specific QA, we prefer accuracy over efficiency, so maybe a table-of-contents–based search may be the better choice.
mingtianzhang··on The Theoretical Limitations of Embedding-Based Retrieval
We are always looking for representations that can capture the meaning of information. However, most representations that compress information for retrieval are lossy. For example, embeddings are a form of lossy compression. Similar to the no-free-lunch theorem, no lossy compression method is universally better than another, since downstream tasks may depend on the specific information that gets lost. Therefore, the question is not which representation is perfect, but which representation is better aligned with an AI system. Because AI evolves rapidly, it is difficult to predict the limitations of the next generation of LLMs. For this reason, a good representation for information retrieval in future LLM systems should be closer to how humans represent knowledge.

When a human tries to retrieve information in a library, they first locate a book by category or by using a metadata keyword search. Then, they open the table of contents (ToC) to find the relevant section, and repeat this process as needed. Therefore, I believe the future of AI retrieval systems should mimic this process. The recently popular PageIndex approach (see this discussioin: https://news.ycombinator.com/item?id=45036944) also belongs to this category, as it generates a table-of-contents–like tree for LLMs to reason over. Again, it is a form of lossy compression, so its limitations can be discussed. However, this approach is the closest to how humans perform retrieval.

mingtianzhang··on Essential Coding Theory [pdf]
It would be interesting to add more lossless compression stuff, which has a close connection to generative AI.

This PhD thesis gives a very good introduction: https://arxiv.org/abs/2104.10544

mingtianzhang··on Show HN: PageIndex – Vectorless RAG
Our PageIndex for HTML will be open-sourced next week, we are actually working on that!
mingtianzhang··on Show HN: PageIndex – Vectorless RAG
LLM-only RAG for small corpora looks super interesting!
mingtianzhang··on Show HN: PageIndex – Vectorless RAG
I just realized that the whole Hacker News discussion is formalized as a tree, and I am using my eyes to tree search through the tree to retrieve ideas from the insightful comments.
mingtianzhang··on Show HN: PageIndex – Vectorless RAG
You could also try PageIndex OCR, the first long-context OCR model. Most current OCR tools process each page independently, which causes them to lose the document’s structure and produce markdown with incorrect heading levels. PageIndex OCR generates markdown with more accurate heading levels to better capture the document’s structure.
mingtianzhang··on Show HN: PageIndex – Vectorless RAG
Yeah, thanks for pointing out the OCR! We also found that for complex PDFs, you first need to use OCR to convert them into Markdown and then run PageIndex. However, most OCR tools process each page independently, which causes them to lose the overall document structure. For example, existing OCR tools often generate incorrect heading levels, which is a big problem if you want to build a tree structure from them. You could check out PageIndex-OCR, the first long-context OCR model that can produce Markdown with more accurate heading-level recognition.
mingtianzhang··on Show HN: PageIndex – Vectorless RAG
Thanks, that’s a great point! That’s why we use the tree structure, which can search layer by layer without putting the whole tree into the context (to compromise the summary quality). We’ll update with more examples and experiments on this. Thanks for the suggestion!
mingtianzhang··on Show HN: PageIndex – Vectorless RAG
In this approach, the documents need to be pre-processed once to generate a tree structure, which is slower than the current vector-based method. However, during retrieval, this approach only requires conditioning on the context for the LLM and does not require an embedding model to convert the query into vectors. As a result, it can be efficient when the tree is small. When the tree is large, however, this approach may be slower than the vector-based method since it prioritizes accuracy. If you prioritize speed over accuracy, then I guess you should use Vector DB.
mingtianzhang··on Show HN: PageIndex – Vectorless RAG
But different people may have different ways. For example, I use command+f in macbook.
mingtianzhang··on Show HN: PageIndex – Vectorless RAG
A good thing about tree representation compared to a 'list' representation is that you can search hierarchically, layer by layer, in a large tree. For example, AlphaGo performs search in a large tree. Since the scale of retrieval is smaller than that of the Go game, I guess this framework can scale very well.
mingtianzhang··on Show HN: PageIndex – Vectorless RAG
Strongly agree! It is basically the Mone-Carlo tree search method used in Alpha Go! This is also mentioned in one of their toturials: PageIndex/blob/main/tutorials/doc-search/semantics.md. I believe it will make the method more scalable for large documents.
mingtianzhang··on Show HN: PageIndex – Vectorless RAG
I think it only needs to generate the tree once before retrieval, and it doesn’t require any external model at query time. The indexing may take some time upfront, but retrieval is then very fast and cost-free.
mingtianzhang··on Show HN: PageIndex – Vectorless RAG
In their gitHub repo’s readme, they show a benchmark on FinanceBench and found that PageIndex-based retrieval significantly outperforms vector-based methods. I’ve noticed that in domain-specific documents, where all the text has similar “semantic vibes,” non-vector methods like PageIndex can be more useful. In contrast, for use cases like recommendation systems, you might actually need a semantic-vibe search.
mingtianzhang··on Show HN: PageIndex – Vectorless RAG
A good thing about tree representation compared to a 'list' representation is that you can search hierarchically, layer by layer, in a large tree. For example, AlphaGo performs search in a large tree. Since the scale of retrieval is smaller than that of the Go game, I guess this framework can scale very well.
mingtianzhang··on Show HN: PageIndex – Vectorless RAG
A good thing about tree representation compared to a 'list' representation is that you can search hierarchically, layer by layer, in a large tree. For example, AlphaGo performs search in a large tree. Since the scale of retrieval is smaller than that of the Go game, I guess this framework can scale very well.
mingtianzhang··on Show HN: PageIndex – Vectorless RAG
Yeah, they share a similar intuition. I found that the difference is that PageIndex is more of a learning-free approach, more like how a human would do retrieval?
mingtianzhang··on Show HN: PageIndex – Vectorless RAG
Strongly agree, I also found txtai is super interesting! Thank you for your open-source effort!
mingtianzhang··on Vectorless RAG with a Table of Contents
We wrote a short tutorial on vectorless RAG with a Table of Contents (ToC). In this tutorial, we use PageIndex to create an LLM-friendly ToC for retrieval instead of using chunking/vectors.

Since a ToC is the human way of doing retrieval, we believe AI should work more like humans—and also benefit from this method.

We’re keen to hear your feedback on this approach.

mingtianzhang··on Show HN: Vectorless RAG
Hey, we use PageIndex to generate "Table of Contents" to do retreival without Vector DBs.

Github version can be found: https://github.com/VectifyAI/PageIndex/blob/main/cookbook/pa...

Any feedbacks are welcome!

mingtianzhang··on Show HN: I replaced vector databases with Git for AI memory (PoC)
Very interesting idea! I also replaced vector databases with "Table of Content" for retrieval: https://colab.research.google.com/github/VectifyAI/PageIndex...
mingtianzhang··on Do You Like Vibe Retrieval (RAG)?
Thanks, I like the name lol.
← PreviousPage 2 of 3Next →