Hi, how can i implement natural language search wi...
# community-help
a
Hi, how can i implement natural language search with typesense in Python? Also, I'd like to use ollama models and openai api for LLMs in the natural language search. Please suggest related solutions @Kishore Nallan
@Jason Bosco
Waiting for your reply @Kishore Nallan @Jason Bosco
k
Have you checked the docs on vector search? It covers these details.
a
I'm referring to such a functionality in python https://typesense.org/docs/guide/natural-language-search.html#use-case
k
Ah, got it. We don't have a python / openai based workflow for this yet.
a
Any workaround in typesense so that i could engineer this myself?
Or if i can implement this in node js with ollama models?
k
The approach is just using an LLM to construct a structured Typesense query from a natural language query, based on some examples in the prompt. You should be able to adapt this approach to OpenAI.
However, not sure whether another LLM can pull this off as well as Gemini Flash was able to do in our testing.
a
Can you suggest a way to integrate ollama/huggingface models with this approach?
k
I doubt that the smaller models will be able to do this reliably
a
I get it i just want to try it, any idea on how to integrate ollama in this one??
Also, is the python version of this approach planned in future? Was this just an experiment or a feature in typesense-js?
k
Right now, it's experimental. For using ollama you have to find a library that replaces the interactions with Gemini API with ollama API calls.
👍🏼 1