Product

4D AI: Sorting Query Results by Vector Similarity

In the Semantic search: querying by vector similarity post, we introduced how to query entities using vector similarity, a powerful way to find the most relevant records based on meaning rather than exact values.

4D 21 R2 comes with a new way to sort query results using 4D.Vector fields. You can not only filter entities by similarity but also sort your query results using the .query() function so that the most relevant and semantically closest entities appear first. Whether you’re building an intelligent search experience, a recommendation engine, or an AI-driven assistant, this new feature ensures that your results are ordered by relevance, providing more accurate and user-friendly outcomes.

Product Diagram showing how OpenAI’s embedding model converts user prompts into vector outputs, illustrating the transformation of text into numerical representations using text-embedding-ada-002.

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.

Tips blank

SHOWCASE: SMART EXPENSE REPORTING WITH AI

You know the pain of expense reporting — not for you, for your users. The receipts piling up, the manual entry, the typos that slip through. With 4D AIKit, that grind is gone. A simple upload turns a paper receipt or invoice into clean, structured JSON, ready for your database.

No more wasted time on totals, dates, or vendor names. Vision AI reads it, language models structure it, and 4D ties it straight into your app. From paper to database in seconds — and your users never feel the friction.