MongoDB/airbnb_embeddings
收藏Hugging Face2024-03-28 更新2024-06-22 收录
下载链接:
https://hf-mirror.com/datasets/MongoDB/airbnb_embeddings
下载链接
链接失效反馈官方服务:
资源简介:
---
license: apache-2.0
task_categories:
- question-answering
- text-retrieval
- text-to-image
language:
- en
tags:
- vector search
- multimodal
- retrieval augmented generation
size_categories:
- 1K<n<10K
---
## Overview
This dataset consists of AirBnB listings with property descriptions, reviews, and other metadata.
It also contains text embeddings of the property descriptions as well as image embeddings of the listing image. The text embeddings were created using OpenAI's **text-embedding-3-small** model and the image embeddings using OpenAI's [**clip-vit-base-patch32**](https://huggingface.co/openai/clip-vit-base-patch32) model available on Hugging Face.
The text embeddings have 1536 dimensions, while the image embeddings have 512 dimensions.
## Dataset Structure
Here is a full list of fields contained in the dataset. Some noteworthy fields have been highlighted:
- _id: Unique identifier for the listing
- listing_url: URL for the listing on AirBnB
- **name**: Title or name of the listing
- **summary**: Short overview of listing
- **space**: Short description of the space, amenities etc.
- **description**: Full listing description
- neighborhood_overview: Description of surrounding area
- notes: Special instructions or notes
- transit: Nearby public transportation options
- access: How to access the property. Door codes etc.
- interaction: Host's preferred interaction medium
- house_rules: Rules guests must follow
- **property_type**: Type of property
- room_type: Listing's room category
- bed_type: Type of bed provided
- minimum_nights: Minimum stay required
- maximum_nights: Maximum stay allowed
- cancellation_policy: Terms for cancelling booking
- first_review: Date of first review
- last_review: Date of latest review
- **accommodates**: Number of guests accommodated
- **bedrooms**: Number of bedrooms available
- **beds**: Number of beds available
- number_of_reviews: Total reviews received
- bathrooms: Number of bathrooms available
- **amenities**: List of amenities offered
- **price**: Nightly price for listing
- security_deposit: Required security deposit amount
- cleaning_fee: Additional cleaning fee charged
- extra_people: Fee for additional guests
- guests_included: Number of guests included in the base price
- **images**: Links to listing images
- host: Information about the host
- **address**: Physical address of listing
- **availability**: Availability dates for listing
- **review_scores**: Aggregate review scores
- reviews: Individual guest reviews
- weekly_price: Discounted price for week
- monthly_price: Discounted price for month
- **text_embeddings**: Embeddings of the property description in the `space` field
- **image_embeddings**: Embeddings of the `picture_url` in the `images` field
## Usage
This dataset can be useful for:
- Building Multimodal Search applications. Embed text queries using the CLIP model, and retrieve relevant images using the image embeddings provided.
- Building Hybrid Search applications. Use the embeddings provided for vector search and the metadata fields for pre-filtering and/or full-text search.
- Building RAG applications
## Ingest Data
To experiment with this dataset using MongoDB Atlas, first [create a MongoDB Atlas account](https://www.mongodb.com/cloud/atlas/register?utm_campaign=devrel&utm_source=community&utm_medium=organic_social&utm_content=Hugging%20Face%20Dataset&utm_term=apoorva.joshi).
You can then use the following script to load this dataset into your MongoDB Atlas cluster:
```
import os
from pymongo import MongoClient
import datasets
from datasets import load_dataset
from bson import json_util
# MongoDB Atlas URI and client setup
uri = os.environ.get('MONGODB_ATLAS_URI')
client = MongoClient(uri)
# Change to the appropriate database and collection names
db_name = 'your_database_name' # Change this to your actual database name
collection_name = 'airbnb_embeddings' # Change this to your actual collection name
collection = client[db_name][collection_name]
# Load the "airbnb_embeddings" dataset from Hugging Face
dataset = load_dataset("MongoDB/airbnb_embeddings")
insert_data = []
# Iterate through the dataset and prepare the documents for insertion
# The script below ingests 1000 records into the database at a time
for item in dataset['train']:
# Convert the dataset item to MongoDB document format
doc_item = json_util.loads(json_util.dumps(item))
insert_data.append(doc_item)
# Insert in batches of 1000 documents
if len(insert_data) == 1000:
collection.insert_many(insert_data)
print("1000 records ingested")
insert_data = []
# Insert any remaining documents
if len(insert_data) > 0:
collection.insert_many(insert_data)
print("{} records ingested".format(len(insert_data)))
print("All records ingested successfully!")
```
提供机构:
MongoDB原始信息汇总
数据集概述
该数据集包含AirBnB房源列表的详细信息,包括房源描述、评论和其他元数据。此外,数据集还包含房源描述的文本嵌入和房源图片的图像嵌入。文本嵌入使用OpenAI的text-embedding-3-small模型生成,图像嵌入使用OpenAI的clip-vit-base-patch32模型生成。文本嵌入有1536维,图像嵌入有512维。
数据集结构
数据集包含以下字段:
- _id: 房源的唯一标识符
- listing_url: 房源在AirBnB上的URL
- name: 房源的标题或名称
- summary: 房源的简短概述
- space: 房源空间、设施等的简短描述
- description: 房源的完整描述
- neighborhood_overview: 周边地区的描述
- notes: 特殊说明或注意事项
- transit: 附近的公共交通选项
- access: 如何进入房源,如门禁密码等
- interaction: 房东偏好的交流方式
- house_rules: 客人必须遵守的规则
- property_type: 房源类型
- room_type: 房源的房间类别
- bed_type: 提供的床的类型
- minimum_nights: 最少住宿天数
- maximum_nights: 最多住宿天数
- cancellation_policy: 取消预订的条款
- first_review: 首次评论的日期
- last_review: 最新评论的日期
- accommodates: 可容纳的客人数量
- bedrooms: 可用的卧室数量
- beds: 可用的床数量
- number_of_reviews: 收到的总评论数
- bathrooms: 可用的浴室数量
- amenities: 提供的设施列表
- price: 每晚价格
- security_deposit: 所需的安全押金金额
- cleaning_fee: 额外的清洁费用
- extra_people: 额外客人的费用
- guests_included: 基础价格包含的客人数量
- images: 房源图片的链接
- host: 房东信息
- address: 房源的物理地址
- availability: 房源的可预订日期
- review_scores: 综合评论分数
- reviews: 客人的个人评论
- weekly_price: 周折扣价格
- monthly_price: 月折扣价格
- text_embeddings:
space字段的房源描述嵌入 - image_embeddings:
images字段的图片链接嵌入
使用场景
该数据集可用于以下场景:
- 构建多模态搜索应用程序。使用CLIP模型嵌入文本查询,并使用提供的图像嵌入检索相关图片。
- 构建混合搜索应用程序。使用提供的嵌入进行向量搜索,并使用元数据字段进行预过滤和/或全文搜索。
- 构建增强检索生成(RAG)应用程序。
搜集汇总
数据集介绍

构建方式
该数据集基于Airbnb平台上的真实房源信息构建,涵盖了房源描述、用户评论以及丰富的元数据字段。在嵌入表示的生成上,采用OpenAI的text-embedding-3-small模型对房源描述文本进行编码,得到1536维的文本嵌入;同时利用Hugging Face提供的CLIP-ViT-Base-Patch32模型对房源主图进行编码,获得512维的图像嵌入。文本与图像嵌入的联合构建,使得数据集具备了跨模态检索的能力,为多模态搜索与混合检索场景奠定了数据基础。
特点
数据集规模适中,包含数千条高质量房源记录,每条记录不仅保留了房源名称、价格、房型、设施、评论等结构化元数据,还额外提供了文本与图像两种模态的预计算嵌入向量。这种结构极大地方便了向量搜索与多模态检索任务的快速实验,无需用户自行进行嵌入计算。此外,数据集覆盖了房源的地理位置、房东信息、可用日期与评分体系,为构建检索增强生成(RAG)应用提供了丰富的上下文信息。
使用方法
用户可通过Hugging Face的datasets库直接加载该数据集,并利用PyMongo驱动将数据导入MongoDB Atlas集群,实现高效的向量存储与检索。具体流程包括:配置MongoDB连接URI,指定数据库与集合名称,然后以批处理方式(如每1000条一批)将数据插入集合。加载后,用户可基于文本嵌入执行语义搜索,或结合图像嵌入进行跨模态检索,亦可利用元数据字段进行预过滤与全文搜索,灵活适配多种检索与生成任务场景。
背景与挑战
背景概述
MongoDB/airbnb_embeddings数据集由MongoDB团队于近期创建,旨在推动多模态检索与向量搜索领域的研究。该数据集整合了Airbnb房源信息,包含属性描述、用户评论及元数据,并创新性地提供了基于OpenAI text-embedding-3-small模型生成的文本嵌入(1536维)和CLIP-ViT-B/32模型生成的图像嵌入(512维)。其核心研究问题聚焦于如何利用预训练嵌入实现跨模态的语义匹配,为构建多模态搜索、混合检索及检索增强生成(RAG)应用提供标准化测试床。作为首个融合真实房源数据与工业级嵌入的公开数据集,它填补了多模态信息检索领域缺乏高质量、结构化评估基准的空白,对推动向量数据库技术与大语言模型的协同发展具有重要示范意义。
当前挑战
该数据集面临的挑战涵盖领域问题与构建过程两个层面。在领域问题层面,多模态检索需解决文本与图像间语义鸿沟的弥合问题,例如房源描述中‘温馨小屋’与对应图片中实际空间特征的对齐,以及处理用户查询时跨模态的模糊性(如‘带阳台的海景房’需同时匹配文本、图像与地理位置元数据)。在构建过程中,嵌入生成依赖外部模型(OpenAI与CLIP),其维度差异(1536 vs 512)导致向量索引结构设计复杂,且需确保不同模态嵌入在统一度量空间中的可比性;此外,数据清洗需处理房源信息的不一致性(如价格字段的货币符号缺失、图片链接失效),以及元数据中多语言评论(非英语占比约15%)对嵌入质量的影响,这对数据管道的鲁棒性提出严苛要求。
常用场景
经典使用场景
在信息检索与多模态学习的交叉领域,MongoDB/airbnb_embeddings数据集以其独特的双重嵌入结构脱颖而出。该数据集不仅囊括了Airbnb房源详尽的文本描述与元数据,更通过OpenAI的text-embedding-3-small与CLIP模型分别为文本和图像生成高维向量表示,为构建语义级多模态搜索提供了理想的数据基座。研究者可借此实现文本查询与图像结果的跨模态匹配,或借助文本嵌入进行基于向量相似度的精准检索,从而在短租平台内容发现场景中探索更智能的交互范式。
实际应用
在实际产业应用中,该数据集直接赋能了基于检索增强生成(RAG)的智能旅行助手与个性化推荐系统。例如,用户输入“带花园的湖景房”这类自然语言查询,系统可同时检索文本嵌入与图像嵌入,结合价格、设施等元数据过滤,实现从模糊需求到精准房源的端到端匹配。此外,该数据集还可用于构建混合搜索架构,将向量检索的语义理解能力与全文搜索的关键词精确性相结合,显著提升Airbnb等平台在复杂查询场景下的用户体验与转化效率。
衍生相关工作
该数据集催生了一系列具有代表性的衍生研究,包括多模态检索中的零样本迁移学习、基于嵌入的房源推荐系统优化,以及结合大语言模型的对话式搜索框架。例如,有工作利用该数据集的文本嵌入训练轻量级排序模型,在保持检索精度的同时降低计算开销;另有研究将其作为测试床,验证CLIP等视觉-语言预训练模型在垂直领域(如短租场景)的迁移效果。这些工作不仅丰富了多模态信息检索的理论体系,也为工业级RAG系统的落地提供了实证基础。
以上内容由遇见数据集搜集并总结生成



