The source files appear to include pages from all namespaces, which is good, because a lot of the value of Wikipedia articles is held in the talk page discussions, and these sometimes get stripped from projects that use Wikipedia dumps.
Vector indexing all of Wikipedia on a laptop
81–90 of 146 posts
Re: Vector indexing all of Wikipedia on a laptop
#82Can someone explain why?
Re: Vector indexing all of Wikipedia on a laptop
#83Earlier quoted context omitted.
I also don’t quite understand the value of embedding all languages into the same database. If I search for “dog” do I really need to see the same article 300 times? As a first step they are using PQ anyways. It seems natural to just assume all English docs have the same centroid and search that subspace with hnswlib.
It's split by language. TFA builds an index on the English language subset.
Re: Vector indexing all of Wikipedia on a laptop
#84The source files appear to include pages from all namespaces, which is good, because a lot of the value of Wikipedia articles is held in the talk page discussions, and these sometimes get stripped from projects that use Wikipedia dumps.
I'm curious what the main value you see in the talk pages? I almost never look at them myself.
Re: Vector indexing all of Wikipedia on a laptop
#85In expert topics, is vector search finally competitive with BM25-like algorithms? Or do we still need to mix the 2 together ?
https://arxiv.org/abs/2004.12832
https://thenewstack.io/overcoming-the-limits-of-rag-with-col...
Re: Vector indexing all of Wikipedia on a laptop
#86>Disable swap before building the index. Linux will aggressively try to cache the index being constructed to the point of swapping out parts of the JVM heap, which is obviously counterproductive. In my test, building with swap enabled was almost twice as slow as with it off. This is an indication to me that something has gone very wrong in your code base.
Re: Vector indexing all of Wikipedia on a laptop
#87Earlier quoted context omitted.
I routinely see Linux page memory out to swap while having 10+GB free. I can only guess that it really really really likes to cache recently used data from disk.
I've seen the same. It will sometimes prefer to swap rather than evict the disk cache. I don't know how Linux does this in particular, but intuitively swapping can make sense if part of your allocated RAM isn't being accessed often and the disk is. The kernel isn't going to know for sure of course, and seems in my case it guessed wrong.
It is much better to swap out anonymous memory that isn't being used than to flush file data that is being used. Or another way of looking at it if you run out of memory you will thrash with or without swap enabled. The difference is that with swap the kernel can evict the most rarely accessed memory whether file-backed or anonymous. Without swap the kernel is forced to only consider file-backed memory, even if it is being used more frequently than the anonymous memory.
Re: Vector indexing all of Wikipedia on a laptop
#88Earlier quoted context omitted.
Yes. I split the text into sentence and append sentences to a chunk until the max context window is reached. The context window size is dynamic for each article so that each chunk is roughly the same size. Then I just do a mean pool of the chunks for each article.
Thanks for the answer. Wikipedia has a lot of tables so I was wondering if content-aware sentence chunking would be good enough for Wikipedia. https://www.pinecone.io/learn/chunking-strategies/
Re: Vector indexing all of Wikipedia on a laptop
#89How is a log N search over S segments O(N)?
Re: Vector indexing all of Wikipedia on a laptop
#90“… turning an O(log N) search per segment into O(N) overall.” Can someone explain why?