microsoft / microsoft/semantic-kernel-java

Java: API - What about being able to generate one Embedding from one data type (instead of list)?

Open
#130 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

java
Dominant language
Java
Stars
276
Forks
56
Avg merge
17h 45m
Merged PRs (30d)
4

Description

The EmbeddingGeneration API has a single generateEmbeddingsAsync(List<TValue> data) method that takes a list (let's say of String) and returns a list of Embeddings

    Mono<List<Embedding>> generateEmbeddingsAsync(List<TValue> data);

It would be nice to have another method that only takes one (let's say) String and return a single Embedding. This way we could create one embedding for a single piece of text (without chunking it into smaller pieces).

    Mono<List<Embedding>> generateEmbeddingsAsync(List<TValue> data);

    Mono<Embedding> generateEmbeddingAsync(TValue data);

WDYT ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the EmbeddingGeneration API and its implementations, then review how generateEmbeddingsAsync(List data) is exposed and tested. Define the single-value method's return behavior and update the relevant API coverage so one input produces one Embedding without requiring callers to create a list.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.