Ash Ai allow multi full text columns

I think rn we can easily avoid this but there are cases where this will be so useful, I am willing to work on this, I already checked the code that handles the full_text macro. However I need some pointers and guides that will help me better understand the library.
6 Replies
ZachDaniel
ZachDaniel2mo ago
Honestly the full text config is pretty easily replicatable with custom configuration
Abu kumathra
Abu kumathraOP2mo ago
I am a noob when it comes to spark dsl so literally any guides will be great
ZachDaniel
ZachDaniel2mo ago
it makes sense that we should have support for multiple @Abu kumathra what I mean is that you can add an attribute to store your value, and use actions/changes/ash_oban etc to manage it No need to write custom spark DSLs At which point the question really becomes "how to use Ash resources/write Ash actions" I'd suggest taking a look at the actions guide for more information
Abu kumathra
Abu kumathraOP2mo ago
I want to have concatenations just like with full_text, I think I can manage something like this with generated columns but I would rather rely on ash for it
ZachDaniel
ZachDaniel2mo ago
Right, but AshAI just composes tools that you can use yourself
update :set_some_vector do
change fn changeset, _ ->
Ash.Changeset.before_transaction(changeset, fn changeset, _ ->
# generate some vectors using an embedding model and save them to the changeset
end)
end
end

...

oban do
trigger :set_some_vector do
....
end
end
update :set_some_vector do
change fn changeset, _ ->
Ash.Changeset.before_transaction(changeset, fn changeset, _ ->
# generate some vectors using an embedding model and save them to the changeset
end)
end
end

...

oban do
trigger :set_some_vector do
....
end
end
Abu kumathra
Abu kumathraOP2mo ago
makes sense, but is this something that I can work on as a PR to ash ai? I think all of the building blocks are already available, the only thing that needs to be changed is that when the name option is defined on full text it should mark it as a seperate column. rn only the last full_text call goes through I am open to spending sometime on this, as I need to learn Ash in depth and better understand it's inner mechanisms.

Did you find this page helpful?