Dataset Viewer (First 5GB)
Auto-converted to Parquet Duplicate
id
stringlengths
4
9
url
stringlengths
31
139
title
stringlengths
1
87
text
stringlengths
100
71.9k
embedding
sequencelengths
1.02k
1.02k
12_0
https://en.wikipedia.org/wiki/Anarchism
Anarchism
Anarchism is a political philosophy and movement that is against all forms of authority and seeks to abolish the institutions it claims maintain unnecessary coercion and hierarchy, typically including the state and capitalism. Anarchism advocates for the replacement of the state with stateless societies and voluntary f...
[ 0.015565808862447739, -0.02798238769173622, 0.01776696927845478, 0.004955328535288572, -0.027027763426303864, -0.011141291819512844, 0.011518155224621296, 0.025978541001677513, 0.002751750173047185, 0.020350366830825806, -0.037649005651474, -0.010900432243943214, -0.02972341887652874, -0.0...
12_1
https://en.wikipedia.org/wiki/Anarchism
Anarchism
Although traces of anarchist ideas are found all throughout history, modern anarchism emerged from the Enlightenment. During the latter half of the 19th and the first decades of the 20th century, the anarchist movement flourished in most parts of the world and had a significant role in workers' struggles for emancipati...
[ 0.030748143792152405, -0.016899513080716133, 0.012191242538392544, 0.010739106684923172, -0.034160587936639786, -0.022253254428505898, -0.03245171532034874, 0.038106732070446014, 0.018405701965093613, 0.007620098069310188, 0.00007724245369900018, -0.0019728250335901976, -0.03684213012456894,...
12_2
https://en.wikipedia.org/wiki/Anarchism
Anarchism
Anarchists employ diverse approaches, which may be generally divided into revolutionary and evolutionary strategies; there is significant overlap between the two. Evolutionary methods try to simulate what an anarchist society might be like, but revolutionary tactics, which have historically taken a violent turn, aim to...
[ 0.008616175502538681, -0.02108541689813137, 0.0038226754404604435, 0.0283815860748291, -0.04584762454032898, -0.007629098370671272, -0.0050113871693611145, 0.01680654287338257, 0.0028955370653420687, 0.006772701628506184, -0.03125913813710213, -0.02420511469244957, -0.046258438378572464, -...
12_3
https://en.wikipedia.org/wiki/Anarchism
Anarchism
The etymological origin of anarchism is from the Ancient Greek anarkhia (ἀναρχία), meaning "without a ruler", composed of the prefix an- ("without") and the word arkhos ("leader" or "ruler"). The suffix -ism denotes the ideological current that favours anarchy. Anarchism appears in English from 1642 as anarchisme and a...
[ 0.024805083870887756, -0.025986630469560623, 0.021488556638360023, 0.006636918522417545, -0.029336851090192795, -0.033136457204818726, -0.01264971774071455, 0.02835911698639393, 0.03319856524467468, 0.01458626426756382, -0.012041146866977215, -0.00564712705090642, -0.04225841537117958, -0....
12_4
https://en.wikipedia.org/wiki/Anarchism
Anarchism
The first political philosopher to call himself an anarchist () was Pierre-Joseph Proudhon (1809–1865), marking the formal birth of anarchism in the mid-19th century. Since the 1890s and beginning in France, libertarianism has often been used as a synonym for anarchism and its use as a synonym is still common outside t...
[ 0.0040114992298185825, -0.02635842189192772, 0.017903823405504227, 0.005406462587416172, -0.0387355200946331, 0.0003469983930699527, -0.01604854315519333, 0.011566178873181343, 0.035226013511419296, 0.0465962290763855, -0.031591907143592834, 0.0014236451825127006, -0.03800184279680252, -0....
12_5
https://en.wikipedia.org/wiki/Anarchism
Anarchism
While the term libertarian has been largely synonymous with anarchism, its meaning has more recently been diluted by wider adoption from ideologically disparate groups, including both the New Left and libertarian Marxists, who do not associate themselves with authoritarian socialists or a vanguard party, and extreme cu...
[ 0.016252834349870682, -0.019036781042814255, -0.00987938791513443, 0.019920378923416138, -0.03812289983034134, -0.012061742134392262, 0.015641633421182632, 0.04291560873389244, 0.024537643417716026, 0.028548482805490494, -0.030920660123229027, -0.005480120424181223, -0.029600126668810844, ...
12_6
https://en.wikipedia.org/wiki/Anarchism
Anarchism
While opposition to the state is central to anarchist thought, defining anarchism is not an easy task for scholars, as there is a lot of discussion among scholars and anarchists on the matter, and various currents perceive anarchism slightly differently. Major definitional elements include the will for a non-coercive s...
[ 0.0449158139526844, 0.00007533368625445291, 0.0031650725286453962, 0.002706361236050725, -0.019875915721058846, -0.035733941942453384, -0.009476999752223492, 0.022510044276714325, 0.002509385347366333, 0.03229150176048279, -0.011715586297214031, -0.059242356568574905, -0.04501676931977272, ...
12_7
https://en.wikipedia.org/wiki/Anarchism
Anarchism
The most notable precursors to anarchism in the ancient world were in China and Greece. In China, philosophical anarchism (the discussion on the legitimacy of the state) was delineated by Taoist philosophers Zhuang Zhou and Laozi. Alongside Stoicism, Taoism has been said to have had "significant anticipations" of anarc...
[ 0.0134629150852561, -0.00620637834072113, 0.0029351941775530577, 0.018151653930544853, -0.035777267068624496, 0.04328032582998276, -0.021170347929000854, 0.011865722015500069, -0.0030029371846467257, 0.048186127096414566, -0.02019188366830349, -0.026311306282877922, -0.012922586873173714, ...
12_8
https://en.wikipedia.org/wiki/Anarchism
Anarchism
"Anarchic attitudes were also articulated by tragedians and philosophers in Greece. Aeschylus and So(...TRUNCATED)
[0.03033887967467308,-0.014639727771282196,0.02225208841264248,-0.017739947885274887,-0.023904183879(...TRUNCATED)
12_9
https://en.wikipedia.org/wiki/Anarchism
Anarchism
"In medieval Europe, there was no anarchistic activity except some ascetic religious movements. Thes(...TRUNCATED)
[0.02893832139670849,-0.0043683601543307304,-0.003672997700050473,-0.038462698459625244,-0.041749179(...TRUNCATED)
End of preview. Expand in Data Studio

Wikipedia Embeddings with BGE-M3

This dataset contains embeddings from the June 2024 Wikipedia dump for the 11 most popular languages.

The embeddings are generated with the multilingual BGE-M3 model.

The dataset consists of Wikipedia articles split into paragraphs, and embedded with the aforementioned model.

To enhance search quality, the paragraphs are prefixed with their respective article titles before embedding.

Additionally, paragraphs containing fewer than 100 characters, which tend to have low information density, are excluded from the dataset.

The dataset contains approximately 144 million vector embeddings in total.

Language Config Name Embeddings
English en 47_018_430
German de 20_213_669
French fr 18_324_060
Russian ru 13_618_886
Spanish es 13_194_999
Italian it 10_092_524
Japanese ja 7_769_997
Portuguese pt 5_948_941
Farsi fa 2_598_251
Chinese zh 3_306_397
Turkish tr 2_051_157
Total 144_137_311

Loading Dataset

You can load the entire dataset for a language as follows. Please note that for some languages, the download size may be quite large.

from datasets import load_dataset

dataset = load_dataset("Upstash/wikipedia-2024-06-bge-m3", "en", split="train")

Alternatively, you can stream portions of the dataset as needed.

from datasets import load_dataset

dataset = load_dataset(
    "Upstash/wikipedia-2024-06-bge-m3", "en", split="train", streaming=True
)

for data in dataset:
    data_id = data["id"]
    url = data["url"]
    title = data["title"]
    text = data["text"]
    embedding = data["embedding"]
    # Do some work
    break

Using Dataset

One potential use case for the dataset is enabling similarity search by integrating it with a vector database.

In fact, we have developed a vector database that allows you to search through the Wikipedia articles. Additionally, it includes a RAG (Retrieval-Augmented Generation) chatbot, which enables you to interact with a chatbot enhanced by the dataset.

For more details, see this blog post, and be sure to check out the search engine and chatbot yourself.

For reference, here is a rough estimation of how to implement semantic search functionality using this dataset and Upstash Vector.

from datasets import load_dataset
from sentence_transformers import SentenceTransformer
from upstash_vector import Index

# You can create Upstash Vector with dimension set to 1024,
# and similarity search function to dot product.
index = Index(
    url="<UPSTASH_VECTOR_REST_URL>",
    token="<UPSTASH_VECTOR_REST_TOKEN>",
)

vectors = []
batch_size = 200

dataset = load_dataset(
    "Upstash/wikipedia-2024-06-bge-m3", "en", split="train", streaming=True
)

for data in dataset:
    data_id = data["id"]
    url = data["url"]
    title = data["title"]
    text = data["text"]
    embedding = data["embedding"]

    metadata = {
        "url": url,
        "title": title,
    }

    vector = (
        data_id,  # Unique vector id
        embedding,  # Vector embedding
        metadata,  # Optional, JSON-like metadata
        text,  # Optional, unstructured text data
    )
    vectors.append(vector)

    if len(vectors) == batch_size:
        break

# Upload embeddings into Upstash Vector in batches
index.upsert(
    vectors=vectors,
    namespace="en",
)

# Create the query vector
transformer = SentenceTransformer(
    "BAAI/bge-m3",
    device="cuda",
    revision="babcf60cae0a1f438d7ade582983d4ba462303c2",
)

query = "Which state has the nickname Yellowhammer State?"
query_vector = transformer.encode(
    sentences=query,
    show_progress_bar=False,
    normalize_embeddings=True,
)

results = index.query(
    vector=query_vector,
    top_k=2,
    include_metadata=True,
    include_data=True,
    namespace="en",
)

# Query results are sorted in descending order of similarity
for result in results:
    print(result.id)  # Unique vector id
    print(result.score)  # Similarity score to the query vector
    print(result.metadata)  # Metadata associated with vector
    print(result.data)  # Unstructured data associated with vector
    print("---")
Downloads last month
3,071