Skip to content

feat(ai-gateway): Align semantic similarity documentation with AI GW 2.0#5501

Open
tomek-labuk wants to merge 10 commits into
release/ai-gateway-2.0from
feat/update-semantic-similarity
Open

feat(ai-gateway): Align semantic similarity documentation with AI GW 2.0#5501
tomek-labuk wants to merge 10 commits into
release/ai-gateway-2.0from
feat/update-semantic-similarity

Conversation

@tomek-labuk

@tomek-labuk tomek-labuk commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Description

Updates the AI Gateway semantic similarity reference to reflect AI Gateway 2.0 concepts (Models and Policies) instead of the older plugin-centric framing.

Changes:

Refocuses the page around AI Gateway 2.0 semantics (Model semantic load balancing + semantic Policies) and updates related links to entity docs.
Rewrites the “vector databases” and “similarity application” sections to describe Model/policy behavior rather than individual plugins.
Updates configuration field references from plugin-centric wording to policy-centric wording.

Preview Links

https://deploy-preview-5501--kongdeveloper.netlify.app/ai-gateway/semantic-similarity/

Checklist

  • Tested how-to docs. If not, note why here.
  • All pages contain metadata.
  • Any new docs link to existing docs.
  • All autogenerated instructions render correctly (API, decK, Konnect, Kong Manager).
  • Style guide (capitalized gateway entities, placeholder URLs) implemented correctly.
  • Every page has a description entry in frontmatter.
  • Add new pages to the product documentation index (if applicable).

@netlify

netlify Bot commented Jun 9, 2026

Copy link
Copy Markdown

Deploy Preview for kongdeveloper ready!

Name Link
🔨 Latest commit 6c9e87e
🔍 Latest deploy log https://app.netlify.com/projects/kongdeveloper/deploys/6a2a50dd95b1710008194fa8
😎 Deploy Preview https://deploy-preview-5501--kongdeveloper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@tomek-labuk tomek-labuk marked this pull request as ready for review June 10, 2026 08:31
@tomek-labuk tomek-labuk requested a review from a team as a code owner June 10, 2026 08:31
Copilot AI review requested due to automatic review settings June 10, 2026 08:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the AI Gateway semantic similarity reference to reflect AI Gateway 2.0 concepts (Models and Policies) instead of the older plugin-centric framing.

Changes:

  • Refocuses the page around AI Gateway 2.0 semantics (Model semantic load balancing + semantic Policies) and updates related links to entity docs.
  • Rewrites the “vector databases” and “similarity application” sections to describe Model/policy behavior rather than individual plugins.
  • Updates configuration field references from plugin-centric wording to policy-centric wording.

Comment thread app/ai-gateway/semantic-similarity.md Outdated
Comment thread app/ai-gateway/semantic-similarity.md Outdated
Comment thread app/ai-gateway/semantic-similarity.md Outdated
Comment thread app/ai-gateway/semantic-similarity.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ tomek-labuk
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

Comment thread app/ai-gateway/semantic-similarity.md Outdated
Comment thread app/ai-gateway/semantic-similarity.md Outdated
When a plugin needs to find semantically similar content—whether it’s a past prompt, an upstream description, or a document chunk—it sends a query to a vector database. The database returns the closest matches, allowing the plugin to make decisions like caching, routing, injecting, or blocking.
When a Model’s semantic load balancer or an attached semantic policy needs to find semantically similar content—whether it’s a prompt, a target model description, or a document chunk—it sends a query to a vector database. The database returns the closest matches, allowing the Model or policy to make decisions like routing, caching, injecting, or blocking.

{% include_cached /plugins/ai-vector-db.md name=page.name %}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was the include of supported vector DBs removed, this is important and often requested information

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was my mistake, I restored it

Comment thread app/ai-gateway/semantic-similarity.md Outdated
Comment thread app/ai-gateway/semantic-similarity.md Outdated
Comment thread app/ai-gateway/semantic-similarity.md Outdated
Comment thread app/ai-gateway/semantic-similarity.md Outdated

The following table describes how each AI plugin compares embeddings:
**Model semantic load balancing** (`semantic` algorithm):
- Compares incoming prompt embeddings against stored embeddings of each target model's semantic description.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the complete description? Based on my knowledge the described process would not have great results.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've improved this one, Does it look okay now?

Comment thread app/ai-gateway/semantic-similarity.md Outdated
Comment thread app/ai-gateway/semantic-similarity.md Outdated
Comment thread app/ai-gateway/semantic-similarity.md Outdated
@jbaross

jbaross commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

As an aside the intro is very clunky and could be rewritten

tomek-labuk and others added 2 commits June 11, 2026 06:49
Co-authored-by: jbaross <james.baross@konghq.com>
@tomek-labuk tomek-labuk requested a review from jbaross June 11, 2026 05:19
@tomek-labuk

Copy link
Copy Markdown
Contributor Author

As an aside the intro is very clunky and could be rewritten

Yeah, that's true. I've fixed it as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants