Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sicherheitslücken (CVE)USN-8797-1: GStreamer Base Plugins vulnerability(21.09.2026 um 20:05 Uhr)
Sichere ProgrammierungYou can build HTML emails with Tailwind CSS(21.09.2026 um 22:15 Uhr)
Sichere ProgrammierungDEV-Part-1-Backend.md(21.09.2026 um 22:24 Uhr)
Sichere ProgrammierungWhat It Actually Costs to Serve a 1M-Token Model in Production(21.09.2026 um 22:33 Uhr)
Sichere ProgrammierungHow to Check an Agent's Diagnosis Before It Touches Production(21.09.2026 um 22:53 Uhr)
Linux Tipps & HardeningWhat if Spotify was self-hosted? I think I got pretty close.(21.09.2026 um 22:33 Uhr)
Linux Tipps & HardeningSandboxing on Linux(21.09.2026 um 22:45 Uhr)
Sicherheitslücken (CVE)USN-8797-1: GStreamer Base Plugins vulnerability(21.09.2026 um 20:05 Uhr)
Sichere ProgrammierungYou can build HTML emails with Tailwind CSS(21.09.2026 um 22:15 Uhr)
Sichere ProgrammierungDEV-Part-1-Backend.md(21.09.2026 um 22:24 Uhr)
Sichere ProgrammierungWhat It Actually Costs to Serve a 1M-Token Model in Production(21.09.2026 um 22:33 Uhr)
Sichere ProgrammierungHow to Check an Agent's Diagnosis Before It Touches Production(21.09.2026 um 22:53 Uhr)
Linux Tipps & HardeningWhat if Spotify was self-hosted? I think I got pretty close.(21.09.2026 um 22:33 Uhr)
Linux Tipps & HardeningSandboxing on Linux(21.09.2026 um 22:45 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Introducing Vectors And Vector Search

Where Traditional Queries Fail Picture this: your dog just birthed a cute litter of say 5 puppies. Now let's assume you have no other pets. If I asked you: "how many pets do you have?", you would naturally say 6. If I asked you: "how…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




Where Traditional Queries Fail



Picture this: your dog just birthed a cute litter of say 5 puppies.



Now let's assume you have no other pets.



If I asked you: "how many pets do you have?", you would naturally say 6.

If I asked you: "how many dogs do you have?", you would of course still say 6.



Now I asked slightly similar questions, but you were able to parse the question and answer it correctly.



If you were querying a database for the same answer you would write something to this effect:




SELECT * FROM animals WHERE type = 'pet';






or




SELECT * FROM pets WHERE type = 'dog';






Depending on how you designed your database, your query might yield your desired result.



But we're already running into some common problems. Chief of them is that we need to design our tables and queries to accurately represent relationships between data — not a small feat in itself. For that we need structured data.



Bear in mind that most everyday data is unstructured:




  • "I have 2 Rottweilers"

  • "I have 3 Cats"

  • "I have 3 Tom cats"

  • "I have a pet parrot"

  • "I have a pet bird"



To us humans, all the above questions obviously have high "similarity".



But in a database there's no implicit similarity between them — it treats each piece of data as an isolated point — unless we make any such relationship explicit somehow. That leads us to the most important issue: encoding such "similarities" to enable computers to process them.






Vector Search



Vectors provide a comprehensive mathematical encoding of the similarities between such unstructured data.



In its simplest form, a vector is any quantity that has both magnitude and direction.



Visualize the diagram in the image below.



Alt text



Imagine you're standing at the origin (the center point marked "0").



I could tell you to move 60 km, but that is incomplete — 60km where? you ask.



You need both pieces of information:





  • Magnitude: 60 km (how far)


  • Direction: Northwest (which way)



So the complete instruction is: "Move 60km Northwest" or "Move 40km Southeast" or "Move 40km North."






Why Direction Matters



Disclaimer: I personally suck at compass navigation.

Now imagine three people starting at the origin:





  • Person A: Moves 90km Northwest


  • Person B: Moves 60km Northwest


  • Person C: Moves 10km Southeast



Even though Person C traveled the least (10km), they're actually the farthest from Person A.



Person B, who only went 60km, is closer to Person A than Person C is.



Why? Person B's direction (Northwest) is more similar to Person A's direction (Northwest) than Person C's direction (Southeast). Hence both their travel destinations did not diverge as far as Person B and Person C's.






Measuring Similarity with Angles



But the previous instruction is itself still not complete.



Northwest could be any direction between North and West; to be more precise we could add angles:




  • move 90km 85° Northwest

  • move 60km 60° Northwest

  • move 10km 230° Southeast



Alt text



How do we measure how "similar" any two directions are?

We measure the angle between them.



Alt text



The smaller the angle, the more similar the two directions are and the lesser the divergence as we travel outwards from the origin.

If we represent "I have a dog" as a vector at 40°, "My dog gave birth to a litter of five puppies" as 60°, and "Car" as 230°, we develop a system for ranking similarity. Crucially, this is magnitude-invariant. Just because "A" is a whole book about dogs doesn't change its similarity to the sentence "I have a dog," because they both point in the same "thematic" direction.






Back to Queries



Back to our cute puppy litters.



If we could represent each sentence as a vector:




  • "How many pets do you have?" → Vector A (pointing in some direction)

  • "How many dogs do you have?" → Vector B (pointing in a similar direction)

  • "What's the weather today?" → Vector C (pointing in a completely different direction)



Then finding similar questions becomes a simple matter of:




  • Converting and labeling our data as vectors

  • Converting the query into a vector

  • Measuring the angle between the query and all stored vectors

  • Returning the ones with the smallest angles (and consequently higher similarity)



By encoding data into a mathematical representation on a vector plane,

we have achieved a means of comparing data points to one another

across various dimensions.

But the most important measure we want here is cosine similarity.



Thanks for reading this far — this is part of an ongoing series where I build a working vector search engine from scratch in Rust, covering embeddings, SQLite storage, cosine similarity, and more. The complete guide with working code examples lives here: Vector Search with Rust and Sqlite

I'm always open to collaborations and questions — feel free to reach out to me!

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Introducing Vectors And Vector Search

Thematisch verwandte Begriffe: Introducing, Vectors, Vector, Search · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-45381 | Tautulli is a Python based monitoring and tracking tool for Plex Media S…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick