Lesson 1 of 2 External AI Models

Evaluating Embedding and Chat Models

This lesson explains the criteria for choosing embedding and chat models, including languages, modality, dimensions, size and structured output.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify the evaluation criteria for embedding models.
  • Explain how model dimensions affect vector storage.
  • Describe the role of model size and structured output for chat models.

Embedding models

An embedding model converts text (or images) into a vector of numbers so that items with similar meaning have nearby vectors. The model determines what similarity means, so it must suit the data and the questions. The main evaluation criteria are listed below.

  • Languages: a multilingual model maps text in different languages into the same space, so a question in Spanish finds documents in English; an English-only model does not.
  • Modality: a multimodal model embeds images and text into one space, which enables searching product photos with text or finding similar images.
  • Dimensions: more dimensions can capture more nuance but cost more storage and slower comparisons; text-embedding-3-small returns 1,536 and text-embedding-3-large 3,072, and both accept a dimensions parameter to shorten the output.
  • Domain fit and quality: measured on a test set of real questions and known relevant items, not on general benchmarks alone.
  • Cost, latency, limits and lifecycle: price per token, maximum input tokens, regional availability and retirement dates.

Dimensions connect directly to database design: the vector type stores up to 1,998 float32 dimensions or 3,996 float16 dimensions, so a 3,072-dimension model needs float16 storage or a reduced dimensions setting. Vectors from different models, or the same model with different dimensions, are not comparable, so changing models means re-embedding all data.

Scenario questions

Choosing an embedding model

Exam skills 3.1.1

Choose the embedding model property that matters for each requirement.

Log in to try this activity Interactive activities are free with an account.

Chat models

A chat model generates the answer in a RAG solution or extracts information from text. Criteria include answer quality on the task, the context window (how much retrieved data fits in one request), latency and cost per token, availability in the required region, and the model's lifecycle. Model size drives the trade-off: small models, such as mini and nano variants, are fast and cheap for classification, extraction and short answers, while larger and reasoning models handle complex synthesis and multi-step questions at higher cost and latency. A common pattern uses a small model by default and a larger one only where evaluation shows it is needed.

Sort into groups

Small or large model?

Exam skills 3.1.1

Decide whether each task suits a small or a large chat model.

Log in to try this activity Interactive activities are free with an account.

Structured output

Structured output lets a request include a JSON schema (through response_format with type json_schema) that the model's response must follow. For database solutions this is important: the response can be parsed reliably with OPENJSON into typed columns, for example extracting product attributes from free text or classifying support tickets. Plain JSON mode only promises valid JSON, not a particular shape, and unstructured text needs fragile parsing. The criteria for both model types are summarized in the following comparison.

Embedding model
OutputA fixed-length vector
Key criteriaLanguages, modality, dimensions, retrieval quality
Database impactvector column size and index; re-embedding on change
Choose when Semantic and hybrid search
Chat model
OutputText or structured JSON
Key criteriaQuality, context window, size, structured output support
Database impactPrompt size and response parsing
Choose when RAG answers, extraction and classification
Scenario questions

Getting parseable output

Exam skills 3.1.1 · 3.3.5

Choose the response option for each requirement.

Log in to try this activity Interactive activities are free with an account.
Worked example

A multilingual catalogue

A retailer's product descriptions are in English, but customers search in English, French and German. Product photos should later be searchable by text too. The team wants vectors stored in Azure SQL Database with float32 precision. What should guide the model choice?

Choose a multilingual embedding model so questions in any of the three languages land near English descriptions, plan a multimodal model for the photo search (or a model family that supports both), and choose dimensions of 1,998 or fewer, using the model's dimensions parameter if necessary. Translating every query first adds latency and cost, and a 3,072-dimension output does not fit a float32 vector column.

Check yourself

Are vectors from two different embedding models comparable?

Show answer

No. Each model has its own vector space, so changing models requires re-embedding all data.

Exam Tips

Remember for the exam

  • Questions and documents in different languages: a multilingual embedding model.
  • Search images by text: a multimodal embedding model.
  • float32 vectors hold up to 1,998 dimensions; reduce dimensions or use float16.
  • Parse model output reliably: structured output with a JSON schema.