I've been given a rare opportunity to use Typesens...
# community-help
e
I've been given a rare opportunity to use Typesense with some fairly powerful AI resources, so I'm exploring RAG with the PG-Essays demo. It's working great, but I haven't found a way to avoid using local embeddings. They're slow to index, and I have a dataset that's quite a bit larger than the sample. Is anybody aware of a way to configure this to use the new gemini-embedding-2 image instead? We're using a LiteLLM proxy at our organisation:
Copy code
{
        name: "embedding",
        type: "float[]",
        embed: {
          from: ["title", "text"],
          model_config: {
            model_name: "ts/snowflake-arctic-embed-m",
          },
        },
      },
One suggestion was to obtain the embeddings separately from Gemini and provide them to Typesense, which sounds like a good approach but not sure where to even start on that
using latest Typesense 30.1 if that's useful 👍
j
Hi Elliot. For vector embeddings there's a few options: you can generate the embeddings on Gemini separately and import then as described here in the docs, or you can use a few other models provided by OpenAI, Google, etc (also described in that doc) that Typesense supports automatically generating embedding with as long as you have an API key. Where these the embeddings you meant? We've also found that models that are specifically meant for Q&A use-cases (like
ts/all-MiniLM-L12-v2
) perform well for conversations, if you have only been using
snowflake-arctic
.
🙌 1
e
Oh nice, I missed the vector search docs. That looks like exactly what I need. Thanks!
Worked great! Noticeably slower with Gemini embeddings vs the local ones, but might be down to the different dimension sizes. Hopefully I get another chance to improve