Compare two models on your own questions, and price them
Both models are toys with word tables, and the prices are example values (check your provider). The method, not the numbers, is what carries over.
Pick an embedding model by testing candidates on your own questions, not by reading a leaderboard alone. Weigh language, domain, input length, dimensions, cost, licence and where it runs. Changing the model later means re-embedding everything.
Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.
Ready for more? This phase has 5 hands-on exercises with automatic checks.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
Write first_place_rate(places) that takes a list of places (1 is first) and returns the fraction that are 1. Print it for [3, 4, 1, 1] and [1, 1, 1, 1] as a percentage with no decimals.
Write embedding_cost(chunks, tokens_per_chunk, price_per_mtok) and print the cost to embed 120,000 chunks of 350 tokens at an example price of 0.05 dollars per million tokens, to two decimals.
Explain it without notes
How would you choose an embedding model for a new RAG project?
Why are public leaderboards not enough to choose a model?
What is the cost of switching embedding models after launch?
What are the main differences between hosted and open-weights embedding models?
Expected output
small model: places [3, 4, 1, 1], first place for 2 of 4
large model: places [1, 1, 1, 1], first place for 4 of 4
embedding 50000 chunks with the small model: $0.40
embedding 50000 chunks with the large model: $2.60