aifree.dev

Why does it find "car" when I searched "automobile"?

Semantic search: embeddings and cosine similarity · Beginner · 5 min · embeddings, rag · after Embeddings

Semantic search turns the query and every document into embeddings, lists of numbers whose direction follows meaning, and returns the documents pointing closest to the query (cosine similarity), even when they share no word with it.

Before you start: could you explain this to a friend?

1 = not at all · 5 = easily

  1. 1 Guess first

    You search nine notes for “automobile”. None contains that word. Which note does a search by meaning (the all-MiniLM-L6-v2 embedding model) put first?
  2. 2 Look

    Search by meaning

    1 / 4

    keyword search: notes that contain a word of “automobile”

    No note contains that word.

    search by meaning: the three closest notes

    • My car won’t start in the cold.0.29
    • Automatic door repair service0.23
    • Best tyres for a family hatchback0.16

    measured with all-MiniLM-L6-v2 (384 numbers per text) · cosine similarity · 2026-10-23

    No note says “automobile”. Keywords find nothing; meaning finds the car.

    Turn the query and every note into a point; the search returns the nearest points, whatever words they use.

  3. This is semantic search. An embedding model turns each note into 384 numbers once, ahead of time. Your query gets its own 384 numbers, and the search compares directions: cosine similarity, 1 for the same direction, near 0 for unrelated. “Automobile” and “car” appear in the same company in text, so their directions agree.

  4. 4 You are the model

    You are the search. For four queries, pick the note that points closest to the query: the one all-MiniLM-L6-v2 ranks first.

    you are the search · pick the note that points closest to the query

    Search: “feline”

    measured with all-MiniLM-L6-v2 (384 numbers per text) · cosine similarity · 2026-10-23

    You are the search. Which note points closest?
  5. 5 Check

    In the picture, search “airplane tickets”. Which note comes first?
  6. Two habits for real apps. Set a minimum score, so “nothing close” can be an answer. And keep a keyword search too: embeddings blur exact things like error codes, names and “not”. Many search tools mix both (hybrid search). In RAG, the nearest passages are what gets pasted into the prompt.

  7. 7 Say it back

  8. 8 Mission · 5 min

    Copy the free key on Jina’s embeddings page (no card) and embed four texts in one request with "normalized": true: “automobile”, “My car won’t start”, “Automatic door repair”, “Mobile phone deals”. With normalized vectors, cosine is a plain dot product (SUMPRODUCT in a spreadsheet). Does the car note win without sharing a word?

Three quick ones

Drawn at random from this lesson's pool; different next time.

Done?

Now: could you explain this to a friend?

1 = not at all · 5 = easily

Answer the three quick ones first.

Sources

  • Cosine similarities measured with sentence-transformers/all-MiniLM-L6-v2 (https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2: 384 dimensions, mean pooling, normalised) on 2026-10-23 by scripts/explain-data/semantic-search.ts (plain forward pass, no torch), which reproduces the published example below exactly
  • https://sbert.net/docs/sentence_transformer/usage/semantic_textual_similarity.html (checked 2026-10-23): all-MiniLM-L6-v2 on “The weather is lovely today.”, “It’s so sunny outside!”, “He drove to the stadium.” gives 0.6660, 0.1046, 0.1411
  • Scores used (query → note): automobile → car 0.288, automatic door 0.233, tyres 0.162, phone deals 0.116, cat on the sofa −0.080; feline → kitten 0.312, cat 0.271; my vehicle broke down → car 0.387, door 0.256, bicycle 0.217; airplane tickets → flights 0.343, phone deals 0.303; quantum physics homework → pasta 0.132 (best of nine)
  • Pairs: “I love this car.” / “I do not love this car.” 0.775; “Flights from London to Paris” / “Flights from Paris to London” 0.997; “Error code E-4012” / “Error code E-4013” 0.908
  • The nine notes and five queries were written for the lesson. The 2-D map is the first two principal components of their 14 embeddings, scaled to 5–95; nearest notes and scores use all 384 numbers
  • https://jina.ai/embeddings/ (checked 2026-10-23): new users get an auto-generated API key with free tokens; free keys 100 RPM and 100K TPM; endpoint https://api.jina.ai/v1/embeddings, jina-embeddings-v5-text-small recommended for text; aifree.dev catalog jina-ai-free-api-tokens (verified 2026-10-12): 10M tokens per new API key, no card

Published Oct 23, 2026 · updated Oct 23, 2026

Embed this

Paste this into a blog post or course page: the lesson's main picture in an iframe, with a link back to the full lesson.

<iframe src="https://aifree.dev/embed/explain/semantic-search" width="100%" height="620" style="border:0;max-width:720px" title="Why does it find &quot;car&quot; when I searched &quot;automobile&quot;? (aifree.dev Explain)" loading="lazy"></iframe>
<p><a href="https://aifree.dev/explain/semantic-search">Why does it find &quot;car&quot; when I searched &quot;automobile&quot;? Interactive lesson on aifree.dev</a></p>

Never miss new offers and news

New tools, credits, and AI news are added regularly. Pick how you want to hear about them.

Telegram channel
Join @aifree_dev and get new free AI offers and news right in your Telegram feed.
Browser notifications
Turn on push notifications and get an alert on this device whenever something new is posted. No account needed.
Email newsletter
A weekly digest of new, changed and expiring free AI offers. Double opt-in, one-click unsubscribe.

Unsubscribe anytime. Privacy

Frequently asked questions

What is aifree.dev?

aifree.dev helps everyone access AI through a curated directory of free AI tools, API credits, free tiers, and startup programs for coding, image, voice, video, and students - verified regularly.

How are offers presented?

Each offer includes its access details, free models when available, and expiration information when provided. Limited-time deals stay visible so they are easy to compare.

Do education and startup programs need verification?

Yes. Providers usually ask students to verify their status with a school email, student ID, or a program like the GitHub Student Pack, and ask startups to verify company details such as age, funding, or website. Check each offer’s claim page for the exact requirements.

What kinds of free AI offers are listed?

Free tiers and free trials from AI providers, free API credits, startup and student programs, and free tools for coding, image generation, voice, and video.

How can I suggest a tool or report a broken link?

Use the submit form: paste the offer page URL and a short note. A person checks every submission before anything is listed. Broken links and changed terms go through the same form.

+

Know a good one?

Tell us about an AI tool worth knowing. Found a broken link? We want to hear that too.

Submit an offer