Skip to content

feat: add AssetFeed vectorizer and reranker - #895

Open
nikolai-vysotskyi wants to merge 1 commit into
redis:mainfrom
nikolai-vysotskyi:add-assetfeed-vectorizer-reranker
Open

nikolai-vysotskyi wants to merge 1 commit into
redis:mainfrom
nikolai-vysotskyi:add-assetfeed-vectorizer-reranker

Conversation

@nikolai-vysotskyi

Copy link
Copy Markdown

Motivation

RedisVL has vectorizers and rerankers for several hosted providers. This adds AssetFeed's embeddings and rerank APIs, so they can be used for the same two-stage retrieval flow. Try the models in the browser: https://assetfeed.com/models (embeddings: https://assetfeed.com/models/embeddings, reranker: https://assetfeed.com/models/reranker). API keys: https://assetfeed.com/api-keys, pricing: https://assetfeed.com/pricing.

Changes

AssetFeedVectorizer

redisvl.utils.vectorize.AssetFeedVectorizer (sync and async) calls the AssetFeed embeddings API (OpenAI request format) through the openai client with the AssetFeed base URL. The key comes from api_config or ASSETFEED_API_KEY.

  • dims is 1024, 512 or 256; other values raise ValueError. dims is set from the argument, so there is no probe call at construction.
  • embed_many / aembed_many cap batch_size at 64, the API limit per request.
  • input_type="query" or "document" can be passed to embed, embed_many, aembed, aembed_many; it is sent as input_type in the request body, and omitted when not given.
  • Registered as Vectorizers.assetfeed and in vectorizer_from_dict (dims is read from the dict when present).

AssetFeedReranker

redisvl.utils.rerank.AssetFeedReranker (rank / arank) posts to /rerank with the same client. It follows VoyageAIReranker for rank_by, limit and return_score. Only the first 100 documents are sent (the API limit) and top_n is clamped to the number sent.

Docs, tests

  • API reference pages, README provider list, utilities concept page, installation note (pip install redisvl[openai]), AGENTS.md list.
  • tests/unit/test_assetfeed.py: defaults and env key, dims validation, 64-input batching (sync and async), input_type, rerank clamping, rank_by, from_dict. No new extra was added, so uv.lock is untouched.

Release Notes

RedisVL can embed text and rerank search results with AssetFeed models: AssetFeedVectorizer and AssetFeedReranker, using the openai extra.

AI Assistance

This change was prepared by an AI coding agent and was not reviewed by a human before submission; the account is operated by AssetFeed.

Reviewer Brief

Not verified: no live calls to the AssetFeed API (no key in the environment). The request shapes were checked against a mock transport with the real openai client. Docker-based test suites were not run; unit tests ran with --noconftest.

Disclosure: I work on AssetFeed.

@vishal-bala

Copy link
Copy Markdown
Collaborator

Thank you for your PR. We don't currently accept PRs from agents without human oversight or review, or PRs where the author does not properly test their code before submitting it for review. Please decide whether you can meet those requirements for contributions to RedisVL and amend the PR accordingly - if that's not a process you're prepared to follow at this time, feel free to close the PR and alternatively open an issue.

This branch has not been deployed

No deployments
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.

2 participants