Thanks Esmeralda!
No answer from the actual maintainer since October 24, 2025.
I'm proposing to be the new maintainer for the Panther module (
https://www.drupal.org/project/panther →
).
lussoluca → changed the visibility of the branch 3496732-add-support-for to hidden.
lussoluca → created an issue.
lussoluca → created an issue.
lussoluca → created an issue.
lussoluca → made their first commit to this issue’s fork.
itamair → credited lussoluca → .
Thanks, James, for your questions; I'll try to answer them below.
What do they mean by "re-rank" in this context.
This article explains in depth what I mean by re-ranking: https://www.pinecone.io/learn/series/rag/rerankers/
It is a two-step process to enhance the result of a vector-based search. Some vector databases (like Pinecone) implement a re-ranking feature, but always in the second step, after you've retrieved an initial set of documents by using some kind of search.
Could you help explain the context by giving a specific real-world use-case?
I'm implementing a site where the client needs to find the best image between thousands. We saw that using a re-ranking algorithm on the retrieved results improved the quality of the result (we're using Cohere for that).
How would this be used by the AI module specifically, how would Search API / ai Search or Assistants make use of this or is it intended for other things?
Why use "operation type" as the abstraction here.
I've implemented it as an operation type because (as for embedding or chat) you can use different algorithms from a different provider to perform a re-rank. You can use a generic LLM for that; take a look, for example, how LLPhant implements re-ranking: https://github.com/theodo-group/LLPhant/blob/main/src/Query/SemanticSear...
As you wrote later, probably it makes sense to also expose this feature as a Search API postprocess_query
processor plugin. However, I do not want to limit it to Search API only, as I may have retrieved the set of documents to re-rank from a different source.
Is there anything else cohere can do?
Yes, it can also be used to compute embeddings. I plan to add this feature to the ai_provider_cohere module.
Where would this fit within the UI of the things we currently do?
I think that re-ranking is not something the final users may be aware of. It can be limited to the processor configuration page from Search API.
Also I think it might need to be AI_Reranking as reranking is a common thing for search that doesn't use AI a lot of the time right? It just uses a variety of algorithms.
I agree with you, I'll update the MR.
Hi,
Yes, one use case could be to enhance a semantic search response; you can look at this page from Cohere: https://cohere.com/rerank
An example can be like:
$client = $backend->getTypesenseClient();
$response = $client->searchDocuments('images', [
'q' => $query,
'query_by' => 'embedding',
'exclude_fields' => 'embedding',
'prefix' => FALSE,
'vector_query' => 'embedding:([], distance_threshold:0.70, k:'.$num_results.')',
]);
$hits = $response['hits'];
$default_provider = $this->aiProviderManager->getDefaultProviderForOperationType('rerank');
if ($default_provider != NULL) {
try {
$provider = $this
->aiProviderManager
->createInstance($default_provider['provider_id']);
$response_reranked = $provider->rerank(
new ReRankInput(
model: $default_provider['model_id'],
query: $query,
top_n: $num_results,
texts: array_map(
static fn($hit) => $hit['document']['chunk'],
$hits
),
documents: $hits,
),
$default_provider['model_id'],
);
$hits = $response_reranked->results;
}
There are some certificates issues with the download of the model from https://models.typesense.org/public/all-MiniLM-L12-v2/model.onnx.
Maybe something related to your network or the docker image you're using to run Typesense.
Unfortunately is something out of the control of the Drupal module...
You can try with: ddev logs -f -s _name_of_typesense_container_
Can you also post the logs for the Typesense server? Usually, Typesense writes the logs to the standard output
The Typesense server itself downloads the model. Can you please post the Typesense logs here?
The first example of an AI provider that supports re-ranking: https://www.drupal.org/project/ai_provider_cohere →
lussoluca → created an issue.
lussoluca → created an issue.
lussoluca → created an issue.
Instead or re-implement a plugin architecture for AI providers, let's use the ones provided by AI module.
lussoluca → created an issue.
> It would be good to get this in before retry? are they tied together?
Yes, I think they should be worked together
> I've worked on a equivalent for doctrine_ping_connection & doctrine_close_connection
Cool, thanks!
> It seems it will dedupe for a short range of time, but not over say, an hour.
By default, the lock is set to last 5 minutes (300 seconds), but you can configure it when you apply the stamp to the envelope:
new LockStamp(\hash('sha256', \serialize($message)), 3600)
We need to write extensive documentation about how it works.
lussoluca → created an issue.
@dpi I've pushed a new (sandbox) project for sm_deduplicate: https://www.drupal.org/sandbox/lussoluca/3481678 →
breidert → credited lussoluca → .
@dpi can we close this issue and add its scope to ✨ Implement retry and failed Active ?
I cannot create an MR because the project repo is empty (no branches available).
Anyway, the code is here: https://git.drupalcode.org/issue/panther-3480502/-/tree/3480502?ref_type...
lussoluca → changed the visibility of the branch main to hidden.
lussoluca → created an issue.
dan2k3k4 → credited lussoluca → .
Yes, of course, we can do that in a separate project.
Something like sm_deduplicate ?
lussoluca → created an issue.
Thanks,
I'll release a new 2.x version asap
lussoluca → made their first commit to this issue’s fork.
I've created a new MR (https://git.drupalcode.org/project/sm/-/merge_requests/23) with code from ✨ Implement retry and failed Active and 📌 Provide a Drupal SQL transport Active because failure and retry only apply to async transports
lussoluca → changed the visibility of the branch 3403929-3390775 to hidden.
lussoluca → created an issue.
Let me know if you still have issues
lussoluca → made their first commit to this issue’s fork.
lussoluca → made their first commit to this issue’s fork.
lussoluca → created an issue.
At the moment, an integration with Views is not on the plan.
I think Typesense shines in combination with instantsearch.js to build client-site JavaScript-only frontends. Take a look at the "Search" tab in the index configuration.
Maybe we can create an issue to build the integration but it's not I will work on in the next future, sorry.
We absolutely must have better error messages!
Let's continue on this issue: ✨ Better messages for errors Active
lussoluca → created an issue.
Hi, have you added some fields to the index? Do the fields use the "Typesense: " data type? Do you have any errors when saving the schema?
Duplicate of ✨ Add a form element to easily reference entities in curations Active
lussoluca → created an issue.
done
merged
lussoluca → created an issue.
lussoluca → created an issue.
done
done
Done
Can you please try again with the latest version?
While working on ✨ Expand documentation (was "Doubts about the installation") Needs work , I've made the code more robust for this kind of issue.
I've just tried using Typesense Cloud, and it worked as expected.
I suppose there are some issues with documentation/UX that we can improve on.
Have you set the type of the fields as Typesense: ... ?
lussoluca → made their first commit to this issue’s fork.
lussoluca → made their first commit to this issue’s fork.
This has been fixed in the latest 1.0.x version
The first version has been implemented.
I will open specific issues for improvement.