liveBook · Manning

Hugging Face Datasets

As explained in Build an Advanced RAG Application (From Scratch)

Hugging Face Datasets is a Python library and ecosystem for accessing, processing, and sharing machine-learning datasets.

Hugging Face Datasets provides a practical entry point for loading machine-learning data into a semantic-search pipeline. A typical workflow loads a hosted dataset, selects its train split, converts it to pandas, inspects the schema, and filters records for a target locality. section 4.1

A minimal hotel-review data workflow:

  • Install the library and import pandas alongside load_dataset. section 4.1
  • Load traversaal-ai-hackathon/hotel_datasets and extract its train split. section 4.1
  • Convert the dataset to a pandas DataFrame and inspect its first rows. section 4.1
  • Filter records to Paris and count hotels by hotel_name. section 4.1
dataset = load_dataset("traversaal-ai-hackathon/hotel_datasets")

Load the hosted hotel dataset before converting its train split for tabular analysis. section 4.1

df_paris = df.loc[df.locality == 'Paris']

Narrow the DataFrame to Paris hotels before continuing semantic-search preparation. section 4.1

How Build an Advanced RAG Application (From Scratch) covers it

How deep it goes
Demonstrates installation, loading, split extraction, DataFrame conversion, inspection, and filtering, stopping before advanced retrieval systems.
Examples
Uses hotel reviews and descriptions, filters for Paris, inspects rows, and counts hotels by name.
What you can do after
Build a filtered pandas dataset from a hosted machine-learning dataset for downstream semantic-search work.
How it connects
Connects dataset loading with pandas, DataFrames, filtering, exploratory analysis, and semantic search.

Also explained in

Compare how 2 books explain Hugging Face Datasets →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build an Advanced RAG Application (From Scratch). The section links point to the parts of the book it draws on.