Semantic search: querying by vector similarity
With the growing importance of vector-based search in AI applications such as semantic search, recommendation engines, and natural language processing, 4D introduces native support for vector queries in the query() function. This enhancement brings vector similarity comparisons directly into the language of DataClass.query() and EntitySelection.query().
Find the right spot in your 4D Write Pro document with AI
In 4D applications, large documents are commonplace: financial reports, internal guidelines, technical manuals… Searching for an exact keyword often isn’t enough. Scrolling through 30-page reports to find one paragraph is not only time-consuming but also error-prone. This is where AI can help.
The semantic approach based on vectors, introduced in 4D 20 R10, already makes it possible to find a relevant 4D Write Pro document even when different wordings are used (for example, “insert image” vs. “add picture”).
But what happens when a document spans multiple pages and covers various subtopics? Even if the entire text can be converted into a single vector, results are often better when we work at a finer scale. This is the idea behind chunking: splitting a document into coherent segments, each represented by its own vector.
This is precisely what allows us to go further: retrieving not only the right document, but also the exact passage that matches the search.
Search by Meaning, Not Metadata: Semantic Image Filtering with 4D.Vector
Your users don’t think in filenames or folder hierarchies. They think in ideas.
- “A robot painted in watercolor.”
- “A sunny beach filled with color.”
- “Something that feels like Mona Lisa… but from the future.”
It doesn’t matter if that idea comes from an image, a customer order, an email, or a 4D Write Pro document — the challenge is the same: how do you deliver results that match intent, not just keywords?
With 4D.Vector and 4D AI Kit, your application can finally make sense of meaning. In this post, we’ll illustrate it with semantic image similarity search. And here’s the key: we’re not really working with raw images at all — we’re working with their descriptions. The very same approach works for any kind of text data in your application.
AI Brings Magical Search to 4D Write Pro Documents
In many 4D business applications, documents are everything — technical notes, reports, manuals, internal guides. But when users can’t remember the exact wording, finding the right one becomes slow, frustrating, or worse — impossible.
With 4D 20 R10, semantic search powered by AI vectors changes that. Instead of matching keywords, you match meaning. Users get the right document, even if they search in different words or a different language. It’s a smarter way to surface the knowledge hidden in your documents — fast, accurate, and built for how people actually search.
Let’s consider a concrete example: a user wants to locate a technical note that explains how to insert an image into a 4D Write Pro document. However, they may not recall the precise phrase used in the document.
4D AI: Discover the power of 4D Vectors
When working with modern applications, especially those involving Artificial Intelligence, natural language processing, or spatial data, vector math is key. That’s why 4D 20 R10 introduces a new object: 4D.Vector, designed to help developers store and compare data vectors with just a few lines of code.
For example, if you’re building a feature to rank images based on how well they match a text prompt, just generate vectors, compare them using cosine similarity, and sort your results from most to least relevant, all directly in 4D.
Why Your Search Stack Feels Broken — and How Vector Search Fixes It
You ask a question. Your system gives you keyword matches — close, but not the answer. The real insight? It’s buried in a doc, phrased differently, or hiding in a format your search can’t understand.
Now imagine search that gets what you mean — even if you don’t say it perfectly. That surfaces meaning, not just matching words.
That’s the shift we’re exploring in this blog post: what’s failing today, what’s replacing it, and why vector search is becoming the new default for teams that need clarity at scale.
Contact us
Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!
* Your privacy is very important to us. Please click here to view our Policy
