Skip to content

[Agent] SimilaritySearch in Azure Search has no id in hitsΒ #158

@apfelbox

Description

@apfelbox

Hi,

so we are currently trying out the new bundles and they work really great so far! Nice job!

However, we found an issue and are unsure on how to proceed.

As context: we use Azure-based ChatGPT with Azure Search-based embeddings (RAG).

So we fetch the chunks for the request from Azure Search, however it currently breaks: the structure of the values in the result look like this:

[
	"@search.score" => "...",
	"chunk_id" => "...",
	"parent_id" => "...",
	"chunk" => "...",
	"title" => null,
	"text_vector" => "...",
]

However, this currently breaks, as the SearchStore tries to access id in this array:
https://github.com/symfony/ai/blob/main/src/store/src/Bridge/Azure/SearchStore.php#L92

And we don't have an id.

So my question: is that something we need to configure on our side or is the assumption in the code currently wrong, that there always is an id?

Comments:

  • Neither chunk_id nor parent_id are in any way Uuid-compatible
  • When we change the line to Uuid::v4(), it appears to work

Thanks for any pointers and for the great bundles

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingStoreIssues & PRs about the AI Store component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions