AI search applications combine many different types of information. A single query might involve structured metadata, full-text search, vector similarity, business rules, user signals, and machine learning models before returning a result.

Many architectures store these data types in separate systems—using a relational database for structured data, a search engine for text, a vector database for embeddings, and additional infrastructure for ranking or inference. Every query then requires these systems to be coordinated before results can be combined.

Vespa takes a different approach. It stores structured data, text, vectors, and tensors within a single document model, allowing retrieval, filtering, ranking, and machine learning to operate on the same data in a single query pipeline.

Why it matters

A unified data model simplifies both application development and system architecture.

Instead of synchronizing multiple databases and merging results from independent retrieval systems, developers define a single schema that describes all the information required by the application.

This enables:

  • Hybrid retrieval without synchronizing multiple indexes
  • Filtering structured metadata alongside vector search
  • Ranking using lexical, semantic, behavioral, and business signals together
  • Machine learning inference over the same document representation
  • Simpler application development and operations

As AI applications evolve, new retrieval techniques can be incorporated without redesigning the underlying architecture or introducing additional infrastructure.

How the unified data model works in Vespa

Every Vespa application is built around one or more document schemas.

A schema defines both the structure of your data and how each field participates in retrieval, ranking, and serving. Rather than simply describing document fields, the schema determines how information is indexed, stored, filtered, ranked, and returned to applications.

Within a single document model, different fields can serve different purposes:

  • Structured fields support filtering, grouping, and business rules.
  • Text fields provide full-text search with linguistic processing.
  • Tensor fields enable vector search and semantic retrieval.
  • Metadata can be combined with lexical and semantic signals during ranking.
  • Machine learning models can consume any combination of these fields during inference.

Because every capability operates over the same document representation, queries remain within a single retrieval pipeline rather than crossing multiple independent systems.

This architecture enables hybrid search, retrieval-augmented generation (RAG), recommendations, personalization, and AI agents without requiring separate databases for different retrieval methods.

Getting started

The unified data model is configured through Vespa schemas.

Schemas define document types, field definitions, indexing behavior, ranking profiles, fieldsets, and other application configuration. They form the foundation of every Vespa application and determine how data is retrieved, ranked, and served.

The Vespa documentation explains how to:

  • Define document schemas
  • Configure field types and indexing
  • Create fieldsets and ranking profiles
  • Store vectors and tensors
  • Model relationships between documents
  • Evolve schemas as applications grow

Learn with Vespa

Learn how to build search, recommendation, and RAG applications with Vespa through a free, self-paced course that combines hands-on exercises with links to the documentation.

Frequently Asked Questions

Need more than a quick answer?

If these FAQs don't answer your question, there are several ways to continue:

Learn the fundamentals with our free online training at learn.vespa.ai.

Experience Vespa yourself with a free Vespa Cloud trial.

Watch the Getting Started with Vespa AI Search YouTube video

Contact our team to discuss your application or migration project.
What is a unified data model?
A unified data model stores structured data, full text, vectors, and tensors within a single document model. Rather than maintaining separate databases for different retrieval methods, applications can retrieve, filter, rank, and run machine learning over the same data using a single query pipeline.
Why is a unified data model important for AI search?
AI search combines many retrieval signals, including keyword search, vector similarity, structured metadata, personalization, and business rules. A unified data model allows these signals to work together without synchronizing multiple databases or merging results from separate systems, simplifying application architecture while improving retrieval quality.
Does a unified data model replace a vector database?
A unified data model includes vector search, but also supports structured data, full-text search, filtering, ranking, and machine learning within the same architecture. This allows AI applications to combine multiple retrieval techniques without introducing additional infrastructure for different data types.
What data types can Vespa store?
Vespa supports structured fields, full-text content, vectors, tensors, geographic data, arrays, maps, and document references within the same document model. Applications can combine these data types in a single query and use them together for retrieval, ranking, and machine-learning inference.
How do I define a unified data model in Vespa?
The unified data model is defined using Vespa schemas. Schemas describe document types, field definitions, indexing behavior, ranking profiles, and other application configuration, providing a single definition for how data is stored, retrieved, and ranked.